• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

join many dwgs in a single dwg

  • Thread starter Thread starter zintonio
  • Start date Start date

zintonio

Guest
Hello.
I have about 130 dwg with patterns with the following layers: 0, h, images, p, text.
I should join them in one dwg. How can I do this? There is a program that realizes this process.
Thank you.
 
a solution can be to insert them all into a single file like xrif (naturally if they are in a single folder you can do it in a "only hit") and then use the union option, incorporating them all into the file (incorporate them as blocks, but then you can explode them). you can see in this discussion regarding union:
http://www.cad3d.it/forum1/showthread.php?t=9829
 
Thanks plannerroad,
I would like to put all the contents of the drawings in a layer for example 0 or h and then once they are inserted in the unique dwg each layer is constituted respectively by the file name.
I hope to have been clear, otherwise I answer it with an example.
e.g.
a001.dwg, a002.dwg etc...we have n dwg....I would like to get a unique dwg where there are n layers with the names of dwgs (layer a001m, a002 etc) and obviously the content of the corresponding design.
Thank you.
 
I was thinking about the following steps:

1. choose dwg to insert (possible with windows shell windows)
2. take the name of the dwg;
3. creates the layer of the first dwg a001 (with the same name as the dwg to be inserted);
4. insert the design as a block;
5. transfer the last entity inserted on the newly created layer to001;
6. explode the inserted block;
7. repeat from point 3 for how many drawings I have chosen at point 1;

for points 2,3,4 I can make a lisp but for others I do not know where to put hand
Do you think it's feasible?
I hope I've been clear
Thank you.
 
with createscript.xls of rpor66 select the dwg to be inserted with the yellow key and in the "command" column enter this sequence:
-xrif
a
tabs0,0
1
1
0
(setq lay (cdr (assoc 2 (entget (entlast)))))
(command "_-layer" "_m" lay "")
(command "_chprop" "_last" "" "_layer" lay "")
you can also change the coordinates of the insertion point, but they will be clearly all inserted in the same, if the thing is not well you see to insert a lisp instruction (in place of 0,0) to increase a suitable step.

for example wanting to increase by 100.0 the x of the insertion point:
- set the p variable before launching the script (setq p (list 0.0 0.0))- insert the insertion point into the script (setq p (list (+ (car p) 100.0) (cadr p))
 
Thank you very much,
great script!!:finger:
I should, once the dwg is inserted, merge and explode the dwg inserted so that I can change it. in steps:
1. join the dwg(command "-xrif" "_b" lay "")
2. explode the last entity inserted.
3. select it all and obviously put it on the respective layer.
4. change color to the layer (command "_-layer" "_c" lay "green")
5. repeat the cycle for other n designs

I find some difficulty in points 2 and 3
Thank you.
 
I tried this to explode:
(setq ss (ssget "_x" (list '(2 . lay)))))
(command "_.explode" ss ")
Can you go? or is there any other method?
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
ciao
Back
Top