Author Topic: Inserting XREF suppression of XREF insert dialogue box  (Read 2035 times)

0 Members and 1 Guest are viewing this topic.

hyposmurf

  • Guest
Inserting XREF suppression of XREF insert dialogue box
« on: June 07, 2007, 05:08:07 AM »
Hello I can finally slow down a bit,just back from my holiday near Milan. Im trying work out how to insert an XREF to a number of drawings via lisp.What I have come up with so far will
set my XREF layer
bring me to model space
start up the xref dialogue box (I cant get filedia to suppress this box)

Heres my code so far:

Code: [Select]
(defun c:cxr ()
(command "tilemode" "1")
(command "-layer" "new" "TDP-XREF" "set" "TDP-XREF" "colour" "8" "" "")
(command "EXTERNALREFERENCES")
(command "_XATTACH" pause "" "" "")
(princ)
)

The pause part and extra "" arent doing what I want them to.What I want is to be able to suppress the XREF insert dialogue box and specify the XREF to be inserted at 0,0 scale 1 0 degrees rotation etc.I basically need to replace an XREF with another but the XREF being replaced isnt the same in each individual drawing.

Thanks Kerry :wink:

Just added code tags to make it easier to read - jonesy
« Last Edit: June 07, 2007, 06:13:49 AM by jonesy »

jbuzbee

  • Swamp Rat
  • Posts: 851
Re: Inserting XREF suppression of XREF insert dialogue box
« Reply #1 on: June 07, 2007, 07:20:22 AM »
(command "-xref" "_attach" "new block.dwg" "0,0,0" "1" "" "0")
James Buzbee
Windows 8

hyposmurf

  • Guest
Re: Inserting XREF suppression of XREF insert dialogue box
« Reply #2 on: June 07, 2007, 07:37:48 AM »
That was easier than I thought, I was getting too caught up on using the xattach!Thank you I'll give that a go.
« Last Edit: June 07, 2007, 07:53:55 AM by hyposmurf »