Application.ScreenUpdating = False

COE Administrator

Application.ScreenUpdating = False
In VBA in excel, there is a simple line that will turn off screen updating. Adding these two lines on the outskirts of you code cause no screen flashing, and the application seems to freeze while the program is running. It's also suppose to speed things up.

Application.ScreenUpdating = False
Application.ScreenUpdating = True

Is there an equivalent in CATIA? My program opens many template parts to create new ones and promptly closes them causing the screen to go through a crazy routine of flashes....I'm starting to worry about the transe-like state I go into every time I run it......

Jim Strawn

Application.ScreenUpdating = False
(in response to COE Administrator)
Try this:

CATIA.RefreshDisplay = False

COE Administrator

Application.ScreenUpdating = False
(in response to COE Administrator)
CATIA.RefreshDisplay = False helps some, but it only keeps the screen from updating while you're in ONE window.

Within my Product, for any given Template part, I'll go through the following routine: NewFrom (Open)/Modify/Assemble in Product/Close. This may happen 100 times during run-time.

The RefreshDisplay = False only disables the update of the display in one window. For instance, I don't see any of the Modifications to the NewFrom Part in the above routine. However, I do see all the Windows Opening and Closing.

Personally it's not that big of a deal, I understand what's going on. But, when trying to present this to others, the screen flashing doesn't make a good impression, it's just not slick and makes it seem like something may be wrong.

Currently I'm just making the Application invisible during runtime, but I'd like to avoid that in case there are errors.

COE Administrator

Application.ScreenUpdating = False
(in response to COE Administrator)
You know mallie, this may be worse, but you could use CATIA.Visible = False at the beginning of your code and CATIA.Visible = True at the end. Then catia would disappear, but you wouldn't see flashing.

Like I said, this may be better, or may be worse. If your using VB, you could have code that displays a progress bar in it's place or something. Just a thought.

COE Administrator

Application.ScreenUpdating = False
(in response to COE Administrator)
That is what I'm currently doing, but I'm using VBA.

I make CATIA invisible only while the program is creating many new parts. The only draw back is that if you get an error in your code, you have to open up the Immediate Window and type
CATIA.visible = true to bring the Application back.

Maybe one day CATIA will catch up to Excel....haha

COE Administrator

Application.ScreenUpdating = False
(in response to COE Administrator)
Is there a reason that you aren't putting error trapping in there?

Oh yeah, sorry about the last post, but I remembered reading this a while ago and forgot that you had mentioned it. Just a lesson to re-read the post, even if you do think you remembered all of it.

COE Administrator

Application.ScreenUpdating = False
(in response to COE Administrator)
It's still in development, so I want to see the errors. Once we start letting others use the App then we should have that stuff sorted out.

When you're an unsuspecting user, it's gonna catch some by surprise when CATIA dissappears......