Macro Smartproperties - Read Properties

Hello

 

I would like to use a macro to read the data I have filled in in the SmartProperties fields (Heat Treatment, Supplier, etc.) in order to re-write them in a text file.

I can't find any information to read this data in vba.

Do you have any leads or documentation to recommend to me?

 

Thank you.

 

 

 

Hello

I'm going a little out of the scope of your question, but if you have Smart Properties, you may also have access to Integraton from the MyCAD suite?

If so, you can easily generate a report in csv, values from a list of properties.

It works very well, and it avoids developing a macro.

4 Likes

Oh yes indeed. With Integration I can do that. I'm discovering MyCAD tools at the moment, I hadn't seen this possibility.

So in integration, I manage to write in a text file the SmartPropoerties properties and then launch a macro right after that will read this text file and process the information as I want. All in a single operation, so no more complicated than launching a macro directly.

This solution suits me for the moment.

Thank you.

1 Like

I discovered that the properties that were entered in SmartProperties were stored in the Solidworks file in the form of custom properties (File->properties...)

As a result, it's easy to access it via a vba macro and without going through the Integration software.

The macro bit that allows you to do this is directly in the help on the Solidworks API.

Here:

http://help.solidworks.com/2012/English/api/sldworksapi/Get_Custom_Properties_of_Referenced_Part_Example_vb.htm