GDL
About building parametric objects with GDL.

zone stamp anchor?

__archiben
Booster
can anyone tell me if there is a way of defining an anchor point for zone stamps?

i've modified a zone stamp to be scale sensitive, but it keeps jumping around. anchoring it along the top instead of the middle would sort things out . . . but i can't find a way of doing that in the script or the zone settings . . . am i missing something, or will this have to be done through working it all out long hand based on the returned text height calculations . . .

~/archiben
b e n f r o s t
b f [a t ] p l a n b a r c h i t e c t u r e [d o t] n z
archicad | sketchup! | coffeecup
9 REPLIES 9
LiHigh
Newcomer
In order to help, I'll need to look at the script.....
Howard Phua

Win 10, Archicad 19 INT
Rob
Graphisoft
Graphisoft
Ben,
that depends on your code.
I could not find any specific globals for the zone tool so try SYMB_POS_X, SYMB_POS_Y globals if they are not affected by scale changing.
However, I would need to see your script to give you the final answer I suppose...
::rk
Frank Beister
Advisor
Ben.

I tried (and "have done") it before. The objects origin is depending of the dropping position of the stamp text. Its position to project zero is changing, if you move the position of the text or of the whole stamp by drag and drop. SYMB_POS_X / Y is a good hint. It could be possible to "store" the first position, before any moving of the text into a parameter of this object by a

IF NOT(positionX OR positionY) THEN PARAMETERS positionX=SYMB_POS_X, positionY=SYMB_POS_Y

command. Now you could move the text by a graphical hotspot depending of the scale. Text output would be always related to positionX / Y + hotspot-translations. If you move the text by the normal drag and drop, it would stay then.

BUT: This does not work. In parameter script context PARAMETERS command does work, but unfortunately SYMB_POS_X and SYMB_POS_Y are always 0. I have complained this more than once. Last time to GS a few moth ago in hope they will change this anytime. But so far I do not see any secure way to get scale dependent positioning of objects. I "solved" it by exclusive usage of graphical hotspots. No normal moving of the zone stamp text allowed. Needs discipline.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Anonymous
Not applicable
5 years later I have the same issue. I use Zone_Stamp_2 16 that allows you to make your zone stamp scale sensitive. Pretty cool except for the "jumping around" because there is no anchor.
Other solutions or other zone stamps that have an anchor?
Anonymous
Not applicable
OK. I found out that in my case I had to open the Zone_Stamp_16 2 and save it as a new zone stamp. The only thing I had to do was make the offset parameters visible in display. Example: click on the X under display by the parameter "change the offsetY_200". This makes this parameter visible in the zone stamp settings. now I can offset my zone stamps to be placed correct in the different scales.
Johnsly
Contributor

15 years later I having the same problem, but i have zero knowledge of scripting. 

10 years later I having the same problem, but i have zero knowledge of scripting. please help.

AC24

If you are using version 25, then switch to zone labels instead of stamps.

You can add as many labels as you like, in any layer, at any scale.

You can even label zones in sections.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

The zone stamp will have its origin where the user moved it. If you draw symmetrically to the origin, it will be anchored to the middle.

Text is drawn with "paper size" height, but its coordinates are in model space. For scale-independency, you need to transform to paper size.

Illustration:

text2 0,0, "O"

mul2 GLOB_SCALE / 1000, GLOB_SCALE / 1000 ! 1 m model is now 1 mm on paper scale-independently
add2 -5, -5 ! move origin of drawing
line2 0,0,10,10
line2 0,10,10,0
del 2

 

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest