on 08-08-2013 6:24 PM
I have a VB script that attempts to get an attribute of an identifier in a PdLDM model. The code is similar to the following:
dim identifier
set identifier = entity.FindChildByName(identifier_name, PdLDM.cls_Identifier)
dim attribute
set attribute = identifier.GetAttribute(attribute_name)
The method GetAttribute() keeps resulting "Unspecified error (0x80004005) At line ##, character #. Does anyone have experience with this? Thanks.
Hi Arthur,
the method Identifier.GetAttribute() will retrieve a single valued attribute for an identifier, like:
s = identifier.GetAttribute("Name")
output s
As an identifier may contain more than one attribute, alle attributes for an identifer are stored in the collection Attributes for an identifier: You may retrieve the number of attributes for an identifier:
attribute_count = identifier.Attributes.Count
and afterwards go thru the list to retrieve/manipulate the attributes themselves.
Kind Regards
Klaus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.