E-Drawing Update Macro - Active Configuration Issues

All,

I am working on a macro that will do the following:

Get all of the children within the assembly file. Then based on a custom property called "Part Type" for each of those children do one of a few things all of which are very similar.

If "Part Type" is "CUSTOM" make the property "Published As"&"-"&"Description"

If "Part Type" is "PURCHASED" make the property "Supplier"&"-"&"Supplier Part Number"&"-"&"Description"

If "Part Type" is "HARDWARE" make the property "BOM Part Number"&"-"&"Description"

This changes what is shown in the E-drawing component fields so that instead of showing a serialized number (file name) it shows the pertinent information for the shop personnel.

The picture above (left) would be the result of a successful change. The picture on the right is what it is doing for some files.

The problem I am having is that some files the custom properties are stored in the configuration specific tab of EPDM and it will not grab that property.

Attached is the macro.

Let me know what you guys think!

Thanks,

Pencil

SolidworksApi macros