CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
Czech English Deutsch
Login/Register:
 Visitors: 1873 
RSS tips RSS channel - CAD tips
RSS discussion RSS channel - CAD discussion

Discussion Discussion forum

HelpCAD discussion

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

The information that you provide in this form will make up your forum profile which can be viewed by other forum members. Your email address will only be visible by forum admin and moderators and will be used to send you Forum Notifications. To cancel your account, use the page Opt-out or contact webmaster@cadforum.cz.

Help Combining files

 Post Reply Post Reply Page  12>
Author
AGST View Drop Down
Newbie
Newbie


Joined: 23.Dec.2019
Location: Portugal
Using: Autocad, Eplan
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote AGST Quote  Post ReplyReply Direct Link To This Post Topic: Help Combining files
    Posted: 23.Dec.2019 at 11:42
Hello all!

I'm new to this forum and what led me here was my new job as a CAD Designer!  Smile

I have a work in hands where i need to take multiple DWG files and create a master one where all of them are displayed in a single sheet, side by side in 10 rows filled from top to bottom, left to right.

I added a image of what is intended:

If i do this manually it takes a lot of time, so i seek your help, asking if you know any program that does this job automatically.

Thank you in advance!

Best Regards!
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7082
Post Options Post Options   Thanks (0) Thanks(0)   Quote John Connor Quote  Post ReplyReply Direct Link To This Post Posted: 23.Dec.2019 at 12:29
And just how big is the "single" sheet that will hold all twelve drawings?
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
AGST View Drop Down
Newbie
Newbie


Joined: 23.Dec.2019
Location: Portugal
Using: Autocad, Eplan
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote AGST Quote  Post ReplyReply Direct Link To This Post Posted: 23.Dec.2019 at 12:36
Thank you for the quick reply!

There isn't a predefined size and the 12 sheets is an example, normally is 30+ files in the same sheet.

This is a client requirement, he wants a single sheet with all the drawings in it...

This is a finished example of what the client wants, done manually:


Thank you in advance for your help!
Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2019
Status: Offline
Points: 523
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kent Cooper Quote  Post ReplyReply Direct Link To This Post Posted: 23.Dec.2019 at 14:57
You may be able to use BlockChart.lsp with its BC command, available >here<.  It goes from lower left in horizontal rows, and builds upward from there, but could be modified to do the sequence you describe instead, and to space things farther apart than it does [you can do that yourself by changing the 1 value assigned to the 'space' variable], if it otherwise does what you want.  It needs you to have all those drawings in one folder, with no other drawing files in that folder, and the current drawing limits need to be wide enough in the X direction for a reasonable number of them to make a row, or the whole collection will be stacked in one tall column.

But I do wonder:  do any of your drawings have Xref's in them?  I can imagine that being a problem....


Edited by Kent Cooper - 23.Dec.2019 at 14:57
Back to Top
AGST View Drop Down
Newbie
Newbie


Joined: 23.Dec.2019
Location: Portugal
Using: Autocad, Eplan
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote AGST Quote  Post ReplyReply Direct Link To This Post Posted: 23.Dec.2019 at 15:32
Thank you for your reply.

Our drawings are all single layered. They dont have any xref's in them.

I'm going to try your solution, i'm afraid the .lsp file won't run on our programs.

PS: The link you mentioned redirects to this post...


Edited by AGST - 23.Dec.2019 at 15:35
Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2019
Status: Offline
Points: 523
Post Options Post Options   Thanks (0) Thanks(0)   Quote Kent Cooper Quote  Post ReplyReply Direct Link To This Post Posted: 23.Dec.2019 at 17:28
Try this:

What makes you afraid it won't run?  Are you using AutoCAD LT that can't use AutoLisp (your info lists AutoCAD without any elaboration)?


Edited by Kent Cooper - 23.Dec.2019 at 17:34
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7082
Post Options Post Options   Thanks (0) Thanks(0)   Quote John Connor Quote  Post ReplyReply Direct Link To This Post Posted: 24.Dec.2019 at 13:09
Your client will be looking at postage stamps when you're done.
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
AGST View Drop Down
Newbie
Newbie


Joined: 23.Dec.2019
Location: Portugal
Using: Autocad, Eplan
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote AGST Quote  Post ReplyReply Direct Link To This Post Posted: 26.Dec.2019 at 08:44
Originally posted by John Connor John Connor wrote:

Your client will be looking at postage stamps when you're done.

Don't ask me why, but it's a demand they make!
Back to Top
AGST View Drop Down
Newbie
Newbie


Joined: 23.Dec.2019
Location: Portugal
Using: Autocad, Eplan
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote AGST Quote  Post ReplyReply Direct Link To This Post Posted: 26.Dec.2019 at 13:00
Originally posted by Kent Cooper Kent Cooper wrote:

You may be able to use BlockChart.lsp with its BC command, available >here<.  It goes from lower left in horizontal rows, and builds upward from there, but could be modified to do the sequence you describe instead, and to space things farther apart than it does [you can do that yourself by changing the 1 value assigned to the 'space' variable], if it otherwise does what you want.  It needs you to have all those drawings in one folder, with no other drawing files in that folder, and the current drawing limits need to be wide enough in the X direction for a reasonable number of them to make a row, or the whole collection will be stacked in one tall column.

But I do wonder:  do any of your drawings have Xref's in them?  I can imagine that being a problem....

Hi Kent, the BlockChart.lsp worked like a charm, it did in fact a single column of all the files, can you help me modify the code so that a new column is used when it reaches 10 rows?

Ty in advance
Back to Top
AGST View Drop Down
Newbie
Newbie


Joined: 23.Dec.2019
Location: Portugal
Using: Autocad, Eplan
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote AGST Quote  Post ReplyReply Direct Link To This Post Posted: 27.Dec.2019 at 10:51
Hi guys!!!

I seek your help please!!

The code that Kent so kindly provided, sorts the DWG's from bottom left to top in a single column.

I need to modify it, so it sorts from top left to bottom and left to right in 10 rows per column.

Here's the code:

(defun C:BC (/ blkfolder space nextLL rowht rowL blkLL blkUR objwid objht)
  (vl-load-com)
  (setvar 'osmode 0)
  (alert "Pick OK here, then double-click any file in desired folder: ")
  (setq
    blkfolder (getfiled "Find folder" "" "dwg" 0)
    blkfolder (substr blkfolder 1 (1+ (vl-string-position 92 blkfolder 1 T))); path without dwg name
    space 100 ; between blocks and min. from limits <------ set as desired
    nextLL (mapcar '+ (getvar 'limmin) (list space space 0)); lower left of next block
    rowht 0 ; height of tallest block in row
    rowL nextLL; left end of baseline of row
  ); end setq
  (foreach blk (vl-directory-files blkfolder "*.dwg" 1)
    (command "_.insert" (strcat blkfolder blk) (getvar 'viewctr) "" "" "")
    (vla-getboundingbox (vlax-ename->vla-object (entlast)) 'minpt 'maxpt)
    (setq
      blkLL (vlax-safearray->list minpt)
      blkUR (vlax-safearray->list maxpt)
      objwid (- (car blkUR) (car blkLL))
      objht (- (cadr blkUR) (cadr blkLL))
    )
    (if (> (+ (car nextLL) objwid space) (car (getvar 'limmax)))
      (setq ; then - start new row above previous row
        nextLL (polar rowL (/ pi 2) (+ rowht space))
        rowL nextLL
        rowht 0
      ); end setq
    ); end if - no else [next in current row]
    (command "_.move" (entlast) "" blkLL nextLL)
    (setq nextLL (polar nextLL 0 (+ objwid space)))
    (if (> objht rowht) (setq rowht objht))
  ); end foreach
); end defun

Can anyone give some help please?

Thank you in advance!
Back to Top

Related CAD tips:


 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,109 seconds.