ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

INSERT DYNAMIC BLOCKS IS REALLY SLOW

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
Anonymous
1162 Views, 4 Replies

INSERT DYNAMIC BLOCKS IS REALLY SLOW

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

4 REPLIES 4
Message 2 of 5
owenwengerd
in reply to: Anonymous

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 Wengerd
ManuSoft
Message 3 of 5
Anonymous
in reply to: owenwengerd

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

 

Message 4 of 5
DGRL
in reply to: Anonymous

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.

 

 

 

If this was of any help please kudo and/or Accept as Solution
Kind Regards
Message 5 of 5
tbrammer
in reply to: DGRL

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.


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

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

Post to forums  

Autodesk Design & Make Report

”Boost