cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
GDL
About building parametric objects with GDL.

Archicad Dictionaries and UI commands

Nader Belal
Mentor

Hi Graphisoft GDL Development Team,

I would like to draw your attention to something I have stumbled upon yesterday.

While trying to use ArchiCAD "UI_" commands for objects' GUI with a Dictionary Parameter, the  commands did not accept it. Whether it was a normal or an array parameter.

I don't know if the issue is in my PC or the way I have scripted the code, but I do firmly believe that if that was not the case, this issue should be fixed for the benefits it can make GDL scripting more dynamic and terse.

Best regards.

A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
2 REPLIES 2
Sam Karli
Enthusiast

Note that per GDL Reference Guide: "values for a dictionary type parameter can only be set via the Parameter script (no direct user input is available through Parameter list or UI controls), the VALUES command is disabled for this type", so this is stated.

 

My approach is to define exclusive UI parameters, i call them like sUI1 (for a string data) and iUI2 (integer), do the ui_infield commands for setting these in Interface scripts, and then in the Parrameter sctipt I write something like:

if gs_ui_current_page = dPageIDS.SelectedPanelPage.iUiID then
	values "iUI4" 1, 2, 3
	if	GLOB_MODPAR_NAME = "iUI4" \
	then
		dDict.iOverrideS[iOverrideEdited].source = iUI4
		parameters dDict = dDict
	else
		parameters iUI4 = dDict.iOverrideS[iOverrideEdited].source
	endif
endif

 

Note that for this i define dPageIDS.SelectedPanelPage.iUiID in a Master script to be seen both in Parameter and UI script. This has an advantage that the UI parameter's values can be limited independently from anything.

I recycle these UI params among the tabs, so an iUI4 can mean different "real" params on different tabpages.

GDL/Python/C++ dev

Hi Sam,

Thank you for your reply.

My issue is not about how to use the dictionaries under those circumstances as you have mentioned, my issue is that the full potential of dictionaries is not being used.

 

Best regards

A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.