Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

29 REPLIES 29
SOLVED
Reply
Message 1 of 30
Anonymous
1719 Views, 29 Replies

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

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.

 

 

29 REPLIES 29
Message 2 of 30
CodeDing
in reply to: Anonymous

@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
Message 3 of 30
Anonymous
in reply to: CodeDing

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.

Message 4 of 30
CodeDing
in reply to: Anonymous

@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
Message 5 of 30
Anonymous
in reply to: CodeDing

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

Message 6 of 30
DannyNL
in reply to: Anonymous

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?

 

Message 7 of 30
Anonymous
in reply to: DannyNL

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?

Message 8 of 30
DannyNL
in reply to: Anonymous

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.

Message 9 of 30
hak_vz
in reply to: Anonymous

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.
Message 10 of 30
Anonymous
in reply to: hak_vz

Exactly, hence the zoom extents.

Message 11 of 30
Anonymous
in reply to: DannyNL

Thanks, I'll give that a try.

 

 

Message 12 of 30
ВeekeeCZ
in reply to: hak_vz


@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.

Message 13 of 30
Anonymous
in reply to: DannyNL

Please see the attached

Message 14 of 30
hak_vz
in reply to: Anonymous

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.
Message 15 of 30
DannyNL
in reply to: Anonymous

Ok, drawings are opening fine, thanks.

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

Message 16 of 30
Anonymous
in reply to: hak_vz

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

Message 17 of 30
Anonymous
in reply to: DannyNL

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.

Message 18 of 30
DannyNL
in reply to: Anonymous

"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

Message 19 of 30
DannyNL
in reply to: Anonymous

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

Message 20 of 30
Anonymous
in reply to: DannyNL

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report