List of attributes

Hi all

 

Does anyone have the list of all the attributes?

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,..

 

Thank you in advance

1 Like

Hello

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.

Kind regards


proprietes.png
3 Likes

It is true that if we could have a listing of all the properties it would be really good.

Whoever finds it puts it in the tutorials!

1 Like

I found a list, but I don't know if it's exhaustive:

 

http://help.solidworks.com/2010/english/solidworks/sldworks/legacyhelp/sldworks/drawings/linking_notes_to_document_properties.htm

 

Otherwise, the attached file contains the properties when installing SolidWorks.


properties.txt
2 Likes

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.

 

Otherwise, I found:

SW-Density

SW-Mass

SW-Material

SW-Rebuild Time

SW-SurfaceArea

SW-Volume

Quantity

 

 

and as an attachment, another list from the equations > Files Properties.

 

Hoping I helped!


sw-properties.jpg

Using the Smartproperties utility, you can define "Dimensions" properties.
It is not 100% automatic but semi-automatic.

 

In your case, after opening the Smartproperties , simply click on the dimensions to assign your lengths to your properties.

(See attached files)


smartproperties.png

 

We don't have SmartProperty!

Hello

 

Here's a small VBA macro, which automatically creates the X, Y, and Z properties that match

the dimensions of the part or assembly

 

You can run it manually on a case-by-case basis

or run it in batch with Integration, or then integrate it into SmartProperties

 

Kind regards

 

 

 

 


encombrement.zip
4 Likes

Thank you jfaradon

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"

 

What is the approach?

 

All right!

 

I understood how to launch the macro.

 

Indeed, thanks to this macro, I can directly display the maximum dimensions of my part.

 

Thank you

 

Now, I still have to succeed in extracting the values such as the density!

As jmsavoyat said earlier, in your document  template you add your properties:

  •  SolidWorks Type (Mass, Material, Density,.....)
  •  Custom Type (designation, revision, designer name,.....)

proprietes.png
2 Likes

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 saw that there was no example in the help that deals with this, so I made the example

I completed the macro, I switched it to VSTA the language allows more

Now if there is a material applied to the part, I copy all the mechanical characteristics into the properties of the document

 

This is a good macro base to adapt to your needs 

 

 


properties.zip
6 Likes

 

Thank you jfaradon for the realization of the mcaro.

I admit to having a bit of trouble with macros, how should I go about running it on a part?

To answer this question, a tutorial has been created.
To access this tutorial, follow this link:
Create a "Macro Button" in SolidWorks

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.


dossier_swmacro.png

in fact you have to unzip qlq part

and you have to select the DLL in the creation of the macro shortcut...

...\Properties\SwMacro\bin\properties.dll

 

Then a simple click on the macro button and the properties are automatically created

(if a material is defined)

4 Likes

 

I had taken these steps.

I unzipped the "properties" file

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

 

I see you again the zip this time compiled in 2013 ...

tell me

on my 2013 64 version it works well


properties_2.zip
4 Likes