you could write the properties into a database when checking it into your PDM.
Then you are able to read the custom properties without opening SW.
I think you can't even run a .swp macro without activating SolidWorks.
You might look here:
change custom properties without opening file?
Since no-one else is suggesting the obvious - here goes:
you need to use the SWDocumentMgr API.
It is free, but you need to obtain a license key for it. This is documented in the API help:
To request a SolidWorks Document Manager API license key:
- Log into the SolidWorks customer portal.
- Click API Support in My Support.
- Click Document Manager key request in step 4.
- Follow the online instructions to request your license key.
A SolidWorks Document Manager API license key is emailed to you upon approval of your request.
Function GetProperty(myFile as string, myPropertyName as string) as string
Dim myType As Long
Dim myClassF As New SwDMClassFactory
Dim myApp As SwDMApplication
Dim myValue as string
Dim i as integer
Dim errors as long
Set myApp = myClassF.GetApplication("license key")
myType = swDmDocumentPart
If InStr(Lcase(myFile), ".sldasm") > 0 Then myType = swDmDocumentAssembly
If InStr(Lcase(myFile), ".slddrw") > 0 Then myType = swDmDocumentDrawing
Set myDoc = myApp.GetDocument(myFile, myType, False, errors)
If Not myDoc Is Nothing Then
myDoc.GetAllCustomPropertyNamesAndValues sa1, sa2, sa3, sa4
If IsEmpty(sa1) = False Then
For i = 0 To UBound(sa1)
If sa1(i) = myPropertyName Then
myValue = sa4(i)