.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to draw text at Line? How to calc direction for text placed on the line?

2 REPLIES 2
Reply
Message 1 of 3
pva75
376 Views, 2 Replies

How to draw text at Line? How to calc direction for text placed on the line?

I did DrawableOverrule instance and override WorldDraw method.
In this method I have checked:


public override bool WorldDraw(Drawable d, WorldDrawwd)
{
  if (d isLine)
  {
      Line line = (Line)d;


Next I want to draw text placed on the line and I did:

 

   wd.Geometry.Text(line.StartPoint, normal, direction

 

Question is - how to calculate required direction for text that text should be placed on the line? Is it easy way to do it?

 

Thanks!

2 REPLIES 2
Message 2 of 3
StephenPreston
in reply to: pva75

The Line.Delta property returns a vector along the direction of the line.

 

Cheers,

Stephen Preston
Autodesk Developer Network
Message 3 of 3
pva75
in reply to: StephenPreston

Thanks a lot, Stephen!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost