Skip to main content
6-Contributor
December 2, 2025
Question

Create mapkey with a variable to save a .pdf to a path and date

  • December 2, 2025
  • 1 reply
  • 391 views

I would like to create a map key to save a file to the current working directory\Release with the current date. Is there a way to do this with a variable? ie  %CWD\Release\filename.%mm%dd%yy.pdf

1 reply

22-Sapphire II
December 2, 2025

It is possible to call an external script from within a mapkey. I think you would need to use this function in order to achieve this using a mapkey. Refer to this thread for examples.

 

https://community.ptc.com/t5/Customization/How-to-call-a-external-applications-using-OS-script-mapkey/td-p/647527 

6-Contributor
December 2, 2025

It doesn't look like an external script understands what the Current Working Directory is outside of Creo.

22-Sapphire II
December 2, 2025

I am pretty sure that the APIs have calls that will return the current working directory. The VB and J-Link API is part of every Creo license so that could be one option for you.

 

https://support.ptc.com/help/creo_toolkit/vbapi_plus/usascii/index.html#page/creo_toolkit/user_guide/Directories.html