×
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

Running Pro/engineer from a excel VB

Running Pro/engineer from a excel VB

Running Pro/engineer from a excel VB

(OP)
Hello,

I am trying to automate the process of mass creating parts.  

What I would like to do is write a VB command that tells windows to launch pro/engineer in no graphics mode and run a trail file that is called mytrail_1.txt

I can run that trail file in pro/engineer in no graphics mode from the command line using:
"C:\Program Files\proeWildfire 3.0\bin\proe.exe" -g:no_graphics Mytrail_1.txt

and it runs fine.

However I took the same shell command and put it in VB as follows:

Private Sub Command1_Click()
Shell "C:\Program Files\proeWildfire 3.0\bin\proe.exe" - g: no_graphics Mytrail_1.txt, vbNormalFocus
End Sub

however i get an error saying
Compile error: Variable not defined
and the g before no graphics is highlighted

Note that I can launch pro/engineer from VB using:

Private Sub Command1_Click()
Shell "C:\Program Files\proeWildfire 3.0\bin\proe.exe", vbNormalFocus
End Sub

and no problems, but I would like to start and run that trail file in no graphics mode.

Any ideas?

Regards,

Taz Engr
 

RE: Running Pro/engineer from a excel VB

Taz,

You will need to put - g: no_graphics Mytrail_1.txt, vbNormalFocus within the quotation marks just after proe.exe.  This will tell VB that everything after the proe.exe are arguments.

If this doesn't work (which is sometimes doesn't) just create a bat file with your entire launch command with arugments.  Then call that newly create bat file from VB.  Should work.

Steve

Stephen Seymour, PE
Seymour Engineering & Consulting Group
www.seymourecg.com

RE: Running Pro/engineer from a excel VB

Sorry correction:  put "- g: no_graphics Mytrail_1.txt" within your quotations.  The command argument vbNormalFocus should follow the comma.

Steve

Stephen Seymour, PE
Seymour Engineering & Consulting Group
www.seymourecg.com

RE: Running Pro/engineer from a excel VB

(OP)
Thanks for your help
That did the trick.
 

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