SmartProperties and room family, how do you force a property in the document, and not just in the configuration?

Hi all.

 

I can't force a property in the part document.

 

I have three solutions in my SmartProperties tab:

- Related to the document

- Configuration-related

- Specify configurations.

I only have one configuration in my family room, and in my room document.

However, the property I modify (TITLE3) is only modified in the properties related to the configuration. and the ones that I retrieve by a macro is the one linked to the document. I can't get it so that when I force this property through Excel it forces itself into all the properties. Do you have an idea?

 

Thanks in advance

Hello

Pay attention to the name of the property, the @(configue) that sticks to this name must be removed for the property to be taken into account in all configurations.

@a.leblanc here is attached a picture of the excel


sans_titre.png

@a.leblanc here is attached a picture of the excel


sans_titre.png

Basically, if I understood correctly, this property (title 3) is linked to a single configuration, while you would like it to be linked to all configurations?

Is your excel sheet organized in the same way as a part family?

If so, you should have multiple rows of values corresponding to the different configurations.

1 Like

In fact I don't have a configuration.

 

I went through the part family to do automated CAD because I don't have a driveworks license. The part family file is linked to a design note that defines the dimensional parameters of my part. So I don't understand how it's possible that there are two "title3" info in my document... photo to accompany


sans_titre.png

Ok, why bother with that if you don't have multiple configurations?

It's simple, you have properties that can be linked to the document (custom properties) or to a configuration.

I use excel to prohibit the modification of the sketch.

Yes I understand, what I would like to know is either:

- How to retrieve the TITLE3 info of the configuration and not of the document (in VBA maybe I'm pointing to the wrong info, if necessary I don't know how to say that we are interested in the active configuration and not in the document)

- How to force the TITLE3 info from my excel in both cases (document and config)

 

thank you for your answers,

You need to create a custom property = to the configuration-specific property, and your title will be there in both cases.

No solution without changing the smartproperties settings, or adding more properties? Because it is not possible to touch these options...

There's little hope, but try something like this, you never know:

 

HEADLINE3 = $PROPRIETE@HEADLINE3

Hello

The part family is there to create configurations, even if only one, so it necessarily fulfills the properties of the configuration created.

So you need to change your macro.

@+

2 Likes

I don't know if this can help you, but look in the mycadtools settings (see attachment)

Oops, here's the attachment.


capture_parametrage.png

I just had an idea. If I go through the name of the configuration, there must be a way to retrieve it?

 

I looked at the SW API, and indeed, GetActiveConfigurationName should work, but I can't seem to integrate it into my code... anyone know how it works? I put the code in PC...

 

@Dessin I don't have permissions to change these settings...


code.txt

I'm putting you the error that VB returns to me when I run with the bits of GetActiveConfiguration and the line that causes it circled in red.

 


sans_titre.png

Well after many dead ends, I (finally) managed to get the code to work by stealing right and left on the internet.

 

For those who are interested, the code is in PJ, and is commented, so easier to understand.

 

Thank you all for your help in any case!!


code.txt
1 Like