Lisp to insert multiple drawings in one master drawing

Lisp to insert multiple drawings in one master drawing

Hans_Knol
Advocate Advocate
467 Views
4 Replies
Message 1 of 5

Lisp to insert multiple drawings in one master drawing

Hans_Knol
Advocate
Advocate

Hi, I'm looking for a lisp file that is be able to insert multiple drawings into a drawing, select drawings to insert will be the best option. they me be inserted on 0,0, but not exploded

 

hope that someone has a lisp like this and want to share it.

Hans Knol
0 Likes
468 Views
4 Replies
Replies (4)
Message 2 of 5

baksconstructor
Advocate
Advocate

You can use additional modules.
But since it is forbidden to give links to other sites here, I will write the name - AutoImportCAD. You will find it on the Internet yourself.

0 Likes
Message 3 of 5

DGCSCAD
Collaborator
Collaborator

You could roll your own using Mr Mac's Get Files Dialog: https://www.lee-mac.com/getfilesdialog.html

 

...then apply a Foreach to the list.

AutoCad 2018 (full)
Win 11 Pro
0 Likes
Message 4 of 5

jreidKVSUZ
Advocate
Advocate

You could use XREF to bring in as many files at one time as you want at 0,0.

 

Then once they are all in the drawing, use XREF then select them all and then select BIND INSERT. This will bind the drawings into your drawing as Blocks like you requested. Move them around as needed and explode them or edit them like blocks.

 

They will all now be in your drawing as block and keep their own layers. Same applies if layers are the same and one has the layer off and one has the layer on… what ever one came into your drawing first will be the controller of the layer.. so if a drawing has layer 1 off, then any drawing with that layer name will be off as well.

 

Do not use XREF BIND BIND. You will get $$ between the FILE NAME and the LAYERS that are inside the drawing.

 

Hope this helps!  If so, please hit that Solution Solved button.

Thanks,

JRR!

0 Likes
Message 5 of 5

DGCSCAD
Collaborator
Collaborator

The attached has been minimally tested, but works. To start out in a different directory, change:

 

(if (setq ins_files (LM:getfiles "Select Drawings to Insert" "" "dwg"))

 

 

..to:

 

(if (setq ins_files (LM:getfiles "Select Drawings to Insert" "c:\\yourdirectory\\yoursubdirectory" "dwg"))

 

AutoCad 2018 (full)
Win 11 Pro
0 Likes