×
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

VBA Macro: Waiting for CATIA to finish commands

VBA Macro: Waiting for CATIA to finish commands

VBA Macro: Waiting for CATIA to finish commands

(OP)
Hey everybody,
   I'm writing a macro that uses the "assemble" command, and it requires me to sendkeys to CATIA, since assemble always brings up a dialog box.  I'm calling a .vbs to do the sendkeys, since sendkeys doesn't work in the .catvba.  The problem is, when I use assemble, the command takes quite a while to execute.  Unfortunately, the .vbs continues to send commands to CATIA, so many of the sendkeys aren't received while assemble is running.  I used a pause for a set amount of time, which works, but it seems like a very inefficient and sloppy way to do this.  Is there any way to somehow determine if CATIA is finished executing its commands?  Is there anyway to call another CATIA vba, or somehow make the vba wait for the vbs to finish?

RE: VBA Macro: Waiting for CATIA to finish commands

Which assemble command?
Part Design>Boolean operations> Assemble?

If so you can code this without send keys

Otherwise

Could you not analyse the CNEXT procees to determine its load?


Regards

Nev

RE: VBA Macro: Waiting for CATIA to finish commands

Hi,

There is a very good software which will allow you to control in what way you want all processes in your computer (available under Windows OS).

Please see the link http://www.networkautomation.com/automate/automatepro.htm

Regards
Fernando

RE: VBA Macro: Waiting for CATIA to finish commands

(OP)
Yes, I am using Part Design > Boolean operations > Assemble.

RE: VBA Macro: Waiting for CATIA to finish commands

xgibbousx,

Then I assume you are used the following code

CATIA.StartCommand("Assemble")

This is the only way that send keys would be needed.

I would use the follow method to complete avoid the use of sendkeys

AddNewAssemble( CATIABody  iBodyToAssemble) As CATIAAssemble  

Regards

Nev

RE: VBA Macro: Waiting for CATIA to finish commands

(OP)
Hey Nev,

That worked really great.  Thanks for your help.

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