3 weeks ago
Hi all,
I have a custom GDL library object that builds dropdown options dynamically using the PARAMETER script (via VALUES).
In older Archicad versions, it was possible to “commit” evaluated parameters to tool defaults (e.g., with SetActParameters / APIAny_SetActParametersID), so when opening Object Tool Settings (defaults) the dropdown would already be populated.
In Archicad 28/29 that API no longer exists, and since PARAMETER doesn’t run in defaults, the dropdown only shows “TBA” until an actual element is placed or the script runs some other way.
Static popup lists still work fine — but dynamic dropdowns in my custom object do not.
👉 Is there any new API or known workaround to trigger or commit PARAMETER evaluation to defaults in 28/29 without placing an element first?
3 weeks ago
Hi Steve,
I couldn't find any references to 'SetActParameters' also in older DevKits. I checked DevKit 6.1 and for versions AC22, AC24 and AC27. Which AC versions are you talking about?
If you want to change tool defaults, you'd need depending on your AC version:
And then use ACAPI_Element_ChangeDefaults. I think running the "ChangeAParameter" functions also runs the parameter script and should populate the dynamic dropdowns, but I'm not 100% sure, so you'll have to try. For more details check the documentation on the ACAPI_LibraryPart_ChangeAParameterID function.
Hope that helps,
Bernd
3 weeks ago
@Steve Sunny wrote:
Is there any new API or known workaround to trigger or commit PARAMETER evaluation to defaults in 28/29 without placing an element first?
You could try using ACAPI_LibraryManagement_RunGDLParScript
This runs the object parameter script.
2 weeks ago
That function has a non-optional element header parameter, so it only works for placed objects, not element defaults.