thanks Gupta Guru,
the script that you refer to is working well on Excel Macro, but unfortunately when it run in sldworks API, the auto close function didn't work.
actually the main issue is on following thread
would you pls advice the possible solution?
If the user is in a document, a great option is IModelDocExtension::ShowSmartMessage. This will display a highlighted piece of text next to the mouse cursor for a specified number of seconds. Meanwhile the user can still interact with the software. It's great for displaying information in a non-instrusive manner.
Try this code out:
Dim swApp As SldWorks.SldWorks Dim swModel As SldWorks.ModelDoc2 Sub main() Set swApp = Application.SldWorks Set swModel = swApp.ActiveDoc swModel.Extension.ShowSmartMessage "This is a smart message!", 4000, False, False End Sub
Otherwise, if you need a true message box, as Deepak pointed out, you can auto-close a message box in VBA using this solution: How to: Automatically Dismiss a Message Box
somehow the massage didnt show up..
doest it need certain sldworks version?