We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Door Marker Creation

Anonymous
Not applicable
Hi all!

I've been trying to create a new door marker, or alter an existing one, but haven't had much luck so far. Basically, I'm looking to create a door marker that shows two lines of text (I've searched the boards, and have found some, but haven't beena able to get those to work). The first line of text should be the Door ID number, or a Door Type. The second line should be separated by a line, and that number should show the Door Hardware. I'd even settle for having a second line of custom text that will show there. Can anyone help?

Thanks!!
33 REPLIES 33
TomWaltz
Participant
OH great, another Virginia Tech Grad.... (we have like 6 of them....)

Let me ask: what has been wrong with what you have done? Did you want the line length to match the text length?

Here are a few general tips in the mean time:

1) Draw what you want at 1:1 scale. This will make scaling it MUCH easier.
2) Put text in that you can easily swap out in the object.
3) Some people differ with me here, but I usually avoid the new RichText in my objects, and replace it with the older TEXT2. It's much easier to deal with.
Tom Waltz
Anonymous
Not applicable
Tom,

Up to this point, I've simply been trying to copy and paste different things in the GDL editor...but I've never been much good at coding.

Are you saying that I can actually draw what I want the marker to look like, and turn that into a symbol? I'm not too familiar with creating custom markers...I've never had to do it before.

Thanks.
TomWaltz
Participant
Your case is one of the simplest to do as an object from scratch. Yes, you can draw this at 1:1 scale, and it's best if you center it on 0,0 (maybe the mid-point of the line between the two lines of text).

Be sure to make the text Center-justified so it will expand outward in both directions. Also, place Hotspots where you want to be able to have insertion points for your label.

Once you have done that, you can select the text and line, click File > GDL Objects > Save as Object.... and give it a name.

Open the Object by clicking File > GDL Objects > Open Object...

1) First thing is to make its Hotspots behave:
In the Object Editor, Click "Details." Unclick :"Hotspots on Bounding Box" and click OK. This will make only the Hotpots you placed active in the object.

2) Next, we make this into a Door Marker :
In the Object Editor, Click "Select Subtype". Browse through the tree to find: General GDL Object > Drawing Symbol > Marker > Window - Door Marker
Click on "Window - Door Marker", then click "Select"
This creates tons of parameters in your object, but you will probably not need them. We can deal with them later (or perhaps use them)

3) Next, we clean up the 2D Script (time to roll up your sleeves and get dirty):
First, let's make it scale sensitive:
In the Object Editor, Click "2D Script"
Change the line that starts "MUL2" to read:
MUL2 GLOB_SCALE, GLOB_SCALE
This will make your marker scale sensitive.

4) Now, let's make the top line format properly and read the element's ID:
You should have a sequence that looks something like this:
DEFINE STYLE{2}    "AC_STYLE_1" "Tekton Pro", 8'-1.1758",      0

PARAGRAPH		"AC_PRG_3"      1, 0'-0.0000", 0'-0.0000", 0'-0.0000", 3'-3.3701"
    PEN        164
    SET STYLE "AC_STYLE_1"
        "TEXT 1"
ENDPARAGRAPH
TEXTBLOCK		"AC_TEXTBLOCK_3" 35'-4.0122",      8, 0'-0.0000", 3'-3.3701", 3'-3.3701", 3'-3.3701", 
        "AC_PRG_3"
RICHTEXT2		0'-0.0000", 0'-0.0000", "AC_TEXTBLOCK_3"
change it to read:
DEFINE STYLE    "AC_STYLE_1" "Tekton Pro", 8'-1.1758",   5,   0
TEXT2		0,0, GLOB_ID
The critical change is to add the "5" and remove the {2} in the DEFINE STYLE line, delete the rest, and add the TEXT2 line at the end.

For neatness, I like to change the 0'-0.0000" numbers to just 0, but it's not necessary.

What these lines really do is format your text to your font, size, and justification (DEFINE STYLE) then place 2D text (TEXT2) at 0,0, and it reads the global ID from your door or window.

Want to try that and see if you want to try adding a parameter for your own custom text ? I'll talk you through, itf you want.

If you want, we can also add parameters for pen settings, fonts, etc.
Tom Waltz
Anonymous
Not applicable
Thanks, Tom!

I'll give this a go, and hopefully I'll get it to work.
Anonymous
Not applicable
Tom,

I've been able to get the shape of the marker, but that's about all I've managed to do. I made the changes to the code as you wrote, but when I placed it in a door, the marker came out quite large (when drawing it, should I be drawing it as 1 inch to 1 inch scale, and put in a 3 point font?), and the place holder text I put in was not in the area of the marker I wanted. Also, it didn't recognize the door ID number. It simply shows the place holder text I put in.

To have it read the hardware number, and show it below the Door ID, do i follow similar steps?
TomWaltz
Participant
SwissHokie wrote:
Tom,

I've been able to get the shape of the marker, but that's about all I've managed to do. I made the changes to the code as you wrote, but when I placed it in a door, the marker came out quite large (when drawing it, should I be drawing it as 1 inch to 1 inch scale, and put in a 3 point font?), and the place holder text I put in was not in the area of the marker I wanted. Also, it didn't recognize the door ID number. It simply shows the place holder text I put in.

To have it read the hardware number, and show it below the Door ID, do i follow similar steps?
If you can copy/paste your 2D script, I'll take a look at it.
Tom Waltz
Anonymous
Not applicable
I've been playing around a bit more...but haven't had much luck. Here's what i've tried so far:

!
! Name : WSA Marker.gsm
! Date : Monday, March 20, 2006
! Version : 9.00
! Written by ArchiCAD
!

MUL2 GLOB_SCALE, GLOB_SCALE
ADD2 0'-1.8592", 0'-0.6314"
PEN 3
HOTSPOT2 0'-0.0000", 0'-0.0000"
HOTSPOT2 -0'-0.1250", 0'-0.0000"
HOTSPOT2 0'-0.0000", 0'-0.1250"
HOTSPOT2 0'-0.0000", -0'-0.1250"
HOTSPOT2 0'-0.1250", 0'-0.0000"
LINE_PROPERTY 0
LINE2 -0'-0.1250", 0'-0.0000", 0'-0.1250", 0'-0.0000"
CIRCLE2 0'-0.0000", 0'-0.0000", 0'-0.1250"
DEFINE STYLE "AC_STYLE_1" "GraphMM_374 RG 523 NO", 1'-1.8889", 5, 0
TEXT2 0,0, GLOB_ID

PARAGRAPH "AC_PRG_14" 2, 0'-0.0000", 0'-0.0000", 0'-0.0000", 3'-3.3701"
"HDWRE"
ENDPARAGRAPH
TEXTBLOCK "AC_TEXTBLOCK_14" 6'-5.4675", 1, 0'-0.0000", 3'-3.3701", 3'-3.3701", 3'-3.3701",
"AC_PRG_14"
RICHTEXT2 -0'-1.8592", 0'-0.5422", "AC_TEXTBLOCK_14"
TomWaltz
Participant
oops....
TEXT2 0,0, GLOB_ID
should read
STYLE "AC_STYLE_1"
TEXT2 0,0, AC_WIDO_ID 
Sorry, I slipped up that this is a "Marker" not a "Label" (requiring AC_WIDO_ID instead of GLOB_ID), and I neglected the important "Set STYLE to what we defined" command. (this is what I get for working from memory instead of the manual).

This being a "Marker" not a "Label", I should warn you now that you will have a lot of problems with rotations. I find the Label tool much more reliable.

I also think that you may need to alter the "0,0" part to move your text further up into the bubble, perhaps 0,1/16" or so (you will need to experiment, or you can check to see how far it was in your original drawing). On the quick test I did for myself, I did not have a circle enclosing my marker, just two lines of text with a line between them (more like a Zone)
Tom Waltz
Anonymous
Not applicable
GREAT!

I've managed to get two lines of text! Now, how do I tell it to insert the hardware information? Also, how do I code it so that I can move the marker position; drag it around to where I want it to be?

Is there a coding reference book?