How to get (mass, volume, area) part in the programming language C# ???
Here's an API example that does that (C#)2016 SOLIDWORKS API Help - Get and Override Mass Properties Example (C#)
I hope that by area, you mean surface area!
Writes that there are no libraries, although in fact "using SolidWorks.Interop.sldworks;" there is.
You're writing a standalone apparently. You need to add references to the sldworks and swconst assemblies first (you'll find them in the redist folder in your solidworks installation) and then you'll need create an sldworks object. Use the activator class to create an instance of the solidworks application. var swApp = Activator.CreateInstance(Type.GetTypeFromProgID("SldWorks.Application")) as SldWorks;
Be aware that solidworks may be launched invisible so you may want to set the visible property to true. If you're going to load a document, you don't need to do this as the document opening operation will forcefully render the application visible (I think).
Let me know if this works out for you.
The fact is that all the necessary links(sldworks and swconst) and an activator class for creating an instance of the SolidWorks application, I have.
Opps, I think you need to convert the bool return to string in order to for them to print. That really did go over my head.
I figured it out, thanks! The problem was in the old version of SolidWorks, that is, old links that did not have these methods.
I swear I was going to say that. This must be older than SOLIDWORKS 2013. Good for you.
Retrieving data ...