Set swapp = Application.SldWorks Set swModel = swapp. ActiveDoc
On Error Resume Next ToolbarId=59427 If swModel Is Nothing Then MsgBox ("No active document") End Else Dim stPathMacro As String stPathMacro = swapp. GetCurrentMacroPathName strRegFileName = Replace(stPathMacro, ".swp", ".dll") strDllFileName = strRegFileName
lStatus = swapp. LoadAddIn(strDllFileName) Set swDCAddIn = swapp. GetAddInObject("{5E333A56-A5B6-4a90-B365-BEF36FE5D81C}") swDCAddIn.ToolbarCallback0 HERE Counter = Counter + 1
End If
Before the ICI, the smart starts, but the macro continues (counter, then more...)
I think that the best would be to launch a macro that would launch SmartProperties on the first Article and then a new macro would be launched via the SmartProperties which would relaunch SmartProperties on the next Article
The second macro will be launched with the type "Executed" and with the setting "After closing SmartProperties".
To find out which mechanic folder SmartProperties has been applied to, either fill in the information in a document property or retrieve the selected item in SolidWorks
@Lucas: I want to wait for the user to "Validate" the SmartProperties of Article1 before moving on to the next one.
DoEvents may be a solution, but I don't really see how to use it...
@Prossignol: the idea is not bad, but difficult to implement. Because the "Next article" macro doesn't work anymore in this case. Everything would have to be started from scratch. But I'll keep the idea if ever.