Hi all.
During a presentation at the Visiativ connect in Lyon, it seemed to me that the person who gave me the presentation told me that you could launch a solidworks macro when you save the file.
I can't find that possibility again.
Is it really feasible??? If so, in which module???
Thank you in advance
Hello
This is possible from the CustomToolbar toolbar to be enabled in SW add-ins.
Then you can enable events and launch your macro at the fileSavePostNotify event for the document type you want.
Philippe
Thank you for this very quick response.
If I can overdo it, I need more info.
Currently all our macros are at the SWP format.
I have the impression that we can only throw .EXE, I'm wrong???
You can choose a SWP format, just choose the macro type from the first drop-down menu of the definition of the tool to launch
Hello, otherwise it is also possible to use a "macro feature". It is a macro that is put in the creation tree of the part or assembly and when you rebuild or save your part, the macro starts. (No link with myCadTool, but for informational purposes)
Gauthik
1 Like
@Gauthik67
Can you tell me more about the Macro feature please.
I'm interested, is it coded differently?? How to insert them in the feature manager?
And so how to manage the events??
Do you have a tutorial on this?? I very quickly looked from my phone, I couldn't find anything very conclusive.
At the time I had made a macro feature and as you say, there is not much information available. However, with this document I had managed to understand the principle and make one that worked: Link
From memory it seems to me that when the macro is created, rebuilt or deleted, it launches custom functions that you can code in the macro. (To be checked, but it seems to me that the name of these functions should be swmRebuild, swmEditDefinition, swmSecurity) Link With information about these functions
Gauthik
1 Like