We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-03-14 09:52 AM
I would to create a label that shows the contour pen, pen of the background fill and pen of the fill pattern.
I cannot extract those information with the default Autotext. I noticed that when when I'm creating custom label with Autotext, the information for Autotext has this kind of code :
paragraph "AC_PRG_12" 1, 0, 0, 0, 1
pen penAttribute_1
set style "AC_STYLE_1"
"<PROPERTY-B9179DB7-97BC-4985-94DC-06C201F79EF4>"
endparagraph
paragraph "AC_PRG_13" 1, 0, 0, 0, 1
"<PROPERTY-BE376478-6966-4892-BEC7-4CB72ABF4003>"
endparagraph
paragraph "AC_PRG_14" 1, 0, 0, 0, 1
"<PROPERTY-8E19BE5F-D487-4BEC-9281-B34CA2355292>"
endparagraph
textblock "AC_TEXTBLOCK_6" 21.71378406315, 1, 0, 1, 1, 1,
"AC_PRG_12", "AC_PRG_13", "AC_PRG_14"
richtext2 12.27684530913, 13.27296877469, "AC_TEXTBLOCK_6"
Solved! Go to Solution.
2023-03-16 09:12 AM
Thanks for your reply! I didn't try chatGPT, but that's a great idea!
Update:I tried it now those property codes, but it gives back "#".I wonder why it doesn't work, while the others like the name of the fill works perfectly. Maybe chatGPT gave the wrong property code?
Meanwhile with big help of my coworker, we found this solution - to use General Libpart Parameters and it works like a charm. So for those who looks for something similar in the future, here they are:
2023-03-15 07:48 PM
Have you tried chatGPT? I don't know GDL, I can't correct it if it's wrong but it's worth a try.
"Yes, in ARCHICAD GDL development, you can use property codes to extract information about the attributes of an object, such as the contour pen, pen of the background fill, and pen of the fill pattern. However, not all properties are available for all objects.
To get the pen of the background fill, you can use the property code "<PROPERTY-B5F6E5A6-5B10-47A6-9B6D-2116C2DC1C89>" in your label's Autotext code. This property code extracts the pen attribute of the background fill. Here's an example of how you could use it:
paragraph "AC_PRG_12" 1, 0, 0, 0, 1
set style "AC_STYLE_1"
"<PROPERTY-B5F6E5A6-5B10-47A6-9B6D-2116C2DC1C89>"
endparagraph
To get the pen of the fill pattern, you can use the property code "<PROPERTY-C66309EA-7B06-46AE-9F8F-33E1567AC107>" in your label's Autotext code. This property code extracts the pen attribute of the fill pattern. Here's an example of how you could use it:
paragraph "AC_PRG_12" 1, 0, 0, 0, 1
set style "AC_STYLE_1"
"<PROPERTY-C66309EA-7B06-46AE-9F8F-33E1567AC107>"
endparagraph
For the contour pen, you can use the "Pen" command in GDL to explicitly define the pen attribute of the object. Here's an example of how you could use it:
Pen(contour_pen)
paragraph "AC_PRG_12" 1, 0, 0, 0, 1
set style "AC_STYLE_1"
"Contour pen: " contour_pen
endparagraph
Note that you would need to define the variable "contour_pen" in your GDL script to hold the value of the contour pen attribute."
2023-03-16 09:12 AM
Thanks for your reply! I didn't try chatGPT, but that's a great idea!
Update:I tried it now those property codes, but it gives back "#".I wonder why it doesn't work, while the others like the name of the fill works perfectly. Maybe chatGPT gave the wrong property code?
Meanwhile with big help of my coworker, we found this solution - to use General Libpart Parameters and it works like a charm. So for those who looks for something similar in the future, here they are:
2023-03-16 09:44 AM
Haha, this is ChatGPT response when I told it was wrong. it's very polite:
"It's possible that the property code you used is incorrect or not applicable for the specific element you are trying to retrieve the value from.
However, as you have discovered, the General Libpart Parameters provide a better solution to get the information you need about the fill and its properties. These parameters are specifically designed for use in GDL scripts and provide a wide range of information about the fill, including line type, fill type, building material name and index, and the pens of the fill and its background.
So, using these parameters would be a better approach to get the information you need about the fill and its properties."
2023-03-16 10:19 AM
haha 🙂 i also asked ChatGPT to generate list of lib part parameters for a fill. Also not correct 🙂
"Certainly! Here is a list of common libpart parameters for fill in ArchiCAD GDL:
These parameters can be used in libpart objects to specify the fill properties of an object. Depending on the type of fill, some of these parameters may not be applicable. For example, FILL_PATTERN and FILL_GRADIENT are only relevant when FILL_TYPE is set to "Pattern" or "Gradient", respectively."