Adding new Custom Property

Hi,

I tried to add a new user defined property to a ModelDocusing thiscode (C#):

SldWorksClass swApp = new SldWorksClass();
ModelDoc2 swDoc = swApp.IActiveDoc2;
ConfigurationManager swConfigMgr =swDoc.ConfigurationManager;
Configuration swConfig = swConfigMgr.ActiveConfiguration;
CustomPropertyManager swCustPropMgr=swConfig.CustomPropertyManager;swCustPropMgr.Add2("MyProperty",(int)SwConst.swCustomInfoType_e.swCustomInfoText, "HelloWorld!");

But the property is added to the configuration specific listofproperties not to the user defined list of properties.


The "why" seems clear to me because I used theConfigurationManagers CustomPropertyManager.

The question is how to access the CustomPropertyManager toaddressthe user defined properties.

Using Modeldoc.AddCustomInfo3 always returns false and isalsomarked as obsolete (being replaced by CustomPropertyManager).

regards,

AlexSolidworksApi macros