Can anybody help????
I have the following 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.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
I need to open the part "Silently" and get the part Type, Material & Description. I have attached a sample part.
However the macro does not work. Has anybody got any idea what I am doing wrong?
Many thanks in advance!!!!