For example, you can extract the position of the center of gravity according to X in the document properties table by selecting SW-Ix@part.SLDPRT
Because I would like to extract some values automatically, such as the length in X, Y and Z of the 3D model, the area, the density of the selected material,..
No, I don't have a list of all the internal properties that can be recovered. On the other hand, for your request, you can create your properties so that they point to the dimensions of your part and thus retrieve the X, Y and Z length values of your 3D model. Also, if you create your model (prtdot) with a volume size that already has these dimensions and properties inserted, you won't have to do anything else.
Thank you for your answers, but for the moment they do not correspond to what we would like to do.
Lucas Prieur: Thank you for the list of properties, but the values I am looking for are not indicated
jmsavoyat: I had thought about the solution of naming the maximum dimensions of space, but we would like the values to be filled in automatically because we have many rooms whose Maxi dimensions are an overlap of functions. As a result, we would have to insert dimensions for the three values X, Y and Z and rename them so that the custom properties of the document are populated. Also, it doesn't allow me to extract other values such as density.
On the other hand, I admit I don't know how to go about it.
I downloaded it and unzipped it.
The Encumbrance file. SWP
If I open it directly from Solidworks it shows me the following message: "The names of the following files are invalid, have not been found, are locked or of a non-compatible type"
Yes, I've already done that, but there are still some properties that I can't extract and that we'd like to display automatically. For example, grade, density, thermal conductivity, yield strength,.. of the material
And I imagine that these values must be usable because some of them are used by the simulation modules.
I know how to insert a macro, my problem is rather that when I unzip the .zip file, I don't have a .swp file
On my desktop, I created a folder "Macro material property". Inside I unzipped the file .zip .
He created a "Properties" and "SwMacro" folder for me
Inside the "SwMacro" folder I have a list of files and folders (see attached image). I can't find a .swp file there like I'm used to finding. So, I don't know what to do.
In Solidworks I defined a new macro by selecting the path ...\Properties\SwMacro\bin\properties.dll
I create a piece and associate it with a material
I record, then activate the macro. I rebuild. I will check in the tables of the properties of the file, but unfortunately it does not appear the values that I had previously filled in the material editor such as density, thermal conductivity or values in the custom tab.
On the other hand, when I launch the macro, SW performs the other macro (the one that calculates the Max odds of the coin). Is there a conflict between macros?
Could it come from the Solidworks version? I'm running SW2013 SP3.0 in x64