BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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

Graphical hotspots / paper space = frustration!

derekjackson
Advocate
Hi folks,
I'm trying to put together an object that combines graphical hotspots with the option for the user to pick a size by paper or model space.

It's a marker that gives a coordinate readout where its placed, but allows the user to move the readout away from the actual point, using a graphical hotspot.

This works absolutely fine in model space - the user can define the point and font size, and happily move it to where they want.

When it's set to paper space, the point and font sizes work okay, but the distance between the two doesn't taken into account the scale calculation. Therefore, as the user changes between different scales on their views, the text appears to jump around closer and further away from the point.

I obviously need to incorporate the scale calculation (distance*A_) somewhere into the graphical hotspot, but I'm stumped as to where. With the code here, the graphical hotspot seem to lock up and not let me move it:
IF (spac = s1) THEN    ! Paper space
	textxs = textx*A_   ! Scale up text coordinates
	textys = texty*A_

	hsid=hsid+1
	HOTSPOT2 0,textys,	hsid,textxs,1+128
	hsid=hsid+1
	HOTSPOT2 textxs,textys,	hsid,textxs,2
	hsid=hsid+1
	HOTSPOT2 -1,textys,	hsid,textxs,3
	
	hsid=hsid+1
	HOTSPOT2 textxs,0,	hsid,textys,1+128
	hsid=hsid+1
	HOTSPOT2 textxs,textys,	hsid,textys,2
	hsid=hsid+1
	HOTSPOT2 textxs,-1,	hsid,textys,3

	ADD2 textxs,textys    ! Move origin to start placing text
	
ELSE    ! Model space
	hsid=hsid+1
	HOTSPOT2 0,texty,	hsid,textx,1+128
	hsid=hsid+1
	HOTSPOT2 textx,texty,	hsid,textx,2
	hsid=hsid+1
	HOTSPOT2 -1,texty,	hsid,textx,3
	
	hsid=hsid+1
	HOTSPOT2 textx,0,	hsid,texty,1+128
	hsid=hsid+1
	HOTSPOT2 textx,texty,	hsid,texty,2
	hsid=hsid+1
	HOTSPOT2 textx,-1,	hsid,texty,3

	ADD2 textx, texty
ENDIF
If I put the scale calculation after the hotspot, then the hotspot stays at model space but moves the text at the paper scale....

Any ideas where I'm going wrong?
2 REPLIES 2
Anonymous
Not applicable
I have tried similar things and gave up. I could get things to partly work but the feedback wouldn't match the intent (or other things would be wrong). I'm not sure it is possible to get an acceptable result.

Despite the seemingly simple mathematical relationship, paper/model space issues are very complex.
ztaskai
Graphisoft Alumni
Graphisoft Alumni
Just three little tips, I'd like to share.

1st, read Ralph's excellect summary in the parallel thread: http://archicad-talk.graphisoft.com/viewtopic.php?p=178332#178332

2nd, look into the object 'North Symbol 14' in the ArchiCAD Library. I always use it as a reference when making new objects like that.

3rd, you can edit only the model-size parameters via hotspots but you have to use the up-to-date parameter value for placeing the hotspots whichever it may be at the moment...

Regs,
Zsolt Táskai
ArchiCAD Development - GDL Team
AC13, AC14 and upwards...
Learn and get certified!