No EditorInput.PromptRectangleOptions ?

No EditorInput.PromptRectangleOptions ?

Anonymous
Not applicable
385 Views
1 Reply
Message 1 of 2

No EditorInput.PromptRectangleOptions ?

Anonymous
Not applicable
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 ?
0 Likes
386 Views
1 Reply
Reply (1)
Message 2 of 2

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

~'J'~
0 Likes