GDL prob with text anchor pt rot and maintain text orient

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-08-14 08:53 PM
When I have the text orientation options the anchor point of the text no longer is the same as the graphical hotspots. I tried many ADD2 and ROT2 options for the text location textx and texty with no acceptable results.Can someone point me in the right direction?
! graphical hotspots seripting
!!!!!Text ----------------------------------------
PEN txtpen
IF tr=1 THEN !HORIZONTAL TEXT
ROT2 -symb_rotangle
ENDIF
IF tr=2 THEN ! VERTICLE TEXT
ROT2 -symb_rotangle+90
ENDIF
IF tr=3 THEN !SMART ORIENTATION
mul2 1-2*symb_mirrored,1
IF symb_rotangle>90 AND symb_rotangle<270 THEN
ROT2 180
ELSE
ROT2 0
ENDIF
ENDIF
DEFINE STYLE "symtextstyle" font, 1/(2.83464567)*fontsz, txtanchor, txtFaceCode
SET STYLE "symtextstyle"
TEXT2 textx,texty , switch_text
DEL 1
Architect, Consultant
MacBook Pro Retina, 15-inch Yosemite 2.8 GHz Intel Core i7 16 GB 1600 MHz DDR3
Mac OSX 10.11.1
AC5-18
Onuma System
"Implementing Successful Building Information Modeling"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-08-17 11:39 PM
When I look at the 2D script in your object their is at the end of some of the numbers E-014. What is this?
line2 -0.03182522174242, -0.04636247205929, 0.03182522174242, 0.04636247205929
line2 -0.2759849876579, -5.684341886081E-014, 0.2793487716144, -5.684341886081E-014
arc2 -0.09936532665787, -5.684341886081E-014, 0.08192157583591, 100.5325984305, 325.5325984304
arc2 0.09936532665787, -5.684341886081E-014, 0.08192157583591, 280.5325984305, 145.5325984304
Architect, Consultant
MacBook Pro Retina, 15-inch Yosemite 2.8 GHz Intel Core i7 16 GB 1600 MHz DDR3
Mac OSX 10.11.1
AC5-18
Onuma System
"Implementing Successful Building Information Modeling"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-08-18 11:40 AM
Those weird codes are produced by the ArchiCAD engine...
They appear in the code because I used 2d lines and arcs, and saved them as an object, then copy/pasted them into your object 2d script...
Its a quicker process... once it was just a "Crash test dummy"

I think... When a number like this appears with this code, it's because the ArchiCAD engine avoids coincident nodes in lines and surfaces...
So the engine creates very very small gaps between them to prevent the engine gets crazy... or something like this.
But its just a guess...


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-08-18 02:06 PM
I believe that is scientific notation that indicates that the decimal point is 14 places to the right (the number is actually decimal point, a bunch of zeros, the number before the E-14), such as -0.00000000000005684341886081.
David
www.davidmaudlin.com
Digital Architecture
AC28 USA • Mac mini M4 Pro OSX15 | 64 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-08-18 06:08 PM
and it seems that E-014 is equivalent to +5.684341886081 meters.
Here is the test code:
line2 -0.03182522174242, -0.04636247205929, 0.03182522174242, 0.04636247205929
!!!!line2 -0.2759849876579, -5.684341886081E-014, 0.2793487716144, -5.684341886081E-014
line2 -0.2759849876579, -5.684341886081+5.684341886081, 0.2793487716144, -5.684341886081+5.684341886081
!!!!arc2 -0.09936532665787, -5.684341886081E-014, 0.08192157583591, 100.5325984305, 325.5325984304
arc2 -0.09936532665787, -5.684341886081+5.684341886081, 0.08192157583591, 100.5325984305, 325.5325984304
!!!!arc2 0.09936532665787, -5.684341886081E-014, 0.08192157583591, 280.5325984305, 145.5325984304
arc2 0.09936532665787, -5.684341886081+5.684341886081, 0.08192157583591, 280.5325984305, 145.5325984304
-5.684341886081+5.684341886081 of course
equals zero which is what the autoscripted value should have been.
I believe E-014 has something to do with logarithms and exponents.
In the GDL manual under Transcendental Functions there is a function
EXP (x) that is defined as "Returns the xth power of e (e=2.7182818)"
Peter Devlin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-08-18 07:33 PM
so its becoming hard for him/it to admit that zero is zero... "NO!... zero is -5.684341886081E-014"




- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-08-18 09:08 PM
What still puzzles me is why AC is turning these numbers into Exponentials . Is this typical autoscripting in metric AC? I am unable to reproduce these results when I drag and drop the line-work into a 2D script window; I get just the feet and inches as drawn.
LINE2 0'-0.0000", -0'-6.0000", 0'-0.0000", 0'-6.0000"
Architect, Consultant
MacBook Pro Retina, 15-inch Yosemite 2.8 GHz Intel Core i7 16 GB 1600 MHz DDR3
Mac OSX 10.11.1
AC5-18
Onuma System
"Implementing Successful Building Information Modeling"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-08-18 09:46 PM
I just did an experiment where I set the Working Units & Levels
to Meters then drew a couple of lines one meter long. I then opened
a new library part and dragged and dropped the lines into the 2D
script. The code was in Meters. I then changed the Working Units & Levels
to Feet and Fractional Inches and dragged the same lines into the same
2D script. The code for these lines was in Feet and decimal inches.
So, it seems the units in an auto-scripted object depends on the
units used in the project.
Peter Devlin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-08-18 11:48 PM
I reproduced what you did, setting it on millimeters and then meters and then feet & inches. I didn't get any numbers with exponents, did you?
Architect, Consultant
MacBook Pro Retina, 15-inch Yosemite 2.8 GHz Intel Core i7 16 GB 1600 MHz DDR3
Mac OSX 10.11.1
AC5-18
Onuma System
"Implementing Successful Building Information Modeling"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-08-19 01:34 AM
I'm sorry. I thought you were talking about the units being used
in the script. I did not get values with exponents. I don't think
you will be able to reproduce the code that Paulo got when
he invoked the auto-script mechanism. The auto-script mechanism
gets more screwy in every AC version. I was thinking of asking
Paulo how exactly did he draw the arcs and lines thinking that
maybe he drew them some five Meters below the origin then
dragged them up to the origin before dragging and dropping them
into the 2D script but decided that that should not cause the
strange code. Maybe Paulo can tell us how he managed to get
the auto-script mechanism to write such screwy code.
Thanks,
Peter Devlin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2009-08-19 01:52 AM
I tried moving the lines I drew 463 miles away from the origin to get the exponents to kick in, but perhaps not far enough.
(in millimeters)
LINE2 746274.7836314, 560996.1281125, 746275.0884134, 560996.1281125
I don't know what the period in the middle of each x and y coordinate signifies.
Architect, Consultant
MacBook Pro Retina, 15-inch Yosemite 2.8 GHz Intel Core i7 16 GB 1600 MHz DDR3
Mac OSX 10.11.1
AC5-18
Onuma System
"Implementing Successful Building Information Modeling"