<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Properties not working with multiple choice Option Set in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/Properties-not-working-with-multiple-choice-Option-Set/m-p/262931#M1818</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have a zone stamp in AC21 that requests properties to display in floor plan.&lt;BR /&gt;
All works perfectly fine until you select a multiple choice option set and then untick all options.&lt;BR /&gt;
&lt;BR /&gt;
The Graphisoft Zone Stamp seems to not have this issue but I can't seem to fix it.&lt;BR /&gt;
&lt;BR /&gt;
Here is the script for this:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;==============================================================================
! 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) &amp;gt; 2 then _valueString = _valueString + "; "

			if _type = 4 then		! Type is string - no conversion needed
				_stringPropValue = _propertyValues&lt;J&gt;&lt;I&gt;
			else	! bool, real, integer types - conversion needed to string
				_valueToConvert = _propertyValues&lt;J&gt;&lt;I&gt;
				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&lt;/I&gt;&lt;/J&gt;&lt;/I&gt;&lt;/J&gt;&lt;/PRE&gt;

Any help would be much appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;/R&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 11 Oct 2019 15:38:46 GMT</pubDate>
    <dc:creator>JGoode</dc:creator>
    <dc:date>2019-10-11T15:38:46Z</dc:date>
    <item>
      <title>Properties not working with multiple choice Option Set</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/Properties-not-working-with-multiple-choice-Option-Set/m-p/262931#M1818</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;Hi,&lt;BR /&gt;
&lt;BR /&gt;
I have a zone stamp in AC21 that requests properties to display in floor plan.&lt;BR /&gt;
All works perfectly fine until you select a multiple choice option set and then untick all options.&lt;BR /&gt;
&lt;BR /&gt;
The Graphisoft Zone Stamp seems to not have this issue but I can't seem to fix it.&lt;BR /&gt;
&lt;BR /&gt;
Here is the script for this:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;==============================================================================
! 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) &amp;gt; 2 then _valueString = _valueString + "; "

			if _type = 4 then		! Type is string - no conversion needed
				_stringPropValue = _propertyValues&lt;J&gt;&lt;I&gt;
			else	! bool, real, integer types - conversion needed to string
				_valueToConvert = _propertyValues&lt;J&gt;&lt;I&gt;
				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&lt;/I&gt;&lt;/J&gt;&lt;/I&gt;&lt;/J&gt;&lt;/PRE&gt;

Any help would be much appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 11 Oct 2019 15:38:46 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/Properties-not-working-with-multiple-choice-Option-Set/m-p/262931#M1818</guid>
      <dc:creator>JGoode</dc:creator>
      <dc:date>2019-10-11T15:38:46Z</dc:date>
    </item>
  </channel>
</rss>

