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

Overrule and changing Layout Tabs when Autocad regens all viewports,Big Issue .

6 REPLIES 6
Reply
Message 1 of 7
JanetDavidson
561 Views, 6 Replies

Overrule and changing Layout Tabs when Autocad regens all viewports,Big Issue .

Hello colleagues , I realized a new problem during my development and don't know, is it my code or it is autocad ?
My question is why in a drawing with lots of  overruled objects, always it takes more time to regen viewports. I know all about LAYOUTREGENCTL system variable. If I  set it " Cashe Model Tab and All Layouts ", it is not that bad , but if I set it to "Regen When Switching Layouts" . It is horrible and the reality is I don't want to change that system variable in code which is not professional.
Now the real  question is what shall I do in my code to make regen faster during changing layout tabs even if the LAYOUTREGENCTL system variable is set to 0 ? Thanks in advance for any professional advice .
Janet.

6 REPLIES 6
Message 2 of 7
norman.yuan
in reply to: JanetDavidson

Without knowing what your OverRules do and how many "a lots of overruled objects" means, I can only comment in general sense.

 

Using Overrule obviously add overhead to AutoCAD operation: AutoCAD must scan the database for the type you overrule applies. If you also have overrule filter defined (with, say, XData), AutoCAD needs read each object's XData to see if the object is subject to the Overrule. So, yes, Overrule could be abused to drag down AutoCAD performance.

 

So, what you should do really depends on what your Overrule does and if you can justify the overhead added to AutoCAD with the adavantage your Overrule brings in. The only way to speed up regen with your code is to optimize your Overrule code.

Norman Yuan

Drive CAD With Code

EESignature

Message 3 of 7
jeff
in reply to: norman.yuan

Someone could probably help you if you gave some info on what your overrule did.

 

One thing you can try is comment out your code and just call the base or 'native' function and see if the performance changes.

You can also find your answers @ TheSwamp
Message 4 of 7
fieldguy
in reply to: JanetDavidson

>It is horrible and the reality is I don't want to change that system variable in code which is not professional.

 

This statement needs clarification.  It is OK to change a variable to do what you want.  It is not professional if you don't set it back to what it was before you changed it.

 

IMO this is SOP.  Save the value of a system variable, set it to what you need, and reset it when you are finished.

Message 5 of 7
JanetDavidson
in reply to: norman.yuan

Thanks All,  I really appreciate everybody comments. drawing has  2000 overrulled objects  and Yes they carry Xdata .

Just the overrule part is almost 1500 lines of code, and it is hard to simplify it to paste here. But I guess like what Norman said and I wanted to confirm that , I have to cope with it. I will try to trim the code to see what happens.

Thanks Again.

Janet.

 

 

 

 

Message 6 of 7
_rhenley
in reply to: JanetDavidson

You also need to make sure the layer manager dialog is closed when working in ps layouts. It's a big reason for slow regeneration of the ps viewports.

Message 7 of 7
JanetDavidson
in reply to: _rhenley

Thanks for tip

Janet.

 

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost