Hi, I would like to write a macro that would add the property "Espessura" to all the parts in the assembly i run it. The property "Espessura" would be the value of the Equation "Espessura" which solidworks provides by default
Try the macro by Ivana Kolin here Add custom property to all assembly components using macro and then modify as needed.
In case you need option to input the custom property name or it's value then check here Add custom property to all assembly components using macro and Input Box
What i need to do is add a custom property with the "Espessura@*Partname*.SLDPRT". How can i write that in the macro? Which things should i replace? Sorry, i'm a beginner in macro writing
Make these two changes:
Change this line
wo_num = "Espessura"
And change this line
cpm.Add3 mValue, swCustomInfoText, Chr(34) & mValue & "@" & swModel.GetTitle & ".SLDPRT" & Chr(34), 1
Retrieving data ...