Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is VBA too fast? Greyed out Drawing Windows 1

Status
Not open for further replies.

2briancox

Aerospace
Dec 22, 2014
34
0
0
US
I am suddenly having a bazaar issue. I have written a script which opens particular DXF files in a manner that I want to have them opened. But some change I recently made has caused many of the windows for the files to open in a greyed-out manner with nothing visible in the drawing.

Debugging this script and stepping through it shows no errors. HOWEVER, stepping through line by line also NEVER reproduces the error of greyed out documents. Before I choose the ridiculous solution of adding arbitrary wait points into my code, I need to investigate whether there is some cause for this issue that is known. Searching "greyed out" in this forum yields a few suggestions, but none of them seem to apply specially to my problem.

Does anyone have an idea?
 
Replies continue below

Recommended for you

Ok. This gets "curiouser and curiouser". The problem does not get duplicated when I run the script by putting the curser in the code and hitting F5. But it gets repeated about 90%+ of the time when I click the Customized button I've set up on the Toolbar to run the program. I wonder why that happens?
 
It's hard to understand how my video card (Nvidia Quatro 4000) cannot keep up with a 2D DXF file opening too quickly.

And why would that be influenced by running the script from a Customized Button on a Toolbar, and not influenced by when I run the script from running it from the Visual Basic Editor using F5?
 
SOLVED.

Apparently CATIA.DisplayRefresh does not work well when run from the Customized Buttons on the Toolbars. I removed all mentions of that call from anywhere in my scripts and things began working smoothly.
 
Status
Not open for further replies.
Back
Top