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

How can I use MARKER_HEAD_ROT_MODE in a zone stamp

JGoode
Enthusiast
Hello,

I have a query regarding using MARKER_HEAD_ROT_MODE in my custom zone stamp.

I am trying to make it so that when MARKER_HEAD_ROT_MODE = 2, I have a rotation that removes the workspace rotation.

Here is what I have but it doesn’t seem to work:
rrr = REQUEST ("View_Rotangle", "", textAngle)
if (MARKER_HEAD_ROT_MODE = 2) then
  rot2 -textAngle
endif
How can I make this work? Thanks
ArchiCAD 17, 19, 21 and 23
Windows 8
7 REPLIES 7

kuvbur
Booster
MARKER_HEAD_ROT_MODE work only in Detail, Worksheet and Change Markers
https://gdl.graphisoft.com/reference-guide/marker-parameters

You can create custom Model View Options (https://gdl.graphisoft.com/tips-and-tricks/custom-made-model-view-options-object) with boolean parametr and read it in zone stamp.
https://github.com/kuvbur

JGoode
Enthusiast
So there is no way to know whether it is selected when using a zone stamp from within the GDL?
ArchiCAD 17, 19, 21 and 23
Windows 8

kuvbur
Booster
MARKER_HEAD_ROT_MODE get state of "Marker Angle: Fixed Angle to Screen/Fixed Angle to Model", which is unavailable in ZONE STAMP.
What is the ultimate goal? You can get information about whether an object is in an edit mode (GLOB_PREVIEW_MODE and GLOB_FEEDBACK_MODE), but I don’t quite understand why you need it.
https://github.com/kuvbur

JGoode
Enthusiast
So the situation is that I always want the text to be readable but also stay in the same position relative to the zone (our zone stamp has an additional ability to move the stamp so rotating means the stamp doesn't stay in position)

When the buttons in the zone ("Angle fixed to Screen" and "Angle fixed to Model") are set, they both have a different effect so if it's set to "Angle fixed to Model" I want to minus the rotation of the plan orientation... I hope that makes a little bit of sense
ArchiCAD 17, 19, 21 and 23
Windows 8

kuvbur
Booster
Just rotate after comand ADD
for example
	x = x_mm*PAPER_TO_MODEL
	y = y_mm*PAPER_TO_MODEL
	HOTSPOT2 x, 0, unID, y, 1+128+1024,y_mm: unID=unID+1
	HOTSPOT2 x, y, unID, y, 2+1024,y_mm: unID=unID+1
	HOTSPOT2 x,-1, unID, y, 3+1024,y_mm: unID=unID+1
	HOTSPOT2 0, y, unID, x, 1+128+1024, x_mm: unID=unID+1
	HOTSPOT2 x, y, unID, x, 2+1024, x_mm: unID=unID+1
	HOTSPOT2 -1, y, unID, x, 3+1024, x_mm: unID=unID+1
	
	add2 x, y
	!Rotate after add, before place text
	bRotate = 0
	success = LIBRARYGLOBAL ("Libraryflobals-test", "bRotate", bRotate) !Create Libraryflobals-test with parametr bRotate
	if bRotate then
		textAngle = 0
		rrr = REQUEST ("View_Rotangle", "", textAngle)
		rot2 -textAngle
	endif
https://github.com/kuvbur

JGoode
Enthusiast
Perhaps MARKER_HEAD_ROT_MODE isn't the correct thing to use. Do you know how I can work out whether a Zone Stamp is set to "Angle fixed to Model" ? and is there a way that I can see the "Set Zone Stamp Angle" box in GDL?

thanks
ArchiCAD 17, 19, 21 and 23
Windows 8

kuvbur
Booster
Exemple in attach, may it help
https://github.com/kuvbur

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!