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?