p7q Posted 1 hour ago Posted 1 hour ago I am working on an AutoLISP routine where I need to explode a block/table object during the execution of my custom command. Currently I am using: (command "._EXPLODE" obj "") The object is exploded, and my routine usually continues, but AutoCAD also prints an “Unknown command” message after the EXPLODE operation. When I remove this EXPLODE line, the problem disappears. From what I understand, the issue may be related to using the AutoCAD EXPLODE command inside another running AutoLISP command. After the explode operation, AutoCAD may refresh or lose the expected command context, so the remaining input is interpreted incorrectly. I need to explode the object because I have to access/fill attribute-related data from the resulting entities. However, I must preserve the original block/table placement exactly: insertion point, rotation, scale, and geometry position should remain unchanged. It would also be acceptable if only the entities on a specific layer are exploded or copied out. Is there a safer/custom AutoLISP or Visual LISP way to explode a block/table object without using (command "._EXPLODE" ...)? For example, is using vla-Explode recommended in this case? If so, how can I explode or copy the block contents while preserving their transformed position, rotation, and scale exactly as they appear in the drawing? Any example function or best-practice approach would be helpful. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.