cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Run mapkey from a trail file

vmcdaniel
2-Guest

Run mapkey from a trail file

OK, I've searched the archives long enough with no solution.

How do you run a mapkey from a trail file?

Vaughn McDaniel III
CAD/PDM Administrator
Windsor Industries
A member of Kärcher Floor Care
Englewood, CO
303.762.1800 x187
9 REPLIES 9

Is there are context I can use in a trail file to call a mapkey? e.g
#<mapkey_name>.
Or am i stuck putting all the commands in the trail file.

Vaughn McDaniel III
CAD/PDM Administrator
Windsor Industries
A member of Kärcher Floor Care
Englewood, CO
303.762.1800 x187




"Vaughn McDaniel" <->
04/03/2008 10:54 AM
Please respond to
"Vaughn McDaniel" <->


To
-
cc

Subject
[proecad] - Run mapkey from a trail file







OK, I've searched the archives long enough with no solution.

How do you run a mapkey from a trail file?

Vaughn McDaniel III
CAD/PDM Administrator
Windsor Industries
A member of Kärcher Floor Care
Englewood, CO
303.762.1800 x187
----------

This trail file does nothing but run the mapkey 'lbd'. It's from 2001, but still works up to WF3. I haven't tried WF4 yet.

I use this to run a specific mapkey (loading a specific config file) at Pro|E launch. I've made several copies of this and simple changed the 'lbd' to another mapkey sequence and it runs just fine.

!trail file version No. 1151
!Pro/ENGINEER TM 2001 (c) 1988-2001 by Parametric Technology Corporation All Rights Reserved.
~ Select `main_dlg_cur` `MenuBar1` \
1 `Utilities`
~ Close `main_dlg_cur` `MenuBar1`
~ Activate `main_dlg_cur` `Utilities.psh_util_macros`
~ Select `mapkey_main` `list_mapkeys` \
1 `lbd`
~ Activate `mapkey_main` `RunButton`

Doug Schaefer
--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

Doug I am trying to create a file open then run a mapkey from a batch file. When I do this I get a ton of extra stuff, not sure what I can delete and what I cant. Any suggestions?

This is a very old post - note the original is dated 2008.

That said, I'm still using this same method, and likely the same trail file.

I created the trail file by starting a new session and typing the mapkey I want to run.  That's it, don't close Creo or do anything else.  Go to your trail file folder and find that trail file and copy it.  Then, you need this line in your batch file to run the trail file when you start Creo:

start "" "path/to/parametric.exe" path/to/trail/file

I hope that helps.

--
Doug Schaefer | Experienced Mechanical Design Engineer
LinkedIn

Scott,

this may not answer your question but it may give you some insight...

I got this from Niko Pintar, either here or on MCAD central, figured it out and applied it to my environment

What this does is creates a new drawing, when the model is open, with a mapkey

mapkey "std" starts the process of creating a new drawing then the bat file creates a tiff image (to grab the name) then writes the name to a file.

another bat file is started (within "std")  where the filename is picked up and a mapkey script "usdrw" is written to a .pro text file, now containing the new name.

Further into the "std" mapkey, the new .pro file is read in, now defining "usdrw" in the current session.

at the end of "std" mapkey, the newly defined "usdrw" mapkey is now initiated.

perhaps you can edit it to what you are looking to do,

good luck and hope it helps

ron

Well it is interesting. But what I would like to do is

run a trail file (with a defined part number, that I can change in trail file), then run a mapkey that generates mass and saves the model

call "C:\PTC\Creo2_M070\Creo 2.0\Parametric\bin\parametric.bat" "D:\tmp\creo\my_trail.txt" -g:no_graphics

Well, to be honest, I can't invest the time to create scripts to solve the challenge you have.

hopefully, I provided an answer and perhaps more to your initial question of how to run/initiate/write a file with a mapkey.

Sorry

ron

I got it to work, so now I have a trail file that I can run in non graphic mode.

Two thumbs up!

Announcements
Business Continuity with Creo: Learn more about it here.

Top Tags