We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Property_Value_Of_Parent request

vdentello
Advocate

Hi! I've already given some time to check the previous answers within GDL center and previous topics.

Is there a way to predefine the parameter to search by AC Property string name? Bring something out of teamwork or placing it at it will reset Property unique IDs, making all of the custom labels loose their previously chosen properties.

The only other way I could think of solving that is placing the request at a Master, so all child labels would read the same parameter and wouldn't loose it.

 

n = REQUEST ("Property_Name",  myProperty, _typeName, _groupName, _propertyName)

 

Archicad User Since 2013
GDL Developer
Experimenting with API
from Brazil
1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Hi!


How about something like this?

 

name = "Fire Resistance Rating"

dim _parentProperties[]
n = REQUEST ("Properties_Of_Parent", "", _parentProperties)

for i = 1 to vardim1(_parentProperties) step 4
	_propertyGuid = _parentProperties[i]
	_typeName = _parentProperties[i+1]
	_groupName = _parentProperties[i+2]
	_propertyName = _parentProperties[i+3]

	if (_propertyName = name) then
		! Use the found property here
		goto "DONE"
	endif
next i

"DONE":
END

 

View solution in original post

3 REPLIES 3
Solution

Hi!


How about something like this?

 

name = "Fire Resistance Rating"

dim _parentProperties[]
n = REQUEST ("Properties_Of_Parent", "", _parentProperties)

for i = 1 to vardim1(_parentProperties) step 4
	_propertyGuid = _parentProperties[i]
	_typeName = _parentProperties[i+1]
	_groupName = _parentProperties[i+2]
	_propertyName = _parentProperties[i+3]

	if (_propertyName = name) then
		! Use the found property here
		goto "DONE"
	endif
next i

"DONE":
END

 

It worked! I passed then the propertyGuid to the other Request and then used the returned Integer as a checker to draw a specific symbol.

Archicad User Since 2013
GDL Developer
Experimenting with API
from Brazil

With the other request you mean "Property_name"? If so, then I think that would not be necessary, since you already have all the same data and can assume that the parent element has the property (since it was found in its properties list).

Also now that I think of it I don't understand fully understand the context of your question. Because once a property is created, I think it keeps the same GUID. Or does that change when working with teamwork?