Jump to content

Import multiple dwgs into drawing as individual blocks


supermonkey

Recommended Posts

Hi all,

 

My work have recently "upgraded" to Autocad LT 23 from an older full Autocad & as a result, I can no longer run my time saving Lisp routines.

 

We use a third party program which exports several dwg files per job. I had been using lisp to insert each dwg file as a block in my drawing, all spaced out along a row (eg block chart or insertblks).

 

Is there a way to do this without lisp? Everything i've found would mean importing one at a time.

 

Thanks

  • Like 1
Link to comment
Share on other sites

Changing to say Bricscad would have been a better move.

 

Anyway you could maybe do something in excel its very easy to copy a column of commands to the command line.

 

image.png.7802b17bb5b74af7edeae07898c5889a.png

  • Like 1
Link to comment
Share on other sites

thanks both for your replies.

 

I agree about Bricscad having used it in the past, but I am not in charge!

 

The spreadsheet idea is a good one - but the insert command just brings up the blocks paellete. I'm not sure how I reference the dwg file & it's path?

 

I've tried the following with no luck:

insert "C:\\USERS\\USER\\DESKTOP\\DRAWING.DWG" "0,0" 1 1 0

insert "C:\\USERS\\USER\\DESKTOP\\DRAWING.DWG" pt "" "" ""

-insert;C:\\USERS\\USER\\DESKTOP\\DRAWING.DWG;\;;

Link to comment
Share on other sites

  • 2 months later...

bump as i've still been unable to crack this. 

 

if I move all the files I want to insert into the same folder the main dwg is in, I can insert one at a time from the command line, but I cannot work out how to insert multiple files.

Link to comment
Share on other sites

There are some old DOS tricks that let you make a list of dwg names throw that into excel and edit the -insert should work and as mentioned use dbl backslashes.

 

- insert "d:\\projects 2023\\bigtasks\\For Fred\\dgw1" "0,0" 1 1 0

 

Ok now for some DOS

lower left in windows do CMD the operating sytem will be exposed.

D :

Cd /projects 2023/bigtasks/For Fred

Dir *.dwg >dwglst.txt /b

 

You now have a list of all the dwgs in that directory open text file in excel and use the above -insert method.

Edited by BIGAL
Link to comment
Share on other sites

Thanks, I am ok with generating a list of files. But I cannot work out how to use multiple files in the insert command. If I have to copy and paste the command for each file, it defeats the object as I can already drag them in one by one.

Link to comment
Share on other sites

Ok you have Excel which has VBA as its macro language so there you are can do all sorts of shortcuts like choose dwgs, with explorer style choosing, enter X & Y spacing, then write the column. The -INSERT should work. There is a huge amount of excel macro examples out there should be able to find choose files.

 

Lt should support the copy of a column of rows to command line. Steven-G you out there ?

 

Link to comment
Share on other sites

Thanks, but however I format the command, it only works with a single drawing.

 

Maybe i'm searching for the wrong thing, but I cannot find any examples that help

Link to comment
Share on other sites

Yes it does have the multiple command, but unless I'm missing something I don't think it will save much time:

 

After I've generated a list of the files to import, I'd then use multiple which would prompt for each file.

 

I'd then need to copy the command for each file & paste separately.

 

Link to comment
Share on other sites

XATTACH or XREF allows multiple selection and insert, but at 0,0 for all AFAIK. Works for me when I have drawings with the items at different distances from 0,0.

 

I would take the time to do it individually, the company cheaped-out and went to LT, nothing you can do really.

 

Maybe, do a monthly of full AutoCAD when you need to use LISP.

Link to comment
Share on other sites

I don’t know if your missing something I thought LT would support copy and paste of multiple lines, your column in excel must be just that 1cell is 1 line of insert command.

 

-insert mydwg1 “0,0” 1 1 0

-insert mydwg2 “100,100” 1 1 0

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...