Adding a macro button to a PDM data map

Hello

I would like to be able to launch a macro from a data card on solidworks 2022. but I'm stuck because it seems that only PDM tasks or executables or DLLs can be, and I don't know how I can transpose a macro into an executable file.

For example, I would have liked to give the user the possibility to quickly generate new configurations, from the data card.
Or run a macro that updates units or adds missing variables.

Is it technically possible to carry out this type of manipulation?
Thank you for your help.

Hello

To make a macro executable as an independent file, you need compilation tools and code in C# or VB.NET.
There is a possibility to manipulate the data cards from the Solidworks VBA (but from memory on the 2022 some bugs so not necessarily totally usable).
In my opinion, to " simplify ", I would rather go through a userform that would be formatted in the image of the data card and then just go through the variables of the code to transfer the data to the different variables of the vault. Configurations will also be possible to generate.

The only constraint is having to launch a macro from SW (button in the interface) which will be a bit of a duplicate with the PDM data card.
Maybe see in the MyCad tools if there is not one that meets the need.

2 Likes

Bonjour,

Peut-être que ces articles peuvent aider :
That Was Easy: Using Buttons on a Data Card

Open a file with a PDM data card button - Computer Aided Technology

1 Like