Tutorial: Page (1) of 1 - 01/16/02 Email this story to a friend. email article Print this page (Article printing at MyDmn.com).print page facebook

AutoLISP Tip

SSGET Function By Jos van Doorn
This function only works in the visible viewport of AutoCAD. If you try to make a selection set outside of the visible viewport nothing is found.

Let's make a test. First, set the limits of the drawing from 0.0,0.0 till 420,297. After doing that give the drawing a ZOOM ALL.

Now let's draw a circle outside of the visible viewport. The centerpoint of the circle is at 1000,500. The radius of the circle is 10.

Let's try to make a selections set with the circle. The following statements can be used:

(setq ss (ssget "w" (list 900 400) (list 1100 600)))
(setq ss (ssget "c" (list 900 400) (list 1100 600)))

Nothing is found.

Bring the circle into the viewport. Do a ZOOM EXTENTS and PAN the circle somewhere in the middle of the visible viewport.

Now a selection set is created using the above mentioned statements.

AutoCAD! AutoCAD! This I haven't found in the documentation that comes with AutoCAD. I found it out the hard way.

What can you do about it? Make sure that the entities to be selected are in the visible viewport. Give a ZOOM EXTENTS before using the SSGET function.

Jos van Doorn.is an AutoCAD specialist, AutoLISP programmer and editor of the ACAD newsletter. To subscribe to the FREE newsletter send e-mail to: mailto:acadnewsletter-subscribe@topica.com

He has written six AutoCAD books. Interested in the books. Let him know. Send an e-mail to: mailto:josvandoorn@consultant.com

Page: 1

Related Keywords:AutoCAD, AutoLSP

Content-type: text/html  Rss  Add to Google Reader or
Homepage    Add to My AOL  Add to Excite MIX  Subscribe in
NewsGator Online 
Real-Time - what users are saying - Right Now!

Our Privacy Policy --- @ Copyright, 2015 Digital Media Online, All Rights Reserved