- I would have liked to know if it was possible to set a macro so that it launches when opening SW please?
- And is it possible to have a macro "running in the background"? By this I mean, a macro that launches as soon as the condition is met. For example, as soon as a specific file is opened, a macro window asks which configuration should be activated? Please
Indeed, I think that if you really want to do this you have to look at the AddIn.
All information for an AddIn VB.Net here. From then on, we no longer talk about VBA. We might as well say it right away, the magnitude of the task is not at all the same.
Thank you for this complete pdf. I had seen the solution to modify the shortcut. For me, this is still a DIY since with each update of SW the shortcut will be replaced. I'm not even talking about the location of the macro.
You can choose to place the macro wherever you want it and not necessarily in a folder in the Solidworks installation.
As for the shortcut, you can use a macro that is started by an equation. That is to say that the macro will be started the first time you rebuild any part (Save, rebuild, load).
By an equation (except that after testing 15 days ago, the equation manager doesn't like the equation to write to launch the macro, so, I forget)
By Feature Macro (The macro is a feature like an extrusion or a sweep, it is executed at each reconstruction) really very practical to make very advanced parameterization.
By a macro (you can run a macro from another macro)
Running solidworks (which for me, is strictly useless, you might as well make an addin in c# or .net)
The two I remember are the execution by user action and Feature Macro.
FYI, for macros that depend on a part, I put the macro in the design folder of the part. It avoids losing it and using it for another room.
Allow me to react to the PDF using_notifications_events_in_solidworks_macros did you manage to make the example under SW2016? for my part nothing happens it's embarrassing