Jump to content

Upgraded LayIso


Lee Mac

Recommended Posts

I'm not 100% sure, but more than likely the LAYISO command is not avaliable in AutoCAD 2002, which is why its unknown. I don't have 2002 tho, so I can't verify

LayIso didn't become core until 2008.

r14 - Bonus Tool

2000-2007 - Express Tool

2008-up - Core

Link to comment
Share on other sites

LAYISO use in CAD2002 - Express tools.

But the routine does not run.

Because it will only run if LAYISO is CORE, not an Express Tool (LISP routine).

Link to comment
Share on other sites

  • 2 weeks later...
I have one more request for the multiple layer version one... Is it possible to add the option to type "l" for the prompt and have it select the last created entity, kinda like how "stock" AutoCAD commands work?

 

I think my previous question was over looked, so I figured I'd try to bump it.

Link to comment
Share on other sites

The Selection process is not via ssget, but an imitation of it - however, this could be achieved I think :)

Last is allowed in entsel/nentsel style selections.

Link to comment
Share on other sites

  • 4 weeks later...

The "layer isolate" function was one of those utils i always wanted to redo properly but i never got around to finishing it to my standards however, i just took a look through some of my old routines and i did find one of my "attempts" from way back when. Would you care to compare notes (Mine is fairly old but i would be willing to offer it up against your newer version)? *grin*

Link to comment
Share on other sites

This posting inspired me to learn some DXF coding and work out an XREF Layiso Command. Feel free to give any comments or improvements.

 

Thanks

 

;xiso
;By: L Rut
;08-10-2010
;V1.0
(defun xsel ()
 (setq a (nentsel))
 (setq b (length a))
   (if (= b 4)
    (progn
     (setq #nset (car a))
     (setq #nent (entget #nset))
     (setq #entset (last a))
     (setq #entlength (length #entset))
     (repeat (- #entlength 1)
(setq #entset (cdr #entset))
)
     (setq #entname (car #entset))
     (setq #ent (entget #entname))
     (setq #entlist (cdr (assoc 2 #ent)))
     (setq #enttblsrch (tblsearch "block" #entlist))
     (setq #enttbl (cdr (assoc 1 #enttblsrch)))
      (if (/= #enttbl nil)
 (progn
   (setq #nlayer (cdr (assoc 8 #nent)))
   (setq #xlay #nlayer)
   )
 (progn
   (princ
       "\nNot an XREF")
     (princ)
   )
 )
     )
    (progn
     (princ
       "\nNot an XREF")
    (princ)
    )
   )
)


(defun c:xiso (/ #obj #nset #nent #nlayer #nlaylst #nlay)
 (layerstate-delete "_xiso_tmp")
 (layerstate-save "_xiso_tmp" 255 viewportId)
 (setq a T)
 (while (/= a nil)
   (xsel)
   (setq #nlaylst (append #nlaylst (list #nlayer)))
   )
 (command "-layer" "off" "*" "y" "")
 (foreach #nlay #nlaylst (command "-layer" "on" #nlay ""))
 (princ)
)

(defun c:xuniso ()
 (layerstate-restore "_xiso_tmp" viewportId)
 (command "regenall")
 (princ)
)

Link to comment
Share on other sites

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...