Scoutr4 Posted 3 hours ago Posted 3 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 1 hour ago Posted 1 hour 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 Quote
Scoutr4 Posted 44 minutes ago Author Posted 44 minutes 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 26 minutes ago by Scoutr4 Note Quote
rlx Posted 17 minutes ago Posted 17 minutes 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. Quote
Scoutr4 Posted 1 minute ago Author Posted 1 minute ago I agree with what you said. (setq theblock (vla-InsertBlock mspace ip (strcat item ".dwg") xscale yscale zscale rot)) I removed the 'dwgprefix' section and deleted the file path in the support section. I only wanted it to get the block information from the model, but the result is the same 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.