I cannot restrict the selection to exactly crossed entities using ssget "c"

This widget could not be displayed.

I cannot restrict the selection to exactly crossed entities using ssget "c"

Anonymous
Not applicable

When using:

 

(ssget "c" (polar Entity_Insert_Point 1.58825 9)(polar Entity_Insert_Point 1.55334 9)(list (cons 0 "LWPOLYLINE") (CONS 8 "GT_2") (CONS 43 0.25)))

 

If the area is zoomed to the selection, works as expected, nil in this case. If zoomed to extents, close entities are selected in error. I am sure there is a variable to restrict this behaviour, just not sure which one.

 

Help appreciated.

 

 

0 Likes
Reply
Accepted solutions (2)
1,735 Views
29 Replies
Replies (29)

CodeDing
Advisor
Advisor

@Anonymous,

 

In a case like this it sounds like your OSNAPS might be causing your problem. Make sure they are turned off and try again.

 

Best,

~DD


Need AutoLisp help? Try my custom GPT 'AutoLISP Ace':
https://chat.openai.com/g/g-Zt0xFNpOH-autolisp-ace
0 Likes

Anonymous
Not applicable

Thank you, but osmode is set to 0.

 

It is almost as if AutoCAD is setting a width to the crossing area edges, rather than a width of zero. I believe there must be a variable setting buried somewhere in the program.

0 Likes

CodeDing
Advisor
Advisor

@Anonymous,

 

I couldn't personally find any variables. Perhaps a work-around would be to create a named view in your code then zoom to that named view when selecting your object(s), then you could revert back to your previous view if you'd like also. (just save that view first). Wish I could help more!

 

Best,

~DD


Need AutoLisp help? Try my custom GPT 'AutoLISP Ace':
https://chat.openai.com/g/g-Zt0xFNpOH-autolisp-ace
0 Likes

Anonymous
Not applicable

I thought about zooming to the entities, but that tends to slow down the process, don't want the users to get bored waiting Smiley Happy

0 Likes

DannyNL
Advisor
Advisor

Can you give more information (post example drawing) of what you are trying to do with this selection method and what needs to be selected?

 

0 Likes

Anonymous
Not applicable

We have DXF files saved from another program.

 

The content of the DXF's is composed of LWPOLYLINES and TEXT only.

 

The project demands strict adherence to the client CAD Standard, including the use of standard blocks for section marks, details marks etc. component parts of what should be blocks are identified by their layer, entity type, lineweight, font, text content, length, whatever makes an entity unique.

 

Once an entity is identified, other components are identified by selecting them using the crossing option with generated points.

 

When the drawing is viewed by extents, the crossing parameter selects entities that are close by, but not actually crossed. When zoomed to the area of the "de-constructed" symbol, the crossing works as expected.

 

Is there some sort of fuzz factor that can be adjusted using a variable?

0 Likes

DannyNL
Advisor
Advisor

Not that I know of. But it's hard to 'debug' without an example drawing so we're able to test ourselves why and how.

 

But without the example drawing and with you stating that OSMODE is set to 0, I would recommend to try to set OSNAPCOORD to 1 as well. This variable controls when object snaps are applied and when not. With the value set to 1 you make sure that any coordinate input through keyboard or script is precise without applying any object snaps at all.

0 Likes

hak_vz
Advisor
Advisor

When using (ssget "C" .....) Only objects visible in the drawing area at the time of selection will be selected by this method.

 

 

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes

Anonymous
Not applicable

Exactly, hence the zoom extents.

0 Likes

Anonymous
Not applicable

Thanks, I'll give that a try.

 

 

0 Likes

ВeekeeCZ
Consultant
Consultant

@hak_vzwrote:

When using (ssget "C" .....) Only objects visible in the drawing area at the time of selection will be selected by this method.

 


True, unless you're using 2018 where is that effected by the SELECTIONOFFSCREEN sysvar.

0 Likes

Anonymous
Not applicable

Please see the attached

0 Likes

hak_vz
Advisor
Advisor

Since your crossing window in (ssget "C") is very narrow (a line) why don't you try 

 

(ssget "F" (polar Entity_Insert_Point 1.58825 9)(polar Entity_Insert_Point 1.55334 9)(list (cons 0 "LWPOLYLINE") (CONS 8 "GT_2") (CONS 43 0.25)))

Miljenko Hatlak

EESignature

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
0 Likes

DannyNL
Advisor
Advisor

Ok, drawings are opening fine, thanks.

But what objects are you trying to select with the ssget?

0 Likes

Anonymous
Not applicable

ssget "F" doesn't appear to be valid.

0 Likes

Anonymous
Not applicable

Specifically in Section A, there is a section bubble referring to Section A 00001-1 where Entity_Insert_Point is (220.537 72.148 0.0), you'll see the arrow is pointing in the wrong direction.

0 Likes

DannyNL
Advisor
Advisor

"F" for Fence should be valid, but you probably will need to supply a points list instead of two separate points.

 

http://help.autodesk.com/view/ACD/2018/ENU/?guid=GUID-0F37CC5E-1559-4011-B8CF-A3BA0973B2C3

0 Likes

DannyNL
Advisor
Advisor

The coordinate you provide in your post is located at the red arrow on the left, while the section bubble is in the red rectangle.

And the points you calculate for your crossing within your SSGET statement are just 9 units separated from the insertion point (while distance from insertion point to bubble is over 5500mm), so I do not understand what it is that you are trying to select with the SSGET. Did I overlook and miss something? 

 

2018-03-13_14-41-43.jpg

0 Likes

Anonymous
Not applicable

Sorry the dwg version has been scaled up, the co-ordinates relate to the dxf, pre-processing.

0 Likes