Xref - set to defaul overlay instead attachment

Hi

Is there a possibilty in bricscad to set by deafault all new external references insertion to overlay instead to attachment? Global variable , lisp or diffrent way?

Greetings

Comments

  • I don't think there's a setting for that, and I can't get it to work in Lisp (though the real programmers probably can). But this seems to work as a custom menu item:
    -XREF O
    I assume it would work as a toolbar tool also.

    When you execute the command by entering -XREF on the command line you're allowed to specify option letters, including O for Overlay, before picking the file to externally reference. But when I do that in a lisp function -- (defun c:xr () (command "-xref" "o")) -- the function then prompts me for a filename, rather than opening up the file selection dialog box. I 'm sure lisp can open the dialog box, but I don't know offhand how to do it.

  • There is a variable called XREFTYPE that should do just this !
    It controls the default reference type when attaching or overlaying a Xref.

    0 Attachment is set as the default xref type
    1 Overlay is set as the default xref type

    But unfortunately does not seem to work in V20 and V21 either via command line or Lisp
    just type in in command line as any other command XREFTYPE or (setvar "XREFTYPE" 1)

    but as i said it doesn't work , i assume it is propably a bug ???

    It could be that the value can be found and manipulated directly in the registry but i don't know where......

  • James Maeding
    edited October 2020

    ah, the "just need a little different than default" problem for xref attachment.
    I started down that road back in R14, and came up with a tool that replaces the xref command for attach/overlay.
    It does one layer per xref, has settings dialog for defaults like alias (w put a z in front of name), and a function to reset xrefs that were already attached to conform to the tool defaults. That way you can "fix" a drawing someone did not use the tool on.
    I added it to my free tools for acad/bcad that are available from:
    https://drive.google.com/file/d/1mNRNZKcR3KWQ4o2Z9qNhjxsmUk8bWFxf/view?usp=sharing

    be sure to unblock the .net dll in instructions, and turn off secureload if using acad.
    email me with any help needed jmaeding ^ hunsaker ^ com

    through the years, I have done this for almost every acad command used often. I think line, arc, and erase are still original :)
    Kidding, but attending to slicking out acad makes us fly.

  • Have also a look at this thread for lisp alternatives and workarounds...

    https://forum.bricsys.com/discussion/23214/how-to-set-xref-defaults