steve.westdal

FindAttribute "DNP" of components DxDesigner Script

Discussion created by steve.westdal on Dec 2, 2011
Latest reply on Dec 4, 2011 by steve.westdal

Hi

 

I am developing a script to go through all the parts in a DxDesigner schematic, and gather component attributes.

This is all working fine, except I also need to extract "DNP" information, which the script can't find, and then explodes violently and ruthlessly.

As the example code shows below, I extract the "PACKAGE" attribute from the component. In the component properties of the schematic, I can clearly see "PACKAGE". This works fine.

I can also clearly see the "DNP" property, but for some reason FindAttribute(DBP) returns nothing.

 

For further background information, I am using dictionaries since they are the only type I am aware of that can expand dynamically. There is one dictionary for each component property attribute. The DEVICE parameter is used as the dictionary key for each.

 

----------

 

Const DEVICE  = "Part Number"

Const PKG   = "PACKAGE"

Const DNP   = "DNP"

 

For Each itr in objDxApp.DesignComponents("", schemName, -1, "STD", TRUE)

    

     'This works fine

     dicKey = itr.FindAttribute(DEVICE).EitherValue

        

     'This works fine

     dicCompPKG.add   dicKey, itr.FindAttribute(PKG).EitherValue

 

     'This blows up

     dicCompDNP.add   dicKey, itr.FindAttribute(DNP).EitherValue

----------

 

Thanks

Outcomes