Jump to content

Recommended Posts

Posted

How we can merge 2 or more dwg togather with lisp or simple way:cry:.

Posted

Insert drawing B into drawing A; explode newly inserted block; take a bathroom break.

Posted

thanks a lot

my q is How we can merge 2 or more dwg togather with lisp or simple way:cry: without opening them

Posted (edited)

Here is a way,

 

Create a folder in drive Known as Merge DWG whose directory will be C:\Merge DWG

 

and put all drawing file in that folder which you want to merge,

 

and run the following routine, but check drawing units of drawings which you want to insert and keep them same

 

(defun c:MDWG (/ directory files)
(setvar "cmdecho" 0)
(alert "\n Please put your DWG files in ''C:\\Merge DWG'' Directory")
 (setq directory "C:\\Merge DWG")
 (if (setq files (vl-directory-files directory "*.dwg" 1))
   (foreach dwg files
     (command "_.-insert"
              (strcat directory "\\" dwg)
              '(0. 0. 0.)
              ""
              ""
              ""
     )
   )
   (princ "\n No DWG files found into that folder !")
 )
(alert (strcat "\n ''DWG files has merged together''  ")
      )
(setvar "cmdecho" 1)
)

 

Enjoy:)

Edited by satishrajdev
Posted

@ satishrajdev

 

It is a good practice when you in need of changing any system variable , you should reset it back .

Posted
I was referring to the system variable "cmdecho" and not to the other codes . ;)

 

Oops....forgot to put that, Being newbie it happens in excitement :shock:

Posted

Are the DWGs already xreffed into one another? Or do you want to simply place them into a blank DWG and not overlap each other (like in the thread teknomatika pointed to)?

 

If the former, there are lots of stuff concerning binding xrefs. Just do a search here.

 

Also, what about any paper space tabs? Neither of these would bring those in as well. For that you'd need to import the layouts, and might also need to adjust the viewports.

  • 1 year later...
Posted

Dear satishrajdev

I tried your lisp and that massage "DWG files has merged together" but but i don't know that which location save the merged dwg??

Posted

You might want to check out the Express Tool, LAYOUTMERGE.

I have never used it, but it may prove helpful.

Posted
Dear satishrajdev

I tried your lisp and that massage "DWG files has merged together" but but i don't know that which location save the merged dwg??

 

It saves merged files into your current drawing, where you have loaded this lisp...:)

Posted

I think - to say attached in is much clearer than to say merged in - in this regard .

Posted

Dear satishrajdev

I checking current drawing but there's not there also.??:cry:

Posted

I checking current drawing but there's not there also.??

 

How do you run the codes ?

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...