We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2021-05-13 09:22 AM - last edited on 2021-09-14 09:12 AM by Noemi Balogh
IF TXT = "Object ID" THEN TXT = GLOB_ID ENDIF
2021-05-13 10:34 AM
n = REQUEST ("Property_Value_Of_Parent", "id", type, dim1, dim2, propertyValues)Please see the GDL user manual for details.
n = REQUEST ("ASSOCLP_NAME", "", objectName)
IF objectName = "Cooktop Built In 23" THEN objectCode = "CT" objectFullName = "COOKTOP" ENDIFFor better results you can use String functions to cut off 23 at the end - then your label will be version independent. Plus of it - you don't need to set additional parameters manually. Also you keep ID - for real ID, if you will need in the future to use unique ID for scheduling.
2021-05-13 11:01 AM
if GLOB_SCALE <= 20 then rrr=REQUEST ("Property_Value_Of_Parent", "big_text", type, dim1, dim2, propertyValues) else rrr=REQUEST ("Property_Value_Of_Parent", "little_text", type, dim1, dim2, propertyValues) endifYou now use the 'propertyValues' variable in your text command.
if GLOB_SCALE <= 20 then rrr=REQUEST ("ASSOCLP_PARVALUE", "big_text", name_or_index, type, flags, dim1, dim2, p_values) else rrr=REQUEST ("ASSOCLP_PARVALUE", "little_text", name_or_index, type, flags, dim1, dim2, p_values) endif
2021-05-17 03:36 AM
TXT = propertyValues define style{2} "AC_STYLE_1" LABEL_FONT_NAME, LABEL_TEXT_SIZE, LABEL_FONT_STYLE2 paragraph "AC_PRG_2" 2, 0, 0, 0, 0.8 pen TxtPen set style "AC_STYLE_1" "" + TXT endparagraph textblock "AC_TEXTBLOCK_2" 0, 5, tr, 1, 1, 1, "AC_PRG_2" richtext2 0, 0, "AC_TEXTBLOCK_2"I get an error message in the "" + TXT line for "incompatible types in expression". I'm sure that I'm missing a step somewhere. Have tried the GDL guide but frankly that is like trying to understand a foreign language! Its hard to know what you're looking for when you don't know what you're looking for!
2021-05-17 03:56 AM
"" + STR(TXT, 1, 0)
2021-05-17 07:56 AM
2021-05-17 08:45 AM
Podolsky wrote:
Guys, you went somewhere in wrong direction. Why property value is a number, when it suppose to be a string, because it shall say CT or COOKTOP?
2021-05-17 09:45 AM
Podolsky wrote:The problem I see with that method is I would have to enter the name of every object I want to use the label for into the label code wouldn't I? I want to be able to use the label for kitchen appliances, bathroom fittings etc. I think it would be better set a global property that can be set in any object then save the objects used most often as favourites with the label text already pre-set.
Guys, you went somewhere in wrong direction. Why property value is a number, when it suppose to be a string, because it shall say CT or COOKTOP?
Make it simpler. I think to use additional properties for such a small task - is too much. Then every time, when you will need it - you need to check - are these properties correct etc.
Do it better with recognition of object name and set text, without any properties requests. Simple and most important - it will work in any cases.
2021-05-17 10:20 AM
2021-05-17 11:33 AM