2022-08-31 11:55 AM
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:
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)"
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")
and then run my AddOn, the property gets set the way i want to.
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:
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 🙂
Solved! Go to Solution.
2022-08-31 02:01 PM
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
Seems like the old property had the <not defined> part baked in or something like that.
2022-08-31 01:19 PM - edited 2022-08-31 01:42 PM
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:
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 - 27
| HP Z840 | 2× E5-2643 v4 | 64 GB RAM | Quadro M5000 | Windows 10 Pro x64
| HP Z4 G4 | W-2245 | 64 GB RAM | RTX A4000 | Windows 11
2022-08-31 02:01 PM
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
Seems like the old property had the <not defined> part baked in or something like that.