I have a Pro/Engineer (Pro/E) Model with a Family Table that contains many Instances (variances of the Generic Model). I want to be able to export an Excel copy of the family table and create/use a macro to control some of the macros within Pro/E.
So far I am capable of activating Pro/E. I can activate Pro/E Mapkeys (macros within Pro/E). Where I am struggling is manipulating dialog boxes in Pro/E when they open. Pro/E mapkeys (to my knowledge) can not effectively manipulate the information within the dialog boxes. For example, I have a Pro/E drawing that shows the Generic Model. I want my macro to run a Pro/E Mapkey that does the manipulation of the Model(s) that I want. During the manipulation a dialog box opens wanting to know what Instance I want to replace the current Model with. At this point, the Excel macro will reactivate (after waiting) and select the next number in the appropriate column and send that number to the appropriate location in the open dialog box. From there it will then activate a second Pro/E Mapkey and continue through as designed.
This is what I have so far... Don't laugh...
"MACROTEST Rev: ///0" is the name of the Pro/E application/window.
"xaa" is the name of the first macro that I want to run.
'Make sure to name enter the exact application (window) name for Pro/Engineer.
AppActivate "MACROTEST Rev: ///0"
Application.Wait (Now + OneMinute / 60)
'Intialize screen - make sure the cursor is at the correct spot
Application.SendKeys keys:="xaa", Wait:=True
Application.Wait (Now + OneMinute / 30)
At this point a dialog box opens in Pro/E called "Select Instance." I can not seem to get the information from rows 6 through 32, column "A" to replace the information in the Select Instance dialog box that opens. I am shooting to have that information feed the "Instance" field that currently reads "[Fed from Excel Column]."
See:
Ask me questions if all of this isn't quite enough information.
Thanks!
Dan
So far I am capable of activating Pro/E. I can activate Pro/E Mapkeys (macros within Pro/E). Where I am struggling is manipulating dialog boxes in Pro/E when they open. Pro/E mapkeys (to my knowledge) can not effectively manipulate the information within the dialog boxes. For example, I have a Pro/E drawing that shows the Generic Model. I want my macro to run a Pro/E Mapkey that does the manipulation of the Model(s) that I want. During the manipulation a dialog box opens wanting to know what Instance I want to replace the current Model with. At this point, the Excel macro will reactivate (after waiting) and select the next number in the appropriate column and send that number to the appropriate location in the open dialog box. From there it will then activate a second Pro/E Mapkey and continue through as designed.
This is what I have so far... Don't laugh...
"MACROTEST Rev: ///0" is the name of the Pro/E application/window.
"xaa" is the name of the first macro that I want to run.
'Make sure to name enter the exact application (window) name for Pro/Engineer.
AppActivate "MACROTEST Rev: ///0"
Application.Wait (Now + OneMinute / 60)
'Intialize screen - make sure the cursor is at the correct spot
Application.SendKeys keys:="xaa", Wait:=True
Application.Wait (Now + OneMinute / 30)
At this point a dialog box opens in Pro/E called "Select Instance." I can not seem to get the information from rows 6 through 32, column "A" to replace the information in the Select Instance dialog box that opens. I am shooting to have that information feed the "Instance" field that currently reads "[Fed from Excel Column]."
See:
Ask me questions if all of this isn't quite enough information.
Thanks!
Dan