Saving multiple objects from one drawing to multiple drawings with one drawing

Saving multiple objects from one drawing to multiple drawings with one drawing

Anonymous
Not applicable
1,825 Views
11 Replies
Message 1 of 12

Saving multiple objects from one drawing to multiple drawings with one drawing

Anonymous
Not applicable

Hello guys! 

I was searching for it for quite a while but still no succes so I post it in here.

For better overview - please check out the attached screenshot. 

The case is - I want to save some objects from one large autocad file (I have drawing of steel plates to cut on production phase) to different file with specific name. So looking at screen, lets say I have figures named some_polyline_1, some_polyline_2. I want both of those figures to be saved into different .dwg or .dxf files with their names written next to them (that means for 1st figure "some_polyline_1.dxg and similar to 2nd one). 

Is there any lisp doing such a thing or maybe any other solution for that one. I guess biggest problem would be to find borders for the figures (especially when some of them have also holes in them) but maybe someone did smth like this long time ago.

Thank you in advance!

0 Likes
Accepted solutions (1)
1,826 Views
11 Replies
Replies (11)
Message 2 of 12

devitg
Advisor
Advisor

@Anonymous Please upload your sample.dwg

 

Message 3 of 12

Sea-Haven
Mentor
Mentor

Wblock sounds like what you want pick objects and save into a new dwg. If want each individual pline can be done automatically new dwg pline1 pline2 etc.

 

Did you post else where about removing dims,  text and other stuff, exploding nested blocks ?

Message 4 of 12

Anonymous
Not applicable

Here is the example of polylines I would need to export and names of those block/files.

Thank you very much for reply!

0 Likes
Message 5 of 12

pbejse
Mentor
Mentor

@Sea-Haven wrote:

Wblock sounds like what you want pick objects and save into a new dwg. ?


 

Yup, looks like it.

 

0 Likes
Message 6 of 12

Anonymous
Not applicable

Actually wblock looks great! Thanks to that there is no problem with some steel plates with cutted holes inside them since it is in one block. I wonder how cutting machine would read that - but I will think about that later. 
For now I will try to do some LISP with that one so it will take all block and force on them Wblock.

According your second question - nope, it wasn't me. I don't usually post on this forum because most things I am able to find on Internet but this one is a little bit tricky-programming one and I don't really have time lately to sit with scripting courses ^^

Thank you very much for answer!


0 Likes
Message 7 of 12

Sea-Haven
Mentor
Mentor

Looking at sample dwg only problem sort of would be how to select objects plus the text. The way to go with the blocks may be to explode them including nested blocks. Hence question by me as there is a request for nested blocks to one dwg for CNC. 

 

If your having problems with code post a more elaborate true  dwg.

 

A simple window pick object/s and text then lisp writes out wblock.

0 Likes
Message 8 of 12

Anonymous
Not applicable

To be honest - it is not a problem to give workers the instruction  to prepare blocks from those polylines. Thanks to that we would save still a lot time because preparing a block is easy one. If you ask me - we can change the way we describe and form polylines. Most important thing is that later on they will be splitted to diff. .dwg files.

So I believe, that If I try first to prepare blocks with proper name - it should be rather easy to find/prepare LISP (with -wblock) that will divide all those different blocks to single .dwg files right?

0 Likes
Message 9 of 12

pbejse
Mentor
Mentor

@Anonymous wrote:

So I believe, that If I try first to prepare blocks with proper name - it should be rather easy to find/prepare LISP (with -wblock) that will divide all those different blocks to single .dwg files right?


Yes, it is way to easy to export blocks from the current drawing session to indivual blocks. but keep in mind that the group of objects location inside the block will be relative to its definition and not the location on screen.

 

And there's also Dynamic blocks. <-- I am not about to open that can of worms

 

If you do stick with window selection (not blocks) , how would you want to define 0,0 ? left lower corner?  at the center? or based on its current position?

 

 

Message 10 of 12

Anonymous
Not applicable

To be honest - the position of drawing is not so important. CNC machine will always take the closed polyline as a border for cutting so exact position is not relevant in this case. 

Thats why i was thinking about option with -wblocks I just need to find some example of similar LISP and prepare it for my drawings

0 Likes
Message 11 of 12

pbejse
Mentor
Mentor
Accepted solution

@Anonymous wrote:


Thats why i was thinking about option with -wblocks I just need to find some example of similar LISP and prepare it for my drawings


HYG

Wblock named block to specific path/directory 

Wblock a selection set 

 

 

Message 12 of 12

Anonymous
Not applicable

This is great help for me! Thank you very much. I will try to work around that - maybe later I will jsut come back with some coding tips needed ^^ 

Thank you all guys again for help and input. That was very quick from you!

0 Likes