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

creation blocks (without defining its name) from groups, with only selection

  • Thread starter Thread starter Mano63
  • Start date Start date

Mano63

Guest
Good morning to all,

some time ago you helped me with a lisp that "explodes" the blocks in groups. to complete the work I would need a lisp to create blocks from groups. es: I have 10 groups and turn them into 10 separate blocks, running the command with a single selection. It would make my work very easy (I would often need to transport groups from one file to another).
Thanks to who will help me.
 
I assembled a bit of routine to create the g2b command (block group), it works by turning a group into its block, then, one at a time.
the block name is taken from the group name by eliminating the asterisk and adding "block_" at the beginning; I added a routine that checks the existence of the block name and adds a number if positive.
the functions you find in the utility group you can also use in other commands, to you the task of studying the features.
creating blocks from a selection containing multiple groups is feasible, you must exclude the possible groups present in the drawing but not present in the selection and becomes more complicated.
bye
 

Attachments

"...create blocks from a selection containing multiple groups is feasible, it is necessary to exclude the possible groups present in the drawing but not present in the selection and becomes more complicated. "

good evening rpor66, and thank you for your work.
above I quoted your words with the intent to make my needs more understandable and so, perhaps, you can get more easily to the goal (I also attach a file, if it can facilitate you. ...

groups in the attached file must be transformed All in blocks. as intuitable by the dwg groups have no name, and I don't even care that the created groups have one, as once copied and glued into a new file they will be immediately reported to groups.

As for selection, perhaps you will be useful to know that I will never need to select some groups compared to others. the selection will always include all the groups present in the drawing.
riassumendo:- open the attached file (inside I find the groups)
- give the g2b command and select in a single window all groups (without name)
- so many blocks are created (I don't care if they have a name)
- copy all newly created blocks in a new file
- within the new file "explode" all the blocks copied into groups (with a lisp that I already use)
I hope I've been clear (and don't waste a lot of time).

Thank you.
 

Attachments

exactly what I needed!
Thank you.
with your help, in this two years 20/21 I managed to develop a system almost perfect for the "strampalate" needs of my employer.
I realize that my demands are "personal", but I also need to float in everyday life. I hope, however, something positive for this community. Thank you again!
 

Forum statistics

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

Members online

No members online now.
ciao
Back
Top