BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Properties not working with multiple choice Option Set

JGoode
Advocate
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:

==============================================================================
! 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
			else	! bool, real, integer types - conversion needed to string
				_valueToConvert = _propertyValues
				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
ArchiCAD 23

Windows 10
0 REPLIES 0
Learn and get certified!