Hi,
Using someone else macro I found on here I modified it for my needs... The macro works just fine appart from the drawing sheet does not update. The custom properties window shows the updated information, printing a pdf and the fields get update as does if the file is saved, closed and then opened again. It just does not work straight after pressing the button. Any ideas?
Sub MAIN()
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
'ADDS DP INITIALS TO DRAWN BY
Part.CustomInfo2("", "DRAWN BY") = "DP"
'ADDS TODAYS DATE TO DRAWN DATE
Part.CustomInfo2("", "DATE 2") = Date
'ADDS MW INITIALS TO CHECKED BY
Part.CustomInfo2("", "CHECKED BY") = "MW"
'ADDS TODAYS DATE TO CHECKED DATE
Part.CustomInfo2("", "DATE 3") = Date
End Sub
Regards,
M
SolidworksApi macros