Displays a SOLIDWORKS-style message as a ToolTip in the graphics area and on the status bar.
.NET Syntax
Visual Basic (Usage) | |
---|
Dim instance As IModelDocExtension
Dim Name As System.String
Dim TimeInMillSec As System.Integer
Dim ShowInStatusBar As System.Boolean
Dim RemoveDefaultTip As System.Boolean
instance.ShowSmartMessage(Name, TimeInMillSec, ShowInStatusBar, RemoveDefaultTip) |
Parameters
- Name
- Message to display in the ToolTip
- TimeInMillSec
- Time, in milliseconds, to display the message
- ShowInStatusBar
- True to show the message on the SOLIDWORKS status bar, false to not
- RemoveDefaultTip
- True to replace the default SOLIDWORKS ToolTip with this message for TimeInMillSec, false to not
Example
Visual Basic for Applications (VBA):
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim swModelDocExt As SldWorks.ModelDocExtension
Dim swModel As SldWorks.ModelDoc2
Dim swSelMgr As SldWorks.SelectionMgr
Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
swModel.ClearSelection2 True
Set swSelMgr = swModel.SelectionManager
Set swModelDocExt = swModel.Extension
While 1
' Loops until you select an entity in the graphics area
While swSelMgr.GetSelectedObjectCount = 0
DoEvents
Wend
swModelDocExt.ShowSmartMessage "This is the message.", 500, True, True
DoEvents
Wend
End Sub
See Also
Availability
SOLIDWORKS 2009 FCS, Revision Number 17.0