Search macro to populate custom properties

Hello

I'm looking for a macro to fill the custom properties table automatically with data from our filename.

The names of our file are composed as follows: "XX000-aaa-Part name" see example in PJ.

-1st line Piece-Name: we want to retrieve "part name"

-2nd line Landmark number: we want to recover: "aaa"

-3rd line Machine-number: we want to recover: "XX000"

 

 

 

 

 


extract_solid.jpg

If you have MyCADTools, the smart properties utility should meet your needs.

I wonder to what extent you can't do it with the "integrated" property form editor in SW, to look for in "Solidworks Tools" if you are under W10

1 Like

Hello

To do what you want, you need the following features:

GetTitle Method (IModelDoc2): Allows you to retrieve the name of the active 3D in Solidworks.

Manipulate VBA strings .

Add3 Method (ICustomPropertyManager): Allows you to add a custom property in Solidworks.

Kind regards

1 Like

Good evening

Indeed, as indicated @stefbeno the SmartProperties tool meets your needs exactly. Of course, a macro can give you the result.

I invite you to take a look at the possibilities offered by the SmartProperties tool:

 https://help.visiativ.com/mycadtools/2020/fr/Concatenation1.html

But there are undoubtedly many other tools in the myCADtools suite that could help you in your daily life. You can test the tools for free for 1 month if you want to:

https://www.lynkoa.com/mycadtools

Kind regards

1 Like

Thank you for your answers.