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

explode a block contained in another block

  • Thread starter Thread starter rdilecce80
  • Start date Start date
confutatis, I'm sorry if I'm back here to write you but I'd need another little help if possible.

attached, I send you a dime on which I have already used esptac.lsp

I have unfortunately found that the "notchs2" heels are stacked on the other and, according to the way, I should open the block and cancel the lines in submerged.

Is it possible to use, like, an overkill to eliminate overlapping lines directly from esptac.lsp or explode even these last ones by creating only lines on layer 4, in poor words, permanently delete notchs2?

Thank you for your patience
 

Attachments

I have unfortunately found that the "notchs2" heels are stacked on the other and, according to the way, I should open the block and cancel the lines in submerged.

a
quando uso esptac, si crea la copia del blocco e me esplode
 
You're right, I just missed the fact that when I use vla-explode, the program makes me a copy of the entities that make up the block, keeping the original, unlike the explode command, which instead eliminates the block. Therefore the counter also went for his. Now it should be fine.
If you can filter them up, it's better, otherwise I'll have to run a control system for the block coordinates and clear the blocks too. However you do not do in 5 minutes...:smile:
 

Attachments

You're right, I just missed the fact that when I use vla-explode, the program makes me a copy of the entities that make up the block, keeping the original, unlike the explode command, which instead eliminates the block. Therefore the counter also went for his. Now it should be fine.
If you can filter them up, it's better, otherwise I'll have to run a control system for the block coordinates and clear the blocks too. However you do not do in 5 minutes...:smile:
the double notches created me after using esptac.lsp
 
I'm sorry, I don't want to be a pain in the ass, but the code looks exactly like the previous one:
(defun c:esptac (/ blocks gru dima index listadima count)
(vl-load-com)
(setq blocks(vla-get-blocks (vla-get-activedocument(vlax-get-acad-object))))
gru(ssget '((0 . "insert")))
)
(repeat (setq index(sslength gru))
(setq dima(ssname gru (setq index(1- index))))
listadima(vla-item blocks (cdr(assoc 2))))
count 0
)
(vlax-for elem listadima
(if (and (equal (vla-get-objectname (vla-item listadima count)) "acdbblockreference")
(equal (vla-get-name (vla-item listadima count)) "notchs2")
)
(progn)
(setq listaent(car) (safearray-value(variant-value)Vla-explode (vla-item listadima count))))
(vla-put-layer listaent "4")
)
)
(setq count(1+ count))
)
)
(vla-get-activedocument(vlax-get-acad-object) acactiveviewport)
)
 
Bah, I felt like I uploaded the new file, even because the old one no longer exists since I overwrite it. However a nice copy-paste finally solves the question:
Code:
(defun c:esptac (/ blocks gru index dima listadima)
(vl-load-com)
(setq blocks(vla-get-blocks (vla-get-activedocument(vlax-get-acad-object))))
gru(ssget '((0 . "insert")))
)
(repeat (setq index(sslength gru))
(setq dima(ssname gru (setq index(1- index))))
listadima(vla-item blocks (cdr(assoc 2))))
)
(vlax-for elem listadima
(if (and (equal (vla-get-objectname elem) "acdbblockreference")
(equal (vla-get-name elem) "notchs2")
)
(progn)
(vla-put-layer (car (safearray-value(variant-value(vla-explode elem))))))) "4")
(vla-delete elem)
)
)
)
)
(vla-get-activedocument(vlax-get-acad-object) acactiveviewport)
(alert "tacche esplose!")
)
ps: tested on all file dima received
 
Hello confutatis, come back here. the other day you told me that you could delete through lsp the copy of the notchs2 blocks.

now the problem is more than ever annoying since the import program recognizes the "double line" on layer 4 and invents the heels.

wanting, if I make the concept simpler, the "double line" may also not be erased but stand on another layer other than 4.

If possible and if I don't bother you, could you give me another last hand?

thank you in advance whatever the answer is.
 

Forum statistics

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

Members online

No members online now.
Back
Top