The Global ARCHICAD Community

Stay informed. Get help. Share your knowledge.

Everything about GDL - Doors/Windows/Objects/Stairs etc. (Example: I created an object that prints an error message in 3D all the time, please help!)

Moderators: Barry Kelly, Karl Ottenstein, LaszloNagy, ejrolon, gkmethy, Gergely Feher

#302652
Hi,

I have a zone stamp in AC21 that requests properties to display in floor plan.
All works perfectly fine until you select a multiple choice option set and then untick all options.

The Graphisoft Zone Stamp seems to not have this issue but I can't seem to fix it.

Here is the script for this:
Code: Select all
==============================================================================
! Get the value(s) of the stored property
! ==============================================================================
!======================== 1
_valueString = ""
dim _propertyValues[][]
_dim1 = 0
_dim2 = 0
n = REQUEST ("Property_Value_Of_Parent", myProperty, _type, _dim1, _dim2, _propertyValues)

if n then
	! change zeros to ones - it is easier to handle all possible arrays in a double loop
	if _dim1  = 0 then _dim1 = 1	
	if _dim2  = 0 then _dim2 = 1

	for i = 1 to _dim1
		for j = 1 to _dim2
			if (i + j) > 2 then _valueString = _valueString + "; "

			if _type = 4 then		! Type is string - no conversion needed
				_stringPropValue = _propertyValues[j][i]
			else	! bool, real, integer types - conversion needed to string
				_valueToConvert = _propertyValues[j][i]
				gosub "convertToString"
			endif
			_valueString = _valueString + _stringPropValue
		next j
	next i
endif

END

! ==============================================================================
!====================================== 1
"convertToString":
	_stringPropValue = ""

	if _type = 3 then		! Real number to string
		_stringPropValue = str ("%.2", _valueToConvert)
	endif

	if _type = 2 then		! Integer to string
		_stringPropValue = str ("%.0", _valueToConvert)
	endif

	if _type = 1 then		! Boolean to string
		if _valueToConvert = 1 then
			_stringPropValue = `True`
		else
			_stringPropValue = `False`
		endif
	endif
return
Any help would be much appreciated.

Thanks