Often, you need to insert a block in CAD, which is the type of insert, not line and polyline. In general, we are not going to edit it, but sometimes we need to select it, such as when the print range is selected, the default is to filter out the Insert type (in fact, this is unreasonable, not considered completely), so now to the block into the entity.
You can use the CAD decomposition (EXPLODE) command directly. It divides the block directly into four lines (line).
But there are hundreds of thousands of DWG diagrams to do this, of course, only the use of means of processing tools. About this batch processing tool in the diagram, I'll share it later.
- (Defun c:test ()
- ??;; Select the Block (INSERT) for the TK layer
- ?? (setq SS (ssget "x" (List (cons 0 "INSERT") (Cons 8 "TK")));
- ??;; Decomposition
- ?? (Command "EXPLODE" ss "")
- ?? (Princ);
- ?? (princ " processing finished, please check the verification! ");
- )
CAD block reference to entity