Display an alert message in the graphics area

SW 2013 SP4.0

Hello

I think I've already seen this but I don't know how to do it:

I want a message (preferably clearly visible in large and color) in the graphic area when opening an assembly. (these messages would be of the type: Warning! Don't forget to update the excel sheet when editing this assembly). Of course I don't want this message to be visible on my drawings. They will just serve as a warning to the user.

Has anyone ever seen this?

Thank you

Hello

If you have a myCADtools subscription, you can use CustomToolbar.

You enable events in the CustomToolbar options

Then you add a macro type in your toolbar (see at the bottom the code to paste in a macro editor)

You check: FileOpenPostNotify in SolidWorks.

Macro: 

**

Dim swApp As SldWorks.SldWorks

Dim Part As SldWorks.ModelDoc2

Dim boolstatus As Boolean

Dim longstatus As Long, longwarnings As Long

 

Sub main()

 

Set swApp = Application.SldWorks

 

Set Part = swApp.ActiveDoc

 

If Part.GetType = swDocumentTypes_e.swDocASSEMBLY Then

 

MsgBox "it's an assembly"

 

End If

 

End Sub

 

**

 

Customize the messagebox to your liking.

A+

 

Mick

2 Likes

Hello.

 

It seems to me that I did it at one time by integrating a text into a sketch but without making it a function afterwards.

It's not great, if your room is not in the right way you can't see anything, but hey, you need better..