Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BLOCKREPLACE modified for use with Dynamic Blocks

7 REPLIES 7
Reply
Message 1 of 8
GTVic
866 Views, 7 Replies

BLOCKREPLACE modified for use with Dynamic Blocks

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:

 

  1. Cannot pick a dynamic block unless it is in its reset/original state
  2. Cannot replace dynamic blocks unless they are in the reset/original state
  3. Cannot detect circular references unless the circular reference is in the reset/original state

Cheers

7 REPLIES 7
Message 2 of 8
greg_battin
in reply to: GTVic

I will give this a try but sounds great. Thanks for sharing.
~Greg
Message 3 of 8

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

 

 

Message 4 of 8

Super useful tool though. Well done.

Message 5 of 8
pdecanio1
in reply to: GTVic

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!

Message 6 of 8
GTVic
in reply to: GTVic

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.

Message 7 of 8
gbattinPH5TG
in reply to: GTVic

Sweet - I was excited back then and still am !!

I will give this a try and let you know how it goes.

Thanks

~Greg

Message 8 of 8
cadffm
in reply to: GTVic

>>"but they seem to load"

 

FYI, digital signatures

https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-EDBB6671-94A9-4B0C-A6F2-BC3EFBBBCBC2

 

 

 

 

 

- Sebastian -

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost