.NET

.NET

Reply
Valued Contributor
dynamicscope
Posts: 95
Registered: ‎04-04-2012
Message 1 of 2 (125 Views)
Accepted Solution

How could I prompt a line entity from the user?

125 Views, 1 Replies
08-16-2012 06:57 PM

How could I prompt a "two points" line entity from the user?

Something similar to " Editor.GetPoint() " ??

 

I was trying to use Editor.GetPoint() method two times. But this option does not show the preview of a line.

I also tried a combination of

 

doc.SendStringToExecute("line ");

db.ObjectAppended += new ObjectEventHandler(LineAppended);

 

but this option triggers LineAppended event handler as soon as I create the first point of a line. So it does not help.

 

Would there be a better way?

Look at the PromptPointOptions. It allows you to specify a Basepoint, and whether to use it, so you get the drag line when picking a second point.

*Expert Elite*
Jeff_M
Posts: 4,521
Registered: ‎07-22-2003
Message 2 of 2 (121 Views)

Re: How could I prompt a line entity from the user?

08-16-2012 07:11 PM in reply to: dynamicscope

Look at the PromptPointOptions. It allows you to specify a Basepoint, and whether to use it, so you get the drag line when picking a second point.

Jeff_M, also a frequent Swamper
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.