Combining multiple dxf files into one dxf or dwg file....
The metal building company I work for is using the MBS program to help with the engineering/drafting process of metal bldg production. The way the MBS program works is it makes multiple dxf files, one for each bldg elevation. The way we save these separate dxf files is to open a blank dwg file and copy/paste each separate dxf file into it (by opening each dxf, exploding multiple times, then copy/pasting into an opened dwg file.. This is very time consuming.
Is there anyway through BricsCAD (maybe a lisp) to set up some way to automatically pull these dxf files into one drawing? The file names are always the same and they are always located in the same place inside each job folder.
I hope this made sense....thx for any help ya'll can offer
0
Comments
-
IMPORT command. dxf files are imported one at a time, but if they're all in the same folder, it will only take a few seconds to import all. Note: you'll have to rearrange them as insertion point may be the same (causing them to overlap).0
-
Did you ever try 'Right-button-drag' method?Select a drawing file (DWG or DXF) in Windows Explorer, then press and hold the right mouse button and drag the file onto the BricsCAD window. When you release the right mouse button a context menu displays. Choose to insert the file as a block. If necessary, you can explode the blocks afterwards.0
-
Jeremy: yes, you can use lisp to create a custom command that imports all the files at once automatically. It would be very easy since you can supply the filenames and path in the lisp code. Anything that can be done from the command line is easy to do in lisp.
To solve the problem that Robert pointed out, you could have the program pause for user input of the insertion point for each imported file. Or, if you want to spend a little more time writing code, you could have each insertion point picked automatically a little outside of whatever else is already imported. You could have the lisp routine do a Select All, and you could use the Visual Lisp method "GetBoundingBox" to supply the minimum and maximum coordinates of everything that's already in the target file. Then add something to the x-coordinate to create an insertion point for the next file import.
When all the files are imported, the lisp routine can select all block insertions and explode them, repeating automatically until the "select all block insertions" subroutine returns nothing. If you know how many levels of nested blocks to expect, it would be easier to have it repeat the explode command that many times. If you want to explode everything, not just blocks, that's even easier since you can just use Select All and Explode.0 -
The "IMPORT command" and the "Right button drag" are both still a manual, time consuming fix. Some of the dwg files I have to create will have over 200 dxf files copy/pasted into it. I think the lisp is what I am looking for. I have never worked with lisp so I have some research and learning to do.Thanks for the feedback...I now have a direction to go in.J0
This discussion has been closed.