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

lisp to explode blocks according to a list of names

ing.dir

Guest
as written in another post I'm trying to automate actions and I'm taking advantage of it to understand more than lisp.

I need to explode the blocks present in a dwg answering specific names.
using a lisp found on the net I can select the blocks by name and I tried the solution rougher but faster i.e. insert directly into the ssget the list of the names of the blocks to explode.
for some reason if I insert some names (as attached) the lisp works but if I insert them all gives me the unknown command error.

I thought I would give the ssget command from time to time the block name to explode, taking it from a list itself in the code or from external file.
Unfortunately with my current skills I am unable to do so and I have not found solutions looking online.
Could someone please help me?



p.s.
I attach the lisp that I copied from the network, the list of blocks that I would like to explode, written in two ways, and a test file containing the blocks.
 

Attachments

OK I'll just take care of myself, I've solved the error problem:
just add the following command
(setvar "qaflags" 1)
after the first line of definition of the function.
before closing the function I relocated the variable on 0.

But there is a crude solution, I think, so the idea of the external list remains to be deepened, I think.
 
... take a look at @gp's explanation regarding filters: it can be useful to take, for example, all the blocks that have a similar name:
(ps. do not mention the fact that the initial question concerned another subject: swipe until @gp surgery)
 

Forum statistics

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

Members online

No members online now.
Back
Top