Can I align object data text to objects

Can I align object data text to objects

Anonymous
Not applicable
363 Views
2 Replies
Message 1 of 3

Can I align object data text to objects

Anonymous
Not applicable
I have a road network with names.
When I define the query I see an option for text rotation which I set to 0
but I would like to align the names to the roads. Do I have a tool like that
in Map?
JK
Ps: I can load, run, and (maybe) modify a VBA macro but I definitely cannot
write one from scratch
0 Likes
364 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
"JK" wrote in message
news:CA837B96175212C7033283FFA6D8A6BD@in.WebX.maYIadrTaRb...
> I have a road network with names.
> When I define the query I see an option for text rotation which I set to 0
> but I would like to align the names to the roads. Do I have a tool like
that
> in Map?


Hello,

Try the following expression in the Rotation
field of the Define Text Property Alteration
dialog:

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

It is a rather big expression which is likely
to wrap in this message, so be sure to copy it
as one long line into the rotation field.

Limited testing, but it seems to work for
most linear entities (line, pline, arc).

Let us know how it goes-

rdh.
0 Likes
Message 3 of 3

Anonymous
Not applicable
HOW DID YOU DO THAT?!


"Richard D. Howard [Autodesk GIS]" wrote in
message news:7E426BE554F48BA768C98810F41B16E2@in.WebX.maYIadrTaRb...
>
> > I have a road network with names.
> > When I define the query I see an option for text rotation which I set to
0
> > but I would like to align the names to the roads. Do I have a tool like
> that
> > in Map?
>
> Try the following expression in the Rotation
> field of the Define Text Property Alteration
> dialog:
>
> (angtos (- (/ pi 2) (atan (/ (/ (if (> .y1 .y2) (- .x1 .x2) (- .x2 .x1))
> .length) (sqrt (- 1 (expt (/ (- .x1 .x2) .length) 2)))))))
>
> It is a rather big expression which is likely
> to wrap in this message, so be sure to copy it
> as one long line into the rotation field.
>
> Limited testing, but it seems to work for
> most linear entities (line, pline, arc).
>
> Let us know how it goes-
>
> rdh.

KICKASS Richard!
0 Likes