Trying to import contents of a drawing by typing the name of the file

Trying to import contents of a drawing by typing the name of the file

Anonymous
Not applicable
3,358 Views
10 Replies
Message 1 of 11

Trying to import contents of a drawing by typing the name of the file

Anonymous
Not applicable

Hey everyone...Newbie to the AutoCAD forum here...

 

Quick question...is there a way that I can:

 

1. While in the AutoCAD Model space, type the name of an AutoCAD file (like typing in a command)

2. Press enter and have the contents of that file imported into the Model space of the current drawing.

 

I know about the import command but since I constantly do importing of files I would like to know if there is an easier way of importing all the contents of another file into the current model workspace.

 

Any help will be greatly appreciated.

 

Kind Regards,

David

0 Likes
Accepted solutions (1)
3,359 Views
10 Replies
Replies (10)
Message 2 of 11

pendean
Community Legend
Community Legend
No, it doesn't work like that: try using INSERT or XREF commands instead, usage explained in HELP.

IMPORT is for file-type conversion functions.



Message 3 of 11

maratovich
Advisor
Advisor

May be it will help you: https://youtu.be/GsYc75VIATs

---------------------------------------------------------------------
Software development
Automatic creation layouts and viewport. Batch printing drawings from model.
www.kdmsoft.net
0 Likes
Message 4 of 11

TheCADnoob
Mentor
Mentor
Accepted solution

There are several way to get the content in. it just depends on how you want to do it/what parts you need. If its blocks you need i would look into creating a tool palette. 

 

If you are literally just bringing in other files i would look into opening Design Center  ( ADC ) on a Pallet and navigate to your files and just click and drag files from there. They come in as a block but you can easily explode them. 

 

CADnoob Design Center.gif

CADnoob

EESignature

Message 5 of 11

rkmcswain
Mentor
Mentor

This could be done with autolisp, but there would be some restrictions. In order to be able to type in a string that matches a drawing name like "my house", there would have to be a function named this, *prior* to you typing this in.

 

So where would your autolisp code get the list of drawing names you *might* type in? If you have a directory defined in which all of your potential block inserts would come from, then it's possible for the autolisp code to iterate this directory, gather all of the drawing names, and build a lisp function on the fly for each one to insert this drawing upon execution of the function with the same name as the drawing. 

 

You'd also have do some extra work to accommodate spaces in file names and perhaps other "gotchas". So, it's a lot of work, and there are so many ways to insert content, that this is probably not feasible.

 

 

0 Likes
Message 6 of 11

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> While in the AutoCAD Model space, type the name of an

>> AutoCAD file (like typing in a command)

You can use command

-INSERT

(the dash means .. no file dialog, so ready to type in the filename in the command line)

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
Message 7 of 11

Kent1Cooper
Consultant
Consultant

@Alfred.NESWADBA wrote:

....You can use command

-INSERT

(the dash means .. no file dialog, so ready to type in the filename in the command line)

....


 

Be aware that if you want to just type the file name in that scenario, the drawing needs to be in a folder location that is in your Support File Search Path list  [OPTIONS command, Files tab].  If not, you'll need to type it in with the file path included.

Kent Cooper, AIA
Message 8 of 11

Bob_Zurunkle
Advisor
Advisor

To expand on this a bit, I keep similar blocks inside container drawings so the palette icons can be grouped the same way. For example, I have steel beam profiles inside a container drawing called Steel, and the palette tab for those is also called Steel.

If by some odd chance my nattering was useful -- that's great, glad to help. But if it actually solved your issue, then please mark my solution as accepted 🙂
0 Likes
Message 9 of 11

Anonymous
Not applicable

Thanks for all the help guys...I think the tool palette will help me out a lot...

I gave it a try but there's one problem...

When I'm taking my blocks out of the tool palette to but them in a drawing...they are very very small...

When I open the file with the blocks and copy them (ctrl+c) from the file and paste them (ctrl+v) into a drawing...they are pasted as the correct size...

 

something seems to be up with the scale...does anyone know what this can be?

0 Likes
Message 10 of 11

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> When I'm taking my blocks out of the tool palette to

>> but them in a drawing...they are very very small..

Looks like the source drawing has different setting in the UNITS dialog than your current dwg-file?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 11 of 11

Anonymous
Not applicable

Ok, so the problem was the Insertion Scale...It's sorted...Thanks again Smiley Happy

 

0 Likes