How to get "LINE" with "dxfCode" where "endpoint" is the specified value

How to get "LINE" with "dxfCode" where "endpoint" is the specified value

cj4HG5A
Explorer Explorer
497 Views
3 Replies
Message 1 of 4

How to get "LINE" with "dxfCode" where "endpoint" is the specified value

cj4HG5A
Explorer
Explorer

I know that I can get a line starting at SP by following this code,

                 new TypedValue((int)DxfCode.Operator, "<and"),
                 new TypedValue((int)DxfCode.Start, "LINE"),
                 new TypedValue((int)DxfCode.Operator, "="),
                 new TypedValue((int)DxfCode.XCoordinate, sP),
                 new TypedValue((int)DxfCode.Operator, "and>"),

I want to know how to get a line that endpoint at SP。thank!

0 Likes
Accepted solutions (1)
498 Views
3 Replies
Replies (3)
Message 2 of 4

cuongtk2
Advocate
Advocate
Startpoint of Line dxf code = 10.
Endpoint of Line dxf code = 11.
new TypedValue (11, eP);
0 Likes
Message 3 of 4

_gile
Consultant
Consultant
Accepted solution

Hi,

 

The most complete documentation about selection filters is the AutoLISP one.

 

The following filter will select lines which end point X coordinate is equal to sP X coordinate.

var filter = new SelectionFilter(new[]
{
    new TypedValue(0, "LINE"),
    new TypedValue(-4, "=,*,*"),
    new TypedValue(11, sP)
});

 



Gilles Chanteau
Programmation AutoCAD LISP/.NET
GileCAD
GitHub

Message 4 of 4

cj4HG5A
Explorer
Explorer

Thank you very much!

0 Likes