Scoutr4 Posted 5 hours ago Posted 5 hours ago Hi everyone, I encountered a problem yesterday. I have a Block.dwg file. I call the Block.dwg file into the A.dwg file and make edits within Block. After that, I run lisp. At this point, I encounter the following error. When I insert the same Block again If I insert it with (command "-insert"). It is based on the block in A.dwg and the block I insert looks like it. If I use the (vla-insertblock) function, it moves according to the inserted block and the blocks in A.dwg look like the block I inserted. What is the reason? Quote
Steven P Posted 3 hours ago Posted 3 hours ago Are you able to post a copy of the LISP so we can see what is happening? Sounds like your (command method is referring to the source file and the (vla- method is referring to your working file 2 1 Quote
Scoutr4 Posted 2 hours ago Author Posted 2 hours ago (edited) I prepared a block dwg file and a example dwg file. And of course the lsp file for comparison. I deleted the inner part of the block in the example dwg file. Without deleting this block, add the second block using the commands in the lsp file. Note 1 : link for vla-insertblock >> https://www.afralisp.net/archive/methods/lista/insertblock_method.htm (I just changed the item line to select it) Note 2 : After using the "al-insertblock" command in AutoCAD, run the regen command. BLOCK.dwg EXAMPLE.dwg EXAMPLE.lsp Edited 1 hour ago by Scoutr4 Note Quote
rlx Posted 1 hour ago Posted 1 hour ago I think Steven is right , this is about redefining or not. When you insert a block without path , AutoCad uses the block definition allready present in active drawing. If you put a path to it , AutoCad will overwrite current block definition with the one on file. So , if you insert block for the first time , then edit it and after that insert the one from file , your edited definition will be overwritten again. Standard / classic / basic AutoCad behaviour. 1 1 Quote
Scoutr4 Posted 1 hour ago Author Posted 1 hour ago (edited) I agree with what you said. (setq theblock (vla-InsertBlock mspace ip item xscale yscale zscale rot)) Editing the code like this fixed it. Thanks . Edited 1 hour ago by Scoutr4 edit code 1 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.