dallion Posted March 31, 2013 Share Posted March 31, 2013 We can use the DXF Code 10 and 11 to filter entities by X Coordinate in a selection set: (ssget "_X" (list '(0 . "LINE") '(-4 . "<OR") '(-4 . "=") (cons 10 p) '(-4 . "=") (cons 11 p) '(-4 . "OR>") (if (= 1 (getvar 'cvport)) (cons 410 (getvar 'ctab)) '(410 . "Model") ) ) ) This returns a selection set containing all lines with an X Coordinate matching the X Coordinate of point p. The documentation says code 20 and 21 would be the corresponding Y Coordinate and 30 and 31 would be the Z Coordinates, but we get error: bad SSGET list value using those instead of 10 and 11. .NET code similarly throws exceptions when 20 is used. We can see with (entget(car(entsel))) lines don't contain code 20 or 21. What is DXF Code 20, etc. used for? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 31, 2013 Share Posted March 31, 2013 What is DXF Code 20, etc. used for? It is not used. You can filter for Lines in the active space whose start or end point Y value is equal to that of point p by using the following relational filter code (similar for Z value; see the 'Relational Tests' section of the developer documentation). (ssget "_X" (list '(0 . "LINE") '(-4 . "<OR") '(-4 . [color=red]"*,="[/color]) (cons 10 p) '(-4 . [color=red]"*,="[/color]) (cons 11 p) '(-4 . "OR>") (if (= 1 (getvar 'cvport)) (cons 410 (getvar 'ctab)) '(410 . "Model") ) ) ) Quote Link to comment Share on other sites More sharing options...
David Bethel Posted March 31, 2013 Share Posted March 31, 2013 Point values 10 20 and 30 differ when referring to DXFOUT / DXFIN / DXF File operations vs DXF Group 10 in entity data. An external ACSII .dxf file containing a line form 11,8,0 to 17,12,0 would look like this: ENTITIES 0 LINE 5 3E 100 AcDbEntity 8 0 100 AcDbLine 10 11.0 20 8.0 30 0.0 11 17.0 21 12.0 31 0.0 0 ENDSEC Put 10(x) 20(y) 30(z) together to form the entity's Group 10 value. Notice the 11 21 31 follow the same rules, as does any point value that I know of. HTH -David Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.