Reply
Solved! Go to solution

Document properties and multiple Languages

[ Edited ]

We have a macro that we have used for over a decade which gets and sets properties of a Solid Edge document object.  An example is getting the Template from SummaryInformation.

 

We now want to use this same macro at our site in China, which is using Solid Edge install with Chinese language.  In our code we have always used the Property name to retrieve it, however this name is different in the Chinese install.

 

Does anyone know the best way to handle this?  One option would be to use the index number of the property from the SummaryInformation properties, but I've never been a fan of hard coding an index number for fear of it changing.

 

Here is an example of code:

Set oProp = objDraftdoc.Properties
Set oSummaryInfoProps = oProp("SummaryInformation")
Set oTemplateProperty = oSummaryInfoProps("Template")

 

When that last line is executed I get a subscript out of range error because the value is "应用程序名" and not "Template".

 

Thanks.

Carl Breving

S&C Electric Co

1 REPLY
Solution
Solution
Accepted by topic author breving
‎08-26-2015 04:32 AM

Re: Document properties and multiple Languages

This is what was suggested by Development.

 

For the well-known properties, such as those in the SummaryInfo property set, you should look up properties by ID.  Use the PropertyByID () API on the appropriate Properties object and use the property IDs listed in the PropertyIDs enumerated type.  The SummaryInfo Template ID is 7.  This is what we use internally, i.e. we always look up properties by IDexcept for the custom properties, which don’t have predefined IDs.

 

Property PropertyByID(PropID As Long) As Object

    read-only

    Member of SolidEdgeFileProperties.Properties

 

Const igSumInfoTemplate = 7

    Member of SolidEdgeFileProperties.PropertyIDs