Skip to main content
13-Aquamarine
January 17, 2024
Solved

Mapkey Copy & Paste

  • January 17, 2024
  • 1 reply
  • 3037 views

Hello,

 

I am trying to create a mapkey that allows me to export a drawing as a PDF with the filename from a parameter I created. The parameter I created contains the part number and revision of the drawing being exported.

 

However, when I copy the 'FILENAME' parameter, the mapkey appears to only copy the 'FILENAME' parameter from the original session.

 

Is there any good way to copy a parameter from the active part while recording a mapkey?

 

Thank you!

Jeff H.

Best answer by tbraxton

I do not think this is possible with mapkey functionality alone. Anything in the UI that requires a user to generate a string in the UI dialogue is not going to update automatically from a mapkey. One way to deal with this is have the mapkey call an external script that would rename the PDF file once saved using Windows OS functionality.

 

When using save as on a file you will get this dialogue and the default value is the current file name. The mapkey will record the mouse actions and keyboard entry in the field but mapkeys will not create a "variable" that will read from a parameter AFAIK.

 

tbraxton_0-1705524841538.png

 

1 reply

tbraxton
22-Sapphire II
tbraxton22-Sapphire IIAnswer
22-Sapphire II
January 17, 2024

I do not think this is possible with mapkey functionality alone. Anything in the UI that requires a user to generate a string in the UI dialogue is not going to update automatically from a mapkey. One way to deal with this is have the mapkey call an external script that would rename the PDF file once saved using Windows OS functionality.

 

When using save as on a file you will get this dialogue and the default value is the current file name. The mapkey will record the mouse actions and keyboard entry in the field but mapkeys will not create a "variable" that will read from a parameter AFAIK.

 

tbraxton_0-1705524841538.png

 

JiffiPop13-AquamarineAuthor
13-Aquamarine
January 17, 2024

That's a shame, it would be a very nice feature to add for my use case.

 

I have never scripted before, but might be able to figure it out. How would you go about doing this - a batch file? I am unsure how to tie a batch file with Creo, so everytime I export the batch file knows to rename the PDF.

 

In any case, thanks for the quick response!

tbraxton
22-Sapphire II
22-Sapphire II
January 17, 2024
Mapkey operations include the ability to do the following actions:
Pause for user interaction.
Handle message window input more flexibly.
Run operating system scripts and commands. The Record Mapkey dialog box contains the OS Script tabbed page, whose options allow you to run OS commands instead of Creo Parametric commands.

 

 

tbraxton_0-1705529852815.png