I need to make a program using Solidworks API + VB.NET to get total dimensions of a part file (.SLDPRT).
How can I do this? This is possible?
What is API commands to do this?
I tried to do this kind of macro with Property Manager Page (PMP), but did not find a way. That would have been more easy to use.
Here is one another way to do the work:
This macro works for parts. It saves the result into a part property as given in the code
PropName(0) = "DIMENSIONS"
You must first select part type (Plate, Pipe, etc.) from a drop down list. After that you can select all dims as one go or pick those one by one.
Feel free to edit :-)
Check the macro by Josh here: Re: model parameters
If you go till end, you can see more helpful edition to the macro. Choose which one suits your need.
Actually what I need is to take measurements of the solid body in the part file.
Not sketch dimensions, ecc...
When I select a body in Solidworks it show me a box around the body
This box has measurements
I think this measures is the body dimensions
Correct me if I'm wrong
Search the forum for "bounding box". Lots of information and macros.
Retrieving data ...