Author Topic: Selection Sets  (Read 2540 times)

0 Members and 1 Guest are viewing this topic.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Selection Sets
« on: February 22, 2006, 04:52:27 PM »
Are they stored in the drawing or are the local to the session.  If I create a selection set < Selection Set: 3 >  If I close the drawing and reopen it will it still be availible?

What are the effacts of creating selections set of the same objects over and over?
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright 2016

sinc

  • Guest
Re: Selection Sets
« Reply #1 on: February 22, 2006, 05:04:34 PM »
Selection sets are created as they are used, and exist only in memory.  They are not persisted anywhere.

But you can only have a maximum of (I think) 127 selection sets at one time.  So, you should make sure you free up selection sets you don't need.  If you use SSGET, then all you have to do is set the variable to nil when you are done (or use a local variable for the selection set).  If you use Active X, delete the selection set when you are done.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Selection Sets
« Reply #2 on: February 22, 2006, 05:18:24 PM »
OK so if I have a function Like this:

Code: [Select]
(defun CREATE_SELSET (/ HandleList NewSet X)

(setq NewSet (ssadd))
(setq HandleList (GET_HANDLE_LIST (GET_XRECORD "TGS_SSETS" (nth SSet(GET_KEYS  "TGS_SSETS")))))
(foreach X HandleList
(setq NewSet  (ssadd (handent X) NewSet))
)
NewSet
)

Which create a selections set of handles stored in an Xrecord.  I wouldn't have to worry?
ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright 2016

CAB

  • Global Moderator
  • Seagull
  • Posts: 10369
Re: Selection Sets
« Reply #3 on: February 22, 2006, 08:04:02 PM »
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

sinc

  • Guest
Re: Selection Sets
« Reply #4 on: February 23, 2006, 11:03:15 AM »
OK so if I have a function Like this:

...

Which create a selections set of handles stored in an Xrecord.  I wouldn't have to worry?

If all you are doing is storing handle in Xdata, then using the list of handles to recreate selection sets, it looks like it should work.  Keep in mind that you list of handles may be out-of-date - objects regularly get created and destroyed.  Break a line, and your old handle is no longer valid.

There is some question about why you are doing this.  It sounds like you are trying to use selection sets to mimic the functionality of a group.  So why not just use a group?

There is no danger in using a group, just so long as you realize you are using a group, and not a block.  Groups have their uses, and blocks have their uses.  Some of these uses sort-of overlap, but Groups are Groups and Blocks are Blocks.  The only time I really see people get into trouble is when they don't know the difference, and try to work with a group as if it is a block.

TimSpangler

  • Water Moccasin
  • Posts: 2010
  • CAD Naked!!
Re: Selection Sets
« Reply #5 on: February 24, 2006, 09:19:54 AM »
Thanks CAB. 

That is were this post kind of sprung from.  I am revamping an old routine.

Sinc
What I am attempting to do is to store selections sets between drawing sessions.  My next step is to check the handles to makesure that they still exsist before recreating the selections set.  I just wanted to make sure that i would run into any problems creating these selection sets.

Thanks guys.

ACA 2015 - Windows 7 Pro
All Comments and Content by TimSpangler, Copyright 2016