Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Lisp to attach xrefs can't get past xref dialogue box

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
The_Caddie
2400 Views, 6 Replies

Lisp to attach xrefs can't get past xref dialogue box

Hi were using AutoCAD 2012,

 

Im trying to insert an x-ref using lisp the lisp works fine till I come up to the "attach External Reference"dialogue box how do I automate the dialogue box options to be taken along with in the lisp?

 

(defun C:test()

			(setq MYPOINT MYDIST1)
			(setq MYPOINT (getpoint "\nselect an insertion point"))

(command "x-ref" "attach" "C:/ICT/AutoCAD_Architecture_suite_2012/CUSTOM/TREADSTONE/XREFS/GEBERIT/650-270-00-1.dwg" "650-270-00-1" "A" MYDIST1 "" "")

)

 

6 REPLIES 6
Message 2 of 7
pbejse
in reply to: The_Caddie

(command "_-xref" ....

Message 3 of 7
The_Caddie
in reply to: pbejse

I'm sorry i cant get futher then the following:

 

(defun C:test4()

			(setq MYPOINT MYDIST1)
			(setq MYPOINT (getpoint "\nselect an insertion point"))

(command "_-xref" "attach" "C:/ICT/AutoCAD_Architecture_suite_2012/CUSTOM/TREADSTONE/XREFS/GEBERIT/650-270-00-1.dwg" "" MYDIST1 )

)

  then it all goes pear shaped with warings of Xref "650-270-00-1" has already been defined?

 

actually skip that i se where I'm getting the hickup from. i cant workout though why it wont accept my scale input? which i want to have as standard a scale of 1:1??

Message 4 of 7
pbejse
in reply to: The_Caddie


@The_Caddie wrote:

I'm sorry i cant get futher then the following:

 

  then it all goes pear shaped with warings of Xref "650-270-00-1" has already been defined?

 

actually skip that i se where I'm getting the hickup from. i cant workout though why it wont accept my scale input? which i want to have as standard a scale of 1:1??

 


(defun C:test4  ()
      (setq MYPOINT (getpoint "\nselect an insertion point"))
      (command
            "_-xref"
            "attach"
            "C:/ICT/AutoCAD_Architecture_suite_2012/CUSTOM/TREADSTONE/XREFS/GEBERIT/650-270-00-1.dwg"

            "_Scale"
            "1"
            MYPOINT
            "")
      )

 

Whats the deal with the variable MYDIST1?

 

EDIT: i see now MYDIST1 variable is the scale

(defun C:test4  ()
      (setq MYPOINT (getpoint "\nselect an insertion point"))
      (command
            "_-xref"
            "attach"
            "C:/ICT/AutoCAD_Architecture_suite_2012/CUSTOM/TREADSTONE/XREFS/GEBERIT/650-270-00-1.dwg"
            "_Scale"
            MYDIST1
            MYPOINT
            "")
      )

 

Message 5 of 7
mikecharbel
in reply to: pbejse

hello , how to add insertion coordinates to this lisp routine ?

thank you

Message 6 of 7
bhull1985
in reply to: mikecharbel

(setq MYPOINT (list X Y Z))

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Please use code tags and credit where credit is due. Accept as solution, if solved. Let's keep it trim people!
Message 7 of 7
mikecharbel
in reply to: bhull1985

that works , thanks a lot

sorry but where i can mark (accept as solution) ? 😛

i cant find it

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost