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
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
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
Steve
Stephen Seymour, PE
Seymour Engineering & Consulting Group
www.seymourecg.com
RE: Running Pro/engineer from a excel VB
That did the trick.