.NET

Reply
Active Contributor
Posts: 48
Registered: ‎07-22-2012
Message 1 of 3 (124 Views)

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

124 Views, 2 Replies
07-26-2012 01:36 PM

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!

ADN Support Specialist
Posts: 349
Registered: ‎05-22-2006
Message 2 of 3 (108 Views)

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

07-26-2012 08:51 PM in reply to: pva75

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

 

Cheers,

Stephen Preston
Autodesk Developer Network
Active Contributor
Posts: 48
Registered: ‎07-22-2012
Message 3 of 3 (106 Views)

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

07-26-2012 09:42 PM in reply to: StephenPreston

Thanks a lot, Stephen!

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you interested in helping shape the Autodesk Community?
We’re looking at a few different ways to improve the “All Forums” landing page and need your feedback! If interested, please take a few minutes to fill out the following Usability Study. Thank you for your time!

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community