Jump to content

Recommended Posts

Posted

I have been struggling for hours to get a selection working in lisp only to find that the problem is in the actual dwg file, but I can't see why!

Attached are two dwg's "False" is a collection of lines and "True" is the same collection of lines copied into a new drawing using 0,0 as a base point

but this simple line of code will only work in the "True" drawing can anyone see why that should be? It's driving me mad.

(command "select" "f" "708.925,-599.75" "708.925,-599.95" "")

Even running the select command from the command line with the option "fence" and "end" is failing

False.dwg

True.dwg

Posted (edited)

Just stab in the dark... Check PICKFIRST sys var... IMHO it should be 1... And also check for QAFLAGS undocumented sys var - env var... Experiment with QAFLAGS... After experimenting return it back to 0 - this is necessity if you want CAD to operate normally...

Edited by marko_ribar
Posted
Quote

Caution: Only objects visible in the drawing area at the time of selection will be selected by this method. Consider temporarily zooming to the selection window before performing the selection, and then zoom previous to restore the original screen position.

 

Quote from ssget funciton reference (LM)

 

Posted

Pickfirst=1

QAFLAGS=2

same in both drawings

both drawings "zoom" "extents"

but one fails?

Posted

Strange enough. but when the current vport is set to anything but '2D wireframe' view it fails? Same behavior with SSGET too:

(sssetfirst nil (ssget "_F" '((708.925 -599.75)(708.925 -599.95))))

 

Posted

Thank you ronjonp it's easy when you know how, it does seem odd behavior that you can't select in this way dependant on display mode, but that certainly solves the problem.

Posted
41 minutes ago, steven-g said:

Thank you ronjonp it's easy when you know how, it does seem odd behavior that you can't select in this way dependant on display mode, but that certainly solves the problem.

It's very odd behavior .. I'd even call it a bug! 

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...