Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Excel Macro to control Pro/Engineer

Status
Not open for further replies.

Siegrist

Technical User
Feb 10, 2010
2
US
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
 



Hi,

Pro/E is a CAD application, I believe. VERY few members, if ANY, would know anything about that application's Object Model.

This forum is for Microsoft VBA. Not really the right place for Pro/E.

Have you tried searching this site for Pro/E?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I did try, but it kept coming up with nothing found. I am hoping that a few of the members might work with both and know some of the tricks involved with working with both programs.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top