Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

running trail file through Pro/TOOLKIT

miky

New member
Is there any way to run trail file through trail file.?


I Tried following ways


1)"#Tools#Play trail/training file..." macro does not open UI for selection of trail file


when passed to ProMacroExecute.


2) when macro is generaeted using mapkey( which has clikcs to Tools, Play trail.., then selection og trail file from UI dialog)and this macro is passed to ProMacroExecute() returns -26(INVALID TYPE).It opens the UI dialog after completing the application.


It gives the control to user after completing the application and not at the point where ProMacroExecute() is called.( I did not understand this behaviour).I need to run the trail for multiple time. so this is not the correct way.I wanted the macro should be executed at the place I called ProMacroExecute().


Anybody can help to find solution?


Regards


Miky
 
Hi Miky,


If you check the documentation for ProMacroExecute in the Execution Rules section it states:
<DL>
<DD>
<LI =bullet>Do not call the function ProMacroExecute() during the following operations:</LI></DD></DL>
<UL =1>
<UL =1>
<LI =BulletList01><A name=582></A>Activating dialog boxes or setting the current model
<LI =BulletList01><A name=583></A>Erasing the current model
<LI =BulletList01><A name=584></A>Replaying a trail file </LI>[/list][/list]
Bryan
 
Yes, I agree that ProMacroExecute() will not run trail, but I did not understand the behaviour. After running the toolkit application, it is running macro ( tools,play trail)and then opens UI to select the trail file. If I select the trail file, then it runs the trail.
 
Certain Pro/E functions can be run synchronously by using ProMacroExecute. Others - like running a trail file - can't and they are executed when your Pro/TOOLKIT program ends which is the same behavior as ProMacroLoad.


I have worked around this in the past by having my program end and run the trail file. At the end of the trail file you have it restart your Toolkit app. You just need to set a flag of some sort so your program knows whether it was started or restarted but that's trivial.
 
Thanks bruppert.


I think I have to use similar kind of technique that you suggested.


regards


miky
 

Sponsor

Back
Top