Can anybody help?
I have the following SolidWorks VBA macro...
Public Function GetCustomProperties()
Dim FileError As Long
Dim FileWarning As Long
Set swApp = Application.SldWorks
swApp.DocumentVisible False, swDocumentTypes_e.swDocPART
Set oDoc = swApp.OpenDoc6("C:\Test\Test.sldprt", swDocPART, swOpenDocOptions_Silent, "", FileError, FileWarning)
PartType = oDoc.GetCustomInfoValue("", "Part: Type")
PartMaterial = oDoc.GetCustomInfoValue("", "Part: Material")
Description = oDoc.GetCustomInfoValue("", "Part: Description")
swApp.DocumentVisible True, swDocumentTypes_e.swDocPART
End Function
Do I have to "close" the open document after I have read the values?
Many thanks in advance!!!
Darren
SolidworksApi/macros