cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

How to change a properties type to custom-defined?

Dayiz
Booster

Hello dear Community,

 

I want to change a property with an AddOn but for some reason my values always turn out undefined.

The property starts with its default value:

1.png

Sorry for the german bits, let met translate the important part:

Standard (Nicht definiert) = Standard (not definied)

Individuell (Wert) = Custom (value)

Als nicht definiert festgelegt = Set as not defined // Custom (not defined)

 

Now when i run the AddOn, the property gets set to "Custom (not defined)"

2.png

and the value is <Nicht definiert> (not defined).

 

Now when i set the property to Individuellen Wert festlegen (Set custom value) and put in anything (like "123")

3.png

and then run my AddOn, the property gets set the way i want to.

4.png

But i can't find out how i can change the property to "Custom (value)", so that my property gets set by the AddOn, currently i only get <not defined>.

 

Here the important parts of my code:

5.png

I left out the functions "getSelectedElements" and "findPropertyDefinition" because they work and should have no impact on the <not defined> part.

 

Thanks for any help in advance 🙂

1 ACCEPTED SOLUTION
2 REPLIES 2

Miha_M
Advisor

I am nowhere near being C++ enabled, but on Archicad side I suspect the problem may be somewhere on an elevated level. Each property, which is not set, has the <not defined> default value status. You'll need to find a path to switch this status from "Undefined" to "Value" first. But I have no clue as to how this can be triggered. A screenshot of Property Manager for better explanation of the mentioned "elevated" level:

 

Miha_M_0-1661944400917.png

But in the first two of your screenshots it seems like you have managed to switch this status (API_PropertyCustomDefinitionType?), only the value remains in a <not defined> state.

Archicad 4.55 - 25 | HP Z840 | 2× E5-2643 v4 | 64 GB RAM | Nvidia Quadro M5000 @ Windows 10 Pro x64

Solution

Thanks for your help Misa_M.

I figured it was a problem like that and tried to find the property setting in the API doc, but couldnt find it.

 

What worked was to create a new property instead of copying and editing the old property

5.png

Seems like the old property had the <not defined> part baked in or something like that.

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!