Configuration description does not update automatically

Hello

I have a question about updating the description of a configuration in SolidWorks.

I would like to populate this field with a configuration-related property.

  • I created a custom property in my room template:
    %PRP:"Description"
    This property is related to my configuration and looks like this:
    %PRP:"Description" = $PRP:"Matière" - $PRP:"Traitement"
    Which gives me, for example: Stainless steel - Raw.
    This method works well, and the update is done in real time, but the description does not display as the configuration description.

  • With a family of parts, I can use the variable $PRP@DESCRIPTION at the top of a column, but the problem is that the update is only done when I manually reload all the configurations.
    And I don't necessarily have multiple setups, so I don't need a family of parts every time.

  • Finally, I managed to fill the description field with a VBA macro:

Dim swApp As Object
Dim swModel As Object
Dim swCustProp As Object
Dim swConfig As IConfiguration
Dim Matiere As String
Dim Traitement As String

Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swConfig = swModel.GetActiveConfiguration
Set swCustProp = swModel.Extension.CustomPropertyManager(swConfig.Name)

swCustProp.Get4 "Matière", False, SW_Variable, Matiere
swCustProp.Get4 "Traitement", False, SW_Variable, Traitement
swModel.GetActiveConfiguration.Description = Matiere & " - " & Traitement

However, this forces me to restart the macro every time I make a change, and I would like this update to happen automatically, without having to create a button or think about activating the macro every time there is an update.

In short, I'm a little lost and I turn to the community, thinking I'm missing out on something essential. A fresh look would really be appreciated!

Thank you in advance for your help!

Your Description property you created it in the specific tab of configuration N°1? (or in Customize N°2)
image
For a configuration you have to put it only in the 1 (and not in the 2)

it is well in configuration specific
image

Example part family
image

and I would like it here

image

1 Like

And in this room you don't have another description property in the Customize tab? (even empty)

Unless I'm mistaken, you're talking about putting the text here:
image

If that's it, the property is called $DESCRIPTION and not $PROPRIETE@DESCRIPTION
Edit: after seeing your edit, the answer is in your image:
image
You are in the wrong ownership between $DESCRIPTION and $PROPRIETE DESCRIPTION. The one that acts on the square is $DESCRIPTION.

1 Like

And for me not possible in this box, not related to properties, to concatenate 2 properties without going through a family of parts, with the problems generated. (no auto-update)

2 Likes

so it's not really a mistake, it's voluntary (or I didn't understand)
$PROPRIETE@DESCRIPTION is populated by my custom property array with the formula given at the beginning
and $DESCRIPTION filled in the description field below my configuration
and I want the 2 fields to be equal hence the =R3 to synchronize the 2 values

All this works very well for the families of rooms. However!!! 90% of the time I don't have a family of parts.
hence my search to be able to do without it and directly fill in the description field with a variable rather than plain text.

Basically, what I would like but that doesn't work is
image

PS: thank you for your help

Unfortunately there is no possibility, as mentioned, to put one or more properties in this box.
This requires either a macro or a family of parts, but in case of modification it does not change by itself.
Here a topic on the SW forum where the solution provided was to go through a family of parts:

great I'm looking at this thank you

Hello;
For information only, in our company (at work) it is customary for all our " library " equipment to be coded under the " Configuration specific " tab... a bit for the same reasons as @Administrateur_BE .
And so it is not uncommon to have to create a family of parts even if the components do not require variations (no configurations).

1 Like

I may have found a way to get around the problem with a post that has nothing to do with it
source ==>https://forum.mycad.visiativ.com/t/propriete-personnalisee-utilisee-comme-description-aucun-choix-possible/108849

I changed the name of my Description variable to PRPDescription
and added to the file properties.txt a PRPDescription
and now I have the right description in my assemblies
image

I will edit the procedure tomorrow with more details for those who are interested.

2 Likes

I thought it was in the configurationManager that you wanted this description, otherwise I could have directed you to this solution that we also use.

1 Like

… I understood the same thing... :sweat_smile:

2 Likes

Hence the importance of being clear in the statement of the problem! :crazy_face:

2 Likes

indeed I wanted it in the configurationManager
but since it's impossible ... I had to find an alternative

The initial goal was to have the info in this window
image

to give this

image

but the problem is that it is filled by hand and we see that the material has not been updated

so I have the updated info but after the insertion of the part

image

It's not what I needed at first but it does the job

It allows you to check the colors and materials at a glance rather than opening the parts one by one and checking the properties

Well on the other hand when you have to take the right paint in the 50 ral available ... you always have to open the room to know which config coressponds the right RAL

1 Like

Thank you for the explanation, and the important thing is the result, if it suits you, so much the better!

So here is an explanation that I hope will be more exaustive and that I hope will be useful to other users

=============================================================================

In our daily work, we often have to work with multiple configurations of the same room. This can quickly become a real headache, especially when handling hundreds of components with similar but slightly different specifications.

Context:

Let's take the example of a room that has 33 different configurations. These configurations are made from 3 different materials and 10 different treatments.

image

The problem:

When this part is assembled in a assembled assembly, it becomes almost impossible to visually distinguish the different parts. For example, on the next screenshot, you can see the same room 4 times with 4 different codes.

image

In our design office, we can have more than 3800 components in our assemblies, spread over more than 10 tree levels.

Result: to identify which room configuration corresponds to the configuration of a specific subwoofer, one must examine each configuration individually... which becomes extremely tedious.

Proposed solution:

To avoid this kind of confusion, I created a " Description " variable in the custom properties of the part. This variable combines material and processing information from the part configuration.

Example syntax:

$PRP:" Matter " - $PRP:" Treatment "

This variable retrieves material information (which is automatically filled in when the configuration is created) and processing information (which is often filled in manually). The major advantage is that this variable updates automatically if the configuration of the room changes.

image

Additional Requirements:

Once the variable has been created, you need to activate an option in the general settings for the description to appear correctly.
outlis–>Option–>General

image

Detail

I've named it " Description ," but you can create as many variables as you need in the properties.txt file in the custom properties folder.

image

image

Update in assembly:

Then, simply enable designations in your assembly and the material and processing information appears directly in the part name. You then get something like:

SLDPRT File Name <Number of Occurrences> "Material – Processing" (Configuration Name)

image

This makes it possible to quickly verify that the right material and treatment is applied to each part, even if they are visually identical. For example, in the image below, we can see that the material is correct, but the treatments are not, or vice versa, although the parts are visually identical.

image

We can now match the pieces in

image

This simplifies BOM management and helps to order and assemble the right part numbers without ambiguity.

Additional problem:

Ideally, I would have wanted this information to appear directly in the " Description " field of the configuration property. However, this field cannot be populated by a variable and must be entered manually.

image

However!!! :

It is possible to automate this task by using a family of parts. By placing the variable $DESCRIPTION in the corresponding cell, and then creating an equation that points to the $PROPRIETE@Description column (e.g., =P3), one can automatically populate the " Description " field for each configuration.

image

Once this is done, simply activate the display of descriptions to see all the information grouped together:

image

Final result:

With this method, a clear and consistent display with all the necessary information is obtained directly in the assembly.

image

image

image

The main problem is that the information does not update automatically in the Part Family if the material or processing changes. It can quickly become a headache to know what is up to date or not...

NB

Especially when, in the team, some people don't know how to use the families of parts correctly... Finally I understand myself

This method helps to better manage complex configurations and avoid errors when assembling and ordering parts.

I hope this solution can be useful to simplify the management of your configurations and avoid errors in your assemblies.

3 Likes