If one of these \ / " * ? < > | characters being used in sDescription then.
Call swApp.SendMsgToUser("You cannot use these characters in the description: \ / " * ? < > |.")
How can i make this work?
--------------------------------------------------------------------------------
Sub CreatePNG()
Dim FileName As String
Dim sDescription As String
Dim sRevision As String
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
sDescription = Part.CustomInfo("description")
sRevision = Part.CustomInfo("revision")
FileName = Part.GetPathName
If (FileName = "") Then
Call swApp.SendMsgToUser("No file saved. Please save part or assembly file prior to running macro.")
Else
If (sDescription = "") Or (sRevision = "") Then
Call swApp.SendMsgToUser("Please fill in the description/revision.")
Else
FileName = Left(FileName, Len(FileName) - 7) & sRevision & " - " & sDescription
Me.LabelStatus.Caption = "Creating .PNG File"
FileName = FileName & ".png"
------------------------------------------------------------------------------------------------------------------------------------