PDA

View Full Version : Text Rotation



rad.77676
2005-09-22, 09:49 PM
Does anyone know how to query object data text "roadnames" so that they come in aligned to the roadway, not all rotated to zero.
Rob

Jmurphy
2005-09-30, 09:03 PM
Watch for word wrap but try this expression as the rotation value.

"(angtos (- (/ pi 2) (atan (/ (/ (if (> .y1 .y2) (- .x1 .x2) (- .x2 .x1)) .length) (sqrt (- 1 (expt (/ (- .x1 .x2) .length) 2)))))))"

rad.77676
2005-10-03, 04:01 PM
Thanx J,
I found this on the acaddiscussion site and It has no effect.
Maybe I'm doing something wrong?
I tried pasting it into the Alter Properties, Text Value, Rotation Box with no effect.
I also tried Alter Prop, Rotation with no results.
Any suggestions?
Rob

Jmurphy
2005-10-03, 11:43 PM
I'll double check the expression when I get back to the office (where MAP is installed) You didn't included the quotes " " did you?

Jmurphy
2005-10-04, 12:58 PM
I checked and it works in Map3D 2005 here's a copy of the orginal message from the Map News Group where I got it from. Make sure the layer, text size, and text styles are set to where you can see the results also.

rad.77676
2005-10-04, 04:07 PM
Tested again, it works!
Thanks,
Rob

Glenn Pope
2005-11-29, 08:15 PM
Not sure why but I can't seem to get the expression to work. Every thing comes out at 0 rotation. Also when I go back to edit the template I get errors (Check for possible mismatched data type in the expression.).

Any ideas?

Jmurphy
2005-12-06, 07:44 PM
Word wrap or you're missing a closing ) or the " " are there and not needed.

Glenn Pope
2005-12-06, 08:26 PM
Word wrap or you're missing a closing ) or the " " are there and not needed.
No word wrap, all ")" are accounted for, and no " ".

Jmurphy
2005-12-06, 09:59 PM
I just tried it again and it's not working here now either. ?

Jmurphy
2005-12-06, 10:03 PM
It may in the anno blocks it doesn't work, but in a query alter prop text is does. Wonder why the block anno will not take it.