Insert multiple drawing files ( .dwg or .dxf ) to an AutoCAD sheet



Dear Friends,

In case of you want to insert more .dwg or .dxf files in to an AutoCAD sheet, normally it will take more times. When we are using CNC machines mainly we are facing these cases.

I have a solution to solve this…

In here you can generate AutoLISP(.lsp) program to insert multiple drawing files ( .dwg or .dxf ) to an AutoCAD sheet.

Just fill below form and generate your AutoLISP(.lsp) program to insert multiple drawing files.



How to do?.

Distance required between each drawings

Set the drawing base point
For properly work the distance between each drawings, you should follow below..

After you have completed your drawing preparation, you should set left bottom corner of the drawing as the base point of your drawing.

How to do...?
1) Give comment "BASE"
2) Click left bottom corner of your drawing.
3) Save your drawing file


File format

Insert drawing file in axis

Short key comment for run the program in AutoCAD

File name separated by Don't provide unnecessary enter/spaces/comma in the file name







File name: How to copy file name from specific folder?




AutoLISP(.lsp) program for insert files
How to use AoutoLISP (.lsp) Application


Note: All .dwg/.dxf files and your AutoCAD sheet should be in same folder.




 How to do?.



😊Enjoy the solution of "How to add multiple DWG files in same workspace in Autocad?"😊

17 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. FAQ by email: While running this application in autocad is showing error message as "Can't find file in search path or in your current directory"


    Answer,

    Please conform 4 points while using this lisp application.

    1. Close your running autocad software and reopen autocad by using your autocad file to which file you want to insert. Then only your file folder acting as directory folder.
    2. All .dwg/.dxf files (which you want to insert) and your AutoCAD file (to where you want to insert) should be in same folder. (This folder is your directory folder)
    3. Conform your file extension is it .dxf or .dwg (which you want to insert)
    4. Don't provide unnecessary comma or spaces in the file name


    I planed it's video to upload in my youtube channel. It will be soon as possible.

    ReplyDelete
    Replies
    1. https://www.youtube.com/watch?v=UsYgJga-8Q8&t=8s

      Delete
    2. I think if people have .dxf/.dwg already in their list of file names, the program generated gets file names as ".dxf.dxf" or ".dwg.dwg" So you need to mention that list should not contain extensions of files. Can be easily removed by using "Find and Replace" using any text editor.

      Delete
  4. hi kt,

    How can you write a lisp checking for all parts in the folder and opening them at the same time on the sheet without having to name them in the lisp. Just opening all files in that specific folder ?

    ReplyDelete
    Replies
    1. Haai..
      I think there is no solution to insert all files from specific folder as you asked. May this you asked me because if we have to insert more files, This file name typing is very risk and typing mistake also will face. I have a solution for this to solve. Just watch this 2 minute video from my youtube channel

      https://youtu.be/5i54LeyIlfM

      there is shown how to copy file name from specific folder

      Delete
  5. Hi
    I wrote a lisp that i use in bricscad and it worked fine but the problem is that it gets the wrong files to open and i do not find the origin of the problem. I have to save my sheet in the same folder as the files i need. So when this is done i run the script and all parts are picked-up and placed on the sheet in a certain spot. It has always worked. What i see now is that it loads some files that are not in that folder ?? So the dxf are wrong?? How can this happen? Is there some cache memory that needs to be cleared?? Is it because the dxf files always have the same names on each project that it goes wrong ?? If you need to see my script how can u send it to you?

    regards
    Michel

    ReplyDelete
    Replies
    1. Based on my program the files are imported as a block and the block name will be file name which you given for creating program. AutoCAD will not accept different drawing in same name in an AutoCAD work sheet. When you import a file to your worksheet and this block name(file name) is already exist in your work sheet block list, AutoCAD will replace your drawing as per previously created block name.
      And also file will import if this file named block is available in your worksheet block list, even this named file is not available in your directory folder.

      You can use PURGE comment (give PURGE comment, pick block on getting window, click purge) for delete unused block from your work sheet. Then run your program.

      Better is use a new worksheet for importing files, so there will not any name clashes. After import files in a new sheet, you can copy it's to your worksheet where you want to import.

      Delete
  6. Hello Saleej,
    Thank you for your tool. I generate a LISP file with your tool, but it returns me a error!
    Command: II
    # Please visit www.ktsaleej.blogspot.com #
    Pick base point: 0,0
    _insert Enter block name or [?]: HKT907_0403_012_FRAME_REAR_IR4_IT3_IT4_IT9.dwg Block HKT907_0403_012_FRAME_REAR_IR4_IT3_IT4_IT9 references itself
    *Invalid*
    ; error: Function cancelled

    Could you please give me a hint? Thank you.

    ReplyDelete
    Replies
    1. Please conform 3 points while using this lisp application.

      1. Close your running AutoCad software and reopen AutoCAD by using your AutoCAD file to which file you want to insert(open AutoCAD by double clicking on your file). Then only your file folder acting as a directory folder.
      2. All .dwg/.dxf files (which you want to insert) and your AutoCAD file (to where you want to insert) should be in same folder. (This folder is your directory folder)
      3. Conform your file extension is it .dxf or .dwg (which you want to insert) and select it same in above form.

      Delete
  7. Thank you for creating this post!! Your efforts here has saved me hours of drawing time. I want to add a suggestion to the generated code if I may: Add a space between the quotes, currently it copy/pastes as "" when it can run cleaner as " ". The code can still be run as it currently is, but adding the space will let the code run quiet in the command line. o7

    ReplyDelete
  8. Hello
    I use your code
    However when i import several files using your method, i have problem with scale! First imported dwg is fine, but rest of them have scaled dimensions , how to solve it? Thank you

    ReplyDelete
    Replies
    1. Adding to above question, also i couldn't make more than 19 sheets. does it have any limitations? Please suggest a solution

      Delete