Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Graphisoft Community (INT)
- :
- Forum
- :
- Libraries & objects
- :
- Remove quotation mark (inches) from text2

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Pin this post for me
- Bookmark
- Subscribe to Topic
- Mute
- Printer Friendly Page

Master powerful new features and shape the latest BIM-enabled innovations

Libraries & objects

About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Remove quotation mark (inches) from text2

Anonymous

Not applicable

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

2017-03-17 11:13 PM

2017-03-17
11:13 PM

I've tried to figure this out with the gdl reference guide but to no avail.

I'm trying to get rid of the quotation mark. It's either that or I have to add one to the 12. That's easy but I have no interest in doing that. I've included the text2 statement in the attachment. I started with decimal inches which worked fine but not everyone knows their decimals.I would appreciate a push in the right direction.

Thank you,

Doug

1 REPLY 1

Anonymous

Not applicable

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

2017-03-18 08:28 PM

2017-03-18
08:28 PM

So, here's what I came up with. The extra lines in the Master Script are to deal with Archicad's accuracy.

I added a boolean to switch to decimal just in case. Seems to work pretty well.

Master Script:

TOTAL = B*39.370078740157

FRACTION = FRA(TOTAL)

WHOLE_INCHES = TOTAL-FRACTION

SIXTEENTHS = FRACTION/.0625

IF SIXTEENTHS > -1 AND SIXTEENTHS < .5 THEN FRACT = ""

IF SIXTEENTHS > .5 AND SIXTEENTHS < 1.5 THEN FRACT = "1/16"

IF SIXTEENTHS > 1.5 AND SIXTEENTHS < 2.5 THEN FRACT = "1/8"

IF SIXTEENTHS > 2.5 AND SIXTEENTHS < 3.5 THEN FRACT = "3/16"

IF SIXTEENTHS > 3.5 AND SIXTEENTHS < 4.5 THEN FRACT = "1/4"

IF SIXTEENTHS > 4.5 AND SIXTEENTHS < 5.5 THEN FRACT = "5/16"

IF SIXTEENTHS > 5.5 AND SIXTEENTHS < 6.5 THEN FRACT = "3/8"

IF SIXTEENTHS > 6.5 AND SIXTEENTHS < 7.5 THEN FRACT = "7/16"

IF SIXTEENTHS > 7.5 AND SIXTEENTHS < 8.5 THEN FRACT = "1/2"

IF SIXTEENTHS > 8.5 AND SIXTEENTHS < 9.5 THEN FRACT = "9/16"

IF SIXTEENTHS > 9.5 AND SIXTEENTHS < 10.5 THEN FRACT = "5/8"

IF SIXTEENTHS > 10.5 AND SIXTEENTHS < 11.5 THEN FRACT = "11/16"

IF SIXTEENTHS > 11.5 AND SIXTEENTHS < 12.5 THEN FRACT = "3/4"

IF SIXTEENTHS > 12.5 AND SIXTEENTHS < 13.5 THEN FRACT = "13/16"

IF SIXTEENTHS > 13.5 AND SIXTEENTHS < 14.5 THEN FRACT = "7/8"

IF SIXTEENTHS > 14.5 AND SIXTEENTHS < 15.5 THEN FRACT = "15/16"

IF SIXTEENTHS > 15.5 AND SIXTEENTHS < 16 THEN

WHOLE_INCHES = WHOLE_INCHES + 1

FRACT = ""

ENDIF

2D Script:

PEN PEN_COLOR

!!!!!!!!!!!!!!!!!!!!!!!!!CHANGING THE PITCH!!!!!!!!!!!!!!!!!!!!!!!!!!

unID=1000

hotspot2 12", 0, UNID, B,1+128 : unID=unID+1

hotspot2 12", -1, UNID, B,3 : unID=unID+1

hotspot2 12", B, UNID, B ,2 : unID=unID+1

LINE2 0, 0, 0, B

LINE2 0, B, 12", B

HOTSPOT2 0, 0

HOTSPOT2 0, B

DEFINE STYLE "PITCHTEXT1" "ARIEL", 1.75, 5, 0

DEFINE STYLE "PITCHTEXT2" "ARIEL", 1.75, 6, 0

set style "PITCHTEXT1"

TEXT2 6", B+3", "12"

set style "PITCHTEXT2"

IF DECIMAL THEN

TEXT2 -1", B/2, TOTAL

ELSE

IF FRACT = "" THEN

TEXT2 -1", B/2, STR ("%.0pt", WHOLE_INCHES)

ELSE TEXT2 -1", B/2, STR ("%.0pt", WHOLE_INCHES) + " " + FRACT

ENDIF

set fill 16

poly2_b 4, 2, 10, 91,

0,0,1,

0,B,1,

12",B,1,

0,0,1

I added a boolean to switch to decimal just in case. Seems to work pretty well.

TOTAL = B*39.370078740157

FRACTION = FRA(TOTAL)

WHOLE_INCHES = TOTAL-FRACTION

SIXTEENTHS = FRACTION/.0625

IF SIXTEENTHS > -1 AND SIXTEENTHS < .5 THEN FRACT = ""

IF SIXTEENTHS > .5 AND SIXTEENTHS < 1.5 THEN FRACT = "1/16"

IF SIXTEENTHS > 1.5 AND SIXTEENTHS < 2.5 THEN FRACT = "1/8"

IF SIXTEENTHS > 2.5 AND SIXTEENTHS < 3.5 THEN FRACT = "3/16"

IF SIXTEENTHS > 3.5 AND SIXTEENTHS < 4.5 THEN FRACT = "1/4"

IF SIXTEENTHS > 4.5 AND SIXTEENTHS < 5.5 THEN FRACT = "5/16"

IF SIXTEENTHS > 5.5 AND SIXTEENTHS < 6.5 THEN FRACT = "3/8"

IF SIXTEENTHS > 6.5 AND SIXTEENTHS < 7.5 THEN FRACT = "7/16"

IF SIXTEENTHS > 7.5 AND SIXTEENTHS < 8.5 THEN FRACT = "1/2"

IF SIXTEENTHS > 8.5 AND SIXTEENTHS < 9.5 THEN FRACT = "9/16"

IF SIXTEENTHS > 9.5 AND SIXTEENTHS < 10.5 THEN FRACT = "5/8"

IF SIXTEENTHS > 10.5 AND SIXTEENTHS < 11.5 THEN FRACT = "11/16"

IF SIXTEENTHS > 11.5 AND SIXTEENTHS < 12.5 THEN FRACT = "3/4"

IF SIXTEENTHS > 12.5 AND SIXTEENTHS < 13.5 THEN FRACT = "13/16"

IF SIXTEENTHS > 13.5 AND SIXTEENTHS < 14.5 THEN FRACT = "7/8"

IF SIXTEENTHS > 14.5 AND SIXTEENTHS < 15.5 THEN FRACT = "15/16"

IF SIXTEENTHS > 15.5 AND SIXTEENTHS < 16 THEN

WHOLE_INCHES = WHOLE_INCHES + 1

FRACT = ""

ENDIF

PEN PEN_COLOR

!!!!!!!!!!!!!!!!!!!!!!!!!CHANGING THE PITCH!!!!!!!!!!!!!!!!!!!!!!!!!!

unID=1000

hotspot2 12", 0, UNID, B,1+128 : unID=unID+1

hotspot2 12", -1, UNID, B,3 : unID=unID+1

hotspot2 12", B, UNID, B ,2 : unID=unID+1

LINE2 0, 0, 0, B

LINE2 0, B, 12", B

HOTSPOT2 0, 0

HOTSPOT2 0, B

DEFINE STYLE "PITCHTEXT1" "ARIEL", 1.75, 5, 0

DEFINE STYLE "PITCHTEXT2" "ARIEL", 1.75, 6, 0

set style "PITCHTEXT1"

TEXT2 6", B+3", "12"

set style "PITCHTEXT2"

IF DECIMAL THEN

TEXT2 -1", B/2, TOTAL

ELSE

IF FRACT = "" THEN

TEXT2 -1", B/2, STR ("%.0pt", WHOLE_INCHES)

ELSE TEXT2 -1", B/2, STR ("%.0pt", WHOLE_INCHES) + " " + FRACT

ENDIF

set fill 16

poly2_b 4, 2, 10, 91,

0,0,1,

0,B,1,

12",B,1,

0,0,1