Turn off / freeze layer in XREF

chowluca
edited December 2019 in 2D Drafting

Hallo

apologies if this is a simple question but I do not seem to be able to find an answer in the forums:

1) is it possible to turn off / freeze a layer in an XREF file and vice versa turn it back on ?

thanks

Luca

Comments

  • James Maeding
    edited December 2019

    If you mean with layoff, no, it grabs the whole xref.
    Instead I put this together:
    (DEFUN C:XLO ( / lay) (PRINCM "\nXref layer off")
    (WHILE (princ (strcat "\nTurned off " (setq LAY (cdr (assoc 8 (entget (car (NENTSEL "\nSelect item: "))))))))(command "-layer" "of" LAY ""))(princ))

    If you are new to lisp, what you do is copy that code and put in a text file, name it "Key-Ins.lsp".
    Put that in a folder, maybe on desktop, call it "My Tools"
    To get warmed up, load that .lsp by hand by dragging in from explorer. Type XLO to run.
    Now, for real life, make a text file called "On_doc_load_default.lsp", the name must be exact.
    What will happen is that file gets loaded automatically when you open a drawing.
    In that text file, put the line
    (load "Key-Ins.lsp")
    Now put "On_doc_load_default.lsp" also in My Tools Folder.
    That "My Tools" folder must be in your bricscad "support paths", and at the top of the list.
    Click the item in pic below in options.
    add your My Tools path at top.
    Then start new session of bcad and the XLO will be loaded.
    Try that and I can feed you a million more nice key-ins, as well as the real tool I use for dealing with xref layers.
    To summarize:
    1) make key-ins.lsp and put XLO code in it
    2) add the (load "key-ins.lsp") to your startup routine "On_doc_load_default.lsp"
    3) add the folder those both are in to support paths, at top
    thx

  • Please take another look at the _LayOff command. It has two settings.

  • oh, I thought that was in there, just blanked.
    Cool.