List of attributes

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

It does the same thing to me as before, namely it shows me the maximum dimensions of the room on the other hand it does not show me the mechanical characteristics of the part such as density, thermal conductivity, ...

 

Hello

 

Indeed there is an error in the macro for custom materials.

 

On the other hand, it works well for SW materials.

 

a small modification Jfaradon

 

A+

 

4 Likes

Yes, I saw that the ID property is only created for the SW standard database

Here is the modification to take into account the other bases

 


properties_3.zip
3 Likes

 

I just tested the new version of the macro.

 

IT WORKS VERY WELL, WHICH IS EXACTLY WHAT I WANTED.

 

Thank you jfaradon for the macro and especially for the time spent. For me, it's a very valuable macro.