Author Topic: Help : sent back a list of layers  (Read 644 times)

0 Members and 1 Guest are viewing this topic.

mhy3sx

  • Newt
  • Posts: 120
Help : sent back a list of layers
« on: April 05, 2023, 10:03:55 AM »
Hi, I am trying to set back a list of layers but something is missing. Can any one help ??


Code - Auto/Visual Lisp: [Select]
  1. (defun c:test (/ ssb)
  2. (command "_.Tilemode" 1) ; To model space
  3.  (if (setq ssb ((ssget "_x" (list (8 . "0,lay1,lay2,lay3,lay4")))))
  4.    (command "._draworder" ssb "" "_b")
  5.  )
  6.  (princ)
  7. )
  8.  
  9.  

Thanks

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: Help : sent back a list of layers
« Reply #1 on: April 05, 2023, 10:28:50 AM »
Compare the following mods with your firstly posted.
Code - Auto/Visual Lisp: [Select]
  1. (defun c:test (/ ssb)
  2. (command "_.Tilemode" 1) ; To model space
  3.  (if (setq ssb (ssget "_x" (list '(8 . "0,lay1,lay2,lay3,lay4"))))
  4.    (command "._draworder" ssb "" "_b")
  5.  )
  6.  (princ)
  7. )

mhy3sx

  • Newt
  • Posts: 120
Re: Help : sent back a list of layers
« Reply #2 on: April 05, 2023, 11:59:30 AM »
Thanks Tharwat

Tharwat

  • Swamp Rat
  • Posts: 710
  • Hypersensitive
Re: Help : sent back a list of layers
« Reply #3 on: April 05, 2023, 01:15:24 PM »
Thanks Tharwat
You're welcome anytime.