Hi Community,
I have Created a Command Arx (AUTOCAD 2012) that performs the Following steps :
- filters some lines on some layers
- substitutes the lines with dynamic blocks with only one parameter stretch (lenght line = stretch parameter)
After about 200 "overrides" the system begins to slow down and takes about 10 seconds to insert block and set parameter.
I tryed to use addBlockToDatabase function, acedcommand INSERT (external and internal path) but it seems there's no way to arrive at the end of the overriding operation (about 1000 lines)
What can I do?
Why is Autocad so slow with dyn blocks?
Thank you,
Regards,
Mario
Solved! Go to Solution.
Solved by owenwengerd. Go to Solution.
I can't tell you why it's so slow, but considering the amount of resources required for each block, it's not altogether surprising that performance degrades quickly. My advice is to avoid dynamic blocks like the plague.
Owen,
you're completely right: avoid dyn blocks when you have to make many many inserts.
Cons:
The size of the drawing increases dramatically.
Sometimes Autocad runs out of memory.
After some inserts, the performance degrades dramatically.
So, in my case I was able to replace the dynamic block with a X scaled block.
But, what if you must use dynamic blocks?
Thank you,
Regards,
Mario
Hi @Anonymous
There is never the need of using Dyn blocks.
Make a good library and depending on how you work toolpallets / toolbars or legend sheets.
I don't agree completely.
Dynamic blocks can be quite handy in many cases where scaling a static BREF wouldn't be appropriate.
If you are inserting multiple dynamic blocks with the same parameter set, AutoCAD will only create one block instance per parameter set. So I think it is not too inefficient.
On the other hand: You are completely right to avoid dynamic blocks for just one simple line and for cases where scaled static BREFs are appropriate.
Regarding performance:
How do you create instances of the dynamic BREF? Using INSERT 200 times is really inefficient if you already have the block definition inside your AcDbDatabase. Better create an AcDbBlockReference to the dynamic BTR and modify its dynamic parameters. See classes AcDbDynBlockReference and AcDbDynBlockReferencePropertyArray.