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

No EditorInput.PromptRectangleOptions ?

1 REPLY 1
Reply
Message 1 of 2
Anonymous
230 Views, 1 Reply

No EditorInput.PromptRectangleOptions ?

Hi,

I am working with the EditorInput. Since there are no PromptRectangleOptions or PromptPolyline options, I tried to do my best with two points. So here is my code:

---------------------------------
PromptPointResult ppr = ed.GetPoint("\nSpecify first corner of rectangle:");
if (ppr.Status != PromptStatus.OK) return;
Point3d startPt = ppr.Value;

PromptPointOptions ppo = new PromptPointOptions("\nSpecify opposite corner: ");

ppo.BasePoint = startPt;
ppo.UseBasePoint = true;
ppr = ed.GetPoint(ppo);
if (ppr.Status != PromptStatus.OK) return;
Point3d endPt = ppr.Value;
---------------------------------

It's "working" but I don't want a rubber band line to appear between the two points, I would like to see a rectangle between startPt to my mouse pointer just like when someone draws a regular rectangle. Do I have to use an event and draw it myself ?
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

Change this line:
ppr = ed.GetPoint(ppo);
on this one:
ppr = ed.GetCorner(ppo);
Hth

~'J'~

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