cancel
Showing results for 
Search instead for 
Did you mean: 

Unspecified error in VB Script regarding identifier

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (0)