Isolate Xref layer

Discussion in 'AutoCAD' started by GaryDF, Jun 21, 2004.

  1. GaryDF

    GaryDF Guest

    Does anyone have a routine to isolate an xref layer by
    picking it? Can't find one in express.

    This one doesnot work for xrefs:
    (defun C:ISO (/ EN LAY)
    (setq
    EN (nentsel

    "\n* Select an object on the Layer to be Isolated: *"
    )
    )
    (setq LAY (entget (car EN)))
    (setq LAY (cdr (assoc 8 LAY)))
    (command ".layer" "off" "*" "y" "on" LAY "")
    (prompt
    (strcat "\n* Layer \"" LAY "\" has been ISOLATED. *")
    )
    (princ)
    )

    Gary
     
    GaryDF, Jun 21, 2004
    #1
  2. GaryDF

    Tim Guest

    Try This

    ;XRISO.lsp Tim Wilson
    ;Isolates Xref Layer
    ;
    (defun c:xriso(/ LAY PIK STR )
    (setq pik (nentsel "\nSelect an item on XREF to Isolate: "))
    (setq lay (assoc 8 (entget (car pik))))
    (setq str (cdr lay))
    (command "-layer" "off" "*" "y" "")
    (command "-layer" "ON" str "" )
    (prompt (strcat "\nLayer " str " Is Now Isolated."))
    (princ)
    );defun

    Tim W.
     
    Tim, Jun 21, 2004
    #2
  3. GaryDF

    GaryDF Guest

    Thanks...works great.

    Gary

    )))))))
    (o)-(o)
    -----oo0---(_)---0oo--------------------------
    | | | | | | | | | | | |
    | | | | | | | | | | | |
     
    GaryDF, Jun 21, 2004
    #3
  4. GaryDF

    om_gc Guest

    Hi
    While trying your lisp, it works for some drawings and didn'tt work for other.. Does it matter with size of drawing?? I'm working on a big one and it says "Invalid option keyword". What does this message mean

    Thanks
     
    om_gc, Sep 22, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.