Author Topic: Multiple layer isolate  (Read 10879 times)

0 Members and 1 Guest are viewing this topic.

TJAM51

  • Guest
Multiple layer isolate
« on: March 17, 2006, 11:51:51 AM »
Is there a lisp that will allow you to isolate multiple layers?


Thanks

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Multiple layer isolate
« Reply #1 on: March 17, 2006, 11:58:58 AM »
There is one with express tools.
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

TJAM51

  • Guest
Re: Multiple layer isolate
« Reply #2 on: March 17, 2006, 12:00:00 PM »
I am using 2002 LT with LT-Extender to run lisp. I do not have express tools.

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Multiple layer isolate
« Reply #3 on: March 17, 2006, 12:09:58 PM »
Maybe something like
Code: [Select]
(defun c:LayIso (/ ss Ent Str LayName)

(setq Str "")
(if (setq ss (ssget))
 (while (setq Ent (ssname ss 0))
  (if (not (vl-string-search (setq LayName (cdr (assoc 8 (entget Ent)))) Str))
   (if (= Str "")
    (setq Str LayName)
    (setq Str (strcase Str ", " LayName))
   )
  )
  (ssdel Ent ss)
 )
)
(if Str
 (command "_.layer" "_set" LayName "_off" "*" "_no" "_on" Str "")
)
(princ)
)

Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

TJAM51

  • Guest
Re: Multiple layer isolate
« Reply #4 on: March 17, 2006, 01:03:57 PM »
The routine did not work....thanks for the effort.



T.Willey

  • Needs a day job
  • Posts: 5251
Re: Multiple layer isolate
« Reply #5 on: March 17, 2006, 01:11:18 PM »
What did it say?
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

TJAM51

  • Guest
Re: Multiple layer isolate
« Reply #6 on: March 17, 2006, 01:32:48 PM »
Select objects:
; error: too many arguments

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Multiple layer isolate
« Reply #7 on: March 17, 2006, 01:36:19 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.

TJAM51

  • Guest
Re: Multiple layer isolate
« Reply #8 on: March 17, 2006, 01:51:29 PM »
Thanks guys...no luck here is the error reading


Pick layers to keep on. Enter when done
; error: no function definition: VLAX-GET-ACAD-OBJECT

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Multiple layer isolate
« Reply #9 on: March 17, 2006, 02:06:23 PM »
Maybe the LTextender will only do Plain Lisp, I seem to remember that.
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.

Exxit

  • Guest
Re: Multiple layer isolate
« Reply #10 on: March 17, 2006, 02:08:22 PM »
TJAM51,

You have got the Extender, and don't use the Express Tools V1-9 :lol:? Search in the www for a download...
L.

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: Multiple layer isolate
« Reply #11 on: March 17, 2006, 02:09:28 PM »
Yep, no ActiveX or (vl-anything)....
Code: [Select]
removed bogus code, next time I'll look more closely at what I'm doing.....
« Last Edit: March 17, 2006, 02:45:20 PM by Jeff_M »

TJAM51

  • Guest
Re: Multiple layer isolate
« Reply #12 on: March 17, 2006, 02:26:59 PM »
Still no work......possibly the LT Extender will not allow it to work...here is the error reading...


Command: LAYISO

Select objects on layer to Isolate:
Select objects: 1 found

Select objects: 1 found, 2 total

Select objects:

Invalid option keyword.
; error: Function cancelled
Enter an option
[?/Make/Set/New/ON/OFF/Color/Ltype/LWeight/Plot/Freeze/Thaw/LOck/Unlock/stAte]:

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: Multiple layer isolate
« Reply #13 on: March 17, 2006, 02:40:30 PM »
Since I don't have LT or LT-Extender it's really hard to say. I know that it works here in Acad2002 & Acad2006.

Try turning off a layer maually at the command line and paste back everything that gets output.

To start the layer command without the Dialog, use :
Command: -layer

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: Multiple layer isolate
« Reply #14 on: March 17, 2006, 02:42:27 PM »
Actually, it will probably give that error if you try to turn off the current layer....

Oh, carp.....
I'm doing it backwards.....disregard my previous code.....
* Jeff_M goes back to drawing board with a fressh cup of coffee......