cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

Editing objects

2raarchitecture
Contributor

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.

2RA Building Workshop
www.2rabldgworkshop.com

Mac Mini. Apple M1. 8 GB. macOS Monterrey. 12.4. ArchiCAD 25. 4013 USA Full
1 ACCEPTED SOLUTION

Solution

2raarchitecture:

 

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

David Maudlin / Architect

www.davidmaudlin.com

Digital Architecture

AC26 USA • iMac 27" 4.0GHz Quad-core i7 | 24 gb ram • MacBook Pro 2.8GHz | 16 gb ram • OSX10.15.7

View solution in original post

12 REPLIES 12

2raarchitecture
Contributor

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?

2RA Building Workshop
www.2rabldgworkshop.com

Mac Mini. Apple M1. 8 GB. macOS Monterrey. 12.4. ArchiCAD 25. 4013 USA Full

Solution

2raarchitecture:

 

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

David Maudlin / Architect

www.davidmaudlin.com

Digital Architecture

AC26 USA • iMac 27" 4.0GHz Quad-core i7 | 24 gb ram • MacBook Pro 2.8GHz | 16 gb ram • OSX10.15.7

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?

2RA Building Workshop
www.2rabldgworkshop.com

Mac Mini. Apple M1. 8 GB. macOS Monterrey. 12.4. ArchiCAD 25. 4013 USA Full

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"
2RA Building Workshop
www.2rabldgworkshop.com

Mac Mini. Apple M1. 8 GB. macOS Monterrey. 12.4. ArchiCAD 25. 4013 USA Full

I figured out how to change the text location, but I am also trying to figure out how to change its size

2RA Building Workshop
www.2rabldgworkshop.com

Mac Mini. Apple M1. 8 GB. macOS Monterrey. 12.4. ArchiCAD 25. 4013 USA Full

2raarchitecture:

 

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

 

David Maudlin / Architect

www.davidmaudlin.com

Digital Architecture

AC26 USA • iMac 27" 4.0GHz Quad-core i7 | 24 gb ram • MacBook Pro 2.8GHz | 16 gb ram • OSX10.15.7

Lingwisyer
Champion

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
Self-taught, bend it till it breaks.
Win10 | E5620 x 2 | 24GB | K2200 RIP PSU
Win10 | R5 2600 | 16GB | GTX1660

2raarchitecture
Contributor

Thank you kindly for your feedback. I did look at both comments. It works now! Thank you!

2RA Building Workshop
www.2rabldgworkshop.com

Mac Mini. Apple M1. 8 GB. macOS Monterrey. 12.4. ArchiCAD 25. 4013 USA Full

2raarchitecture:

 

Good to know you were able to get the code to work, thanks for posting back.

 

David

David Maudlin / Architect

www.davidmaudlin.com

Digital Architecture

AC26 USA • iMac 27" 4.0GHz Quad-core i7 | 24 gb ram • MacBook Pro 2.8GHz | 16 gb ram • OSX10.15.7

2raarchitecture
Contributor

Please, if you may kindly share more resources regrading GDL scripting, I would be very thankful for it. 

2RA Building Workshop
www.2rabldgworkshop.com

Mac Mini. Apple M1. 8 GB. macOS Monterrey. 12.4. ArchiCAD 25. 4013 USA Full

Just search here for "How do I learn GDL" and you will find plenty of post with suggestions.

 

Barry.


One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

Thank you Barry!

2RA Building Workshop
www.2rabldgworkshop.com

Mac Mini. Apple M1. 8 GB. macOS Monterrey. 12.4. ArchiCAD 25. 4013 USA Full

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!