Need a macro to save the drawing with custom properties

I need a macro to save the drawing with custom properties as in the attached image.

something like that (400_Porta.slddrw).

All the macros I've seen will get the properties from the drawing and not from the model.

each model has different configurations, I have to design them all. if the save was automatic it would help me a lot.

The macro can be the name of the configuration more the name of the property (componente) "config_Porta.slddrw"

SolidworksApi/macros
Answers 3
FE
FE 2021-04-08 Best Answer

I have a same desire. Link here:  But i probably have to start to learn some coding.

MN
MN 2021-04-08

I don't see a attached macro

MS
MS 2021-04-08

Hi Mario,

Try the attached macro.  You'll need to edit the names of custom properties.  It would be worth looking over the code so you understand the process.  I've added comments to help.

To run the macro, first open your base drawing.  The code assumes one sheet.  You could enhance it to also loop through all sheets when it is updating views.

FYI, the example models are in 2020 format, but you can use anything you'd like.  

Mike

Topics covered:

  • Get drawing views from the open drawing
  • Get the referenced model from the first drawing view
  • Get the configuration names of a model
  • Get configuration specific custom properties
  • Save the drawing with a new name