Hi There,
I am trying to retrieve the value from 562-0000-r0 from a drawing using the code below.
Screenshot of field on drawing to retrieve
CODE:
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc
Dim CustomInfo As String
Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
CustomInfo = swModel.CustomInfo("\$PRPSHEET:PartNo") ' "PartNo" can be any property brought through from the parts Custom Property Tab
MsgBox CustomInfo
End Sub
The return value from the MsgBox is
Cheers
Damien
SolidworksApi macros