×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Is VBA too fast? Greyed out Drawing Windows

Is VBA too fast? Greyed out Drawing Windows

Is VBA too fast? Greyed out Drawing Windows

(OP)
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?

RE: Is VBA too fast? Greyed out Drawing Windows

(OP)
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?

RE: Is VBA too fast? Greyed out Drawing Windows

(OP)
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?

RE: Is VBA too fast? Greyed out Drawing Windows

(OP)
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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources