The attached ZIP contains modified versions of three Express LSP files to allow the BLOCKREPLACE command to work with dynamic blocks. This resolves the following problems:
Cheers
I just tried these out. Works great except...
It resets the state of any block it replaces to the default state of the new block.
So if it replaces "Block A" (A modified Dynamic Block) With "Block B", you get the default state of "Block B" not "Block B with the modified state of Block A".
Not sure there's a way round that though.
Thanks!!!
-JP
OMG i have been trying to figure this out myself and i thought it was impossible! This works great! I modified the defun to make sure I am using the correct files and it works great! gonna test in 2024 lt to see if it works there
Thanks again!
Autodesk has modified the files recently (probably to work on a Mac) with a new function to find the Express Tools path. I've added that in and added code to support prior releases that may not have this function. Also, there was a bug if you had a table or some other anonymous entry embedded in a block then it could crash because it assumed all entity names that started with * were anonymous blocks.
Also, the files Autodesk supplies are now digitally signed so this version does not have the signature but they seem to load fine because of their location (e.g. C:\Program Files\Autodesk\AutoCAD 2024\Express).
This tool could be improved further to support the replacement block having attributes. As of now the new blocks are inserted with no attributes and the BATTMAN command is needed to add them back in. This could reset the attributes of all inserts of that block if you are not careful to just select the replaced entities prior to using BATTMAN.
Sweet - I was excited back then and still am !!
I will give this a try and let you know how it goes.
Thanks
~Greg
>>"but they seem to load"
FYI, digital signatures
https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-EDBB6671-94A9-4B0C-A6F2-BC3EFBBBCBC2