controlling text rotation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-01-25 05:00 PM
1. Change the rotation of the text so it reads from the bottom of the page when the object rotation is >0. I assume I can use ><= with a range if numbers in an IF/THEN, arrangement to add some rotation adjustment around the anchor point, but if anyone knows a better way, please let me know.
2. How to properly make use of the stw string function. My txt_adj isn't coming up with the proper amount - see the attached screenshot. Per the code:
Define Style txt "Arial", txt_sz, 5, 0
txt_adj=.5*STW(mkr_ID)/1000*A_
Pen txt_pen
ADD2 0, 12"+txt_adj !!!!12" moves the origin to the outside of the receptacle
Style txt
rot2 90
Text2 0, 0, mkr_id
Shouldn't 1/2 the stw put the origin of the text in the proper spot so that when the text is entered, the edge of the text reaches back to the 12" mark? It appears to be starting the text left justified as is I was using 4 instead of 5 for my anchor point.
If this email isn't clear, I'll try to explain further, but I hope its obvious what I'd like to accomplish. Any help would be appreciated!
Wes

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-01-25 05:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-01-25 06:08 PM
Wouldn't I still want to get the text in the right spot (using gdl) to begin with? I'm trying to reduce the work people have to do - if they have to enter text and then drag it around everytime, they might as well just use an actual text element. I agree that having it movable is good so one could account for oddities in the plan - it just has to start in the "right" place by default.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-01-25 06:49 PM
DEFINE Style txt "Arial", txt_sz, 5, 0
SEt STYLE txt
txt_adj=.5*STW(mkr_ID)/1000*A_
Pen txt_pen
ADD2 0, 12"+txt_adj !!!!12" moves the origin to the outside of the receptacle
rot2 90
Text2 0, 0, mkr_id

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-01-25 07:05 PM
Weston wrote:Try this:
yeah, I agree - but I have yet to be able to get a graphical hotspot to work, even following the GDL manual. I'll try grabbing code from another part, perhaps.
Wouldn't I still want to get the text in the right spot (using gdl) to begin with? I'm trying to reduce the work people have to do - if they have to enter text and then drag it around everytime, they might as well just use an actual text element. I agree that having it movable is good so one could account for oddities in the plan - it just has to start in the "right" place by default.
HOTSPOT2 txtA, 0, 4, txtB, 1+128 HOTSPOT2 txtA, -1, 5, txtB, 3 HOTSPOT2 txtA, txtB, 6, txtB, 2 HOTSPOT2 0, txtB, 7, txtA, 1+128 HOTSPOT2 -1, txtB, 8, txtA, 3 HOTSPOT2 txtA, txtB, 9, txtA, 2 TEXT2 txtA, txtB, subTextI am the Hotspot King... I have graphic hotspots in so many places my staff complains about anything that does not have them....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-01-25 07:21 PM
F. wrote:DUH... Thanks, FB.
Without testing it, but the DEFINE defines the style. The STYLE sets the style. If you want to measure the text, you have to set the style before!
Now I can try to tackle the rotation and the graphical hotspot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-01-25 08:39 PM
TomWaltz wrote:so how does this work? check script gives me "txtA isn't a valid parameter name". Do I have to define those variables somewhere first?
Try this:HOTSPOT2 txtA, 0, 4, txtB, 1+128 HOTSPOT2 txtA, -1, 5, txtB, 3 HOTSPOT2 txtA, txtB, 6, txtB, 2 HOTSPOT2 0, txtB, 7, txtA, 1+128 HOTSPOT2 -1, txtB, 8, txtA, 3 HOTSPOT2 txtA, txtB, 9, txtA, 2 TEXT2 txtA, txtB, subText
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-01-25 10:26 PM
DEFINE Style txt "Arial", txt_sz, 5, 0 SET STYLE txt txt_adj=.5*STW(mkr_ID)/1000*A_ Pen txt_pen ADD2 0, 12"+txt_adj !!!!12" moves the origin to the outside of the receptacle rot2 90 ! Y-direction HOTSPOT2 txtA, 0, 4, txtB, 1+128 HOTSPOT2 txtA, -1, 5, txtB, 3 HOTSPOT2 txtA, txtB, 6, txtB, 2 ! X-direction HOTSPOT2 0, txtB, 7, txtA, 1+128 HOTSPOT2 -1, txtB, 8, txtA, 3 HOTSPOT2 txtA, txtB, 9, txtA, 2 TEXT2 txtA, txtB, mkr_idThis should work and give you a hint.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-01-26 03:15 PM
I have the part working with fixed text from the proper origin, or with the movable hotspot starting at 0,0, but I can't get the code above to move the default origin and then let the user modify the hotspot. The spot is green as if the program would let me move it, but the pet pallette does not give me the option.
Any thoughts? Thanks for the help so far!
Wes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2006-01-26 04:28 PM