Results 1 to 4 of 4

Thread: inserting xref from command line

  1. #1
    Active Member
    Join Date
    2015-09
    Posts
    72
    Login to Give a bone
    0

    Default inserting xref from command line

    is there a way to inserting a xref from command line without having to pick the file

  2. #2
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: inserting xref from command line

    If you really mean "without selecting a file in the dialog box" then yes.

    (setvar 'FileDia 0)
    (command "._-XRef" ...)
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  3. #3
    AUGI Addict alanjt's Avatar
    Join Date
    2008-02
    Posts
    1,141
    Login to Give a bone
    0

    Default Re: inserting xref from command line

    "-xref" still works.

  4. #4
    Certifiable AUGI Addict irneb's Avatar
    Join Date
    2015-11
    Location
    Jo'burg SA
    Posts
    4,512
    Login to Give a bone
    0

    Default Re: inserting xref from command line

    Yes, but you'll need to set FILEDIA=0 first ... as Robert's explained. Even if you don't use LISP (command ...) calls, you'll still need the FILEDIA=0 otherwise the file select dialog will open.

    The hyphen (minus) prefix is supposed to force command line version of any command. There is 2 "official" exceptions:
    1. If the command uses a file open / save dialog somewhere further along the course of completion (e.g. the 2nd dialog of XREF), the File Dialog will still open. The FILEDIA sysvar controls this.
    2. If a block is inserted using -INSERT and contains attributes, then the Attribute Entry dialog opens just after insertion. The ATTDIA sysvar controls this one.
    There are some commands which simply don't have any form of command line equivalents, but they're usually some of the newer stuff (e.g. the command DATALINK which manages links to Excel spreadsheets does not have a -DATALINK command line equivalent). Or addons such as Express Tools, e.g. -SUPERHATCH doesn't work.

    Then of course, remember to turn FILEDIA (and/or ATTDIA) back to 1, otherwise stuff like OPEN will ask for the filename at the command line.
    Knowledge is proportional to experience, but wisdom is inversely proportional to ego!
    My little bit of "wisdom": Hind-sight is useless, unless used to improve the next forethought!

Similar Threads

  1. 2014: inserting detail items by typing name into command line
    By fmplatt530 in forum AutoCAD General
    Replies: 7
    Last Post: 2015-09-14, 11:21 PM
  2. Replies: 15
    Last Post: 2007-04-12, 06:44 AM
  3. Replies: 2
    Last Post: 2007-04-11, 06:11 AM
  4. Replies: 1
    Last Post: 2007-02-23, 08:06 PM
  5. Replies: 1
    Last Post: 2006-12-19, 07:24 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •