Hi everybody,
Has anyone already used the document manager "SetCustomProperty" method?
I keep on getting a syntax error message, though I think my code is correct:
Dim myType As Long
Dim myClassF As New SwDMClassFactory
Dim myApp As SwDMApplication
Dim myDoc As SwDMDocument16
Dim myConf As ISwDMConfiguration13
Dim myDocPath, ConfName As String
Dim errors As Long
Set myApp = myClassF.GetApplication("xxxxxxxxxxxxxx")
myType = swDmDocumentPart
myDocPath = "C........."
Set myDoc = myApp.GetDocument(myDocPath, myType, False, errors)
ConfName = myDoc.ConfigurationManager.GetActiveConfigurationName
Set myConf = myDoc.ConfigurationManager.GetConfigurationByName(ConfName)
myDoc.SetCustomProperty("Prop1", "Val1")
myConf.SetCustomProperty("Prop2", "Val2")
Each time I type one of these lines, VBA requires a "=" sign.
According to the API help, my syntax is correct, I don't see where the problem is...
myDoc.CloseDoc
Tanks for you help
Pierre
SolidworksApi macros