We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2022-07-05 05:56 AM
Thank you for your time and attention. I am working on electrical layouts and the roofs for this residence are steep. I would like to have a better way to see it so I may edit. Please, I want to edit the electrical symbols, which are library objects, to do two things:
1. Include a 3D morph that I can see in the 3D window
2. Show the object's ID. I am going around it by adding a label later, yet it's another element to edit.
Again your time is very valuable and I appreciate your feedback. Best regards.
Solved! Go to Solution.
2022-07-05 01:26 PM
A simple line of code to display the element's ID via the 2D Script is:
Text2 0, 0, GLOB_ID
You should add a Signature to your Profile (click the Profile button near the top of this page) with your Archicad version and operating system (see mine for an example) for more accurate help in this forum.
David
2022-07-05 06:14 AM
I am starting with a 2D rather than a 3D object. I have changed the 2D Symbol for a 3D library part before, and this is new. This other object does have script for text, and I wonder if it could match the object's element ID instead. Would you know the script for this, please?
2022-07-05 01:26 PM
A simple line of code to display the element's ID via the 2D Script is:
Text2 0, 0, GLOB_ID
You should add a Signature to your Profile (click the Profile button near the top of this page) with your Archicad version and operating system (see mine for an example) for more accurate help in this forum.
David
2022-07-10 04:13 AM
David,
Thank you! I am attempting this line of code next. Will you please let me know about more codes I can give a try?
2022-07-10 06:41 AM - last edited on 2022-07-11 11:03 AM by Laszlo Nagy
David,
Thank you for your line of code.
Please, allow me to ask for further help. I am trying to write the code to change the text size and location. Code below
!
! Name : RECESSED Exterior Downlight.gsm
! Date : Tuesday, October 16, 2018
! Version : 22.00
! Written by Archicad
!
mul2 A/0.289280, B/0.289160
add2 65'-11.0782", -51'-5.5596"
set line_type lineTypeAttribute_1
pen penAttribute_1
fill fillAttribute_1
poly2_b{5} 5, 3, 0, 3, penAttribute_2, penAttribute_3,
0'-0.0000", 0'-0.0000", 3'-3.3701", 0'-0.0000", 0'-0.0000", 3'-3.3701", 0'-0.0000",
-65'-11.0782", 52'-4.9439", 1,
-65'-11.0782", 51'-5.5596", 1,
-64'-11.6892", 51'-5.5596", 1,
-64'-11.6892", 52'-4.9439", 1,
-65'-11.0782", 52'-4.9439", 1
pen penAttribute_2
line_property 0
Text2 0, 0, GLOB_ID
circle2 -65'-5.3713", 51'-11.2486", 0'-4.5973"
2022-07-10 06:54 AM
I figured out how to change the text location, but I am also trying to figure out how to change its size
2022-07-10 03:35 PM
To control the text's font, size, etc. you ned to do two things, in this order.
1. Define the text style:
DEFINE STYLE name font_family, size, anchor, face_code
See the GDL Reference Guide for an explanation of this command. These parameters could be hard coded or parametric.
2. Then set the text style:
[SET] STYLE name_string
This sets the style of the subsequent text, an object can use multiple text styles if they have been defined in the code.
Thanks for adding your signature.
David
2022-07-11 03:34 AM - edited 2022-07-11 03:38 AM
If you are not wanting the text to scale to your view, divide ac_textsize_1, or what every parameter you are using for text size by GLOB_SCALE.
Ling.
AC22-23 AUS 7000 | Help Those Help You - Add a Signature |
Self-taught, bend it till it breaks | Creating a Thread |
Win11 | i9 10850K | 64GB | RX6600 | Win10 | R5 2600 | 16GB | GTX1660 |
2022-07-12 11:04 AM
Thank you kindly for your feedback. I did look at both comments. It works now! Thank you!
2022-07-12 11:22 AM
Please, if you may kindly share more resources regrading GDL scripting, I would be very thankful for it.