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

Mapkey in Creo 5+; Select a file in assy and run mapkey to "Show file in Windows Explorer"

PetePickettII
8-Gravel

Mapkey in Creo 5+; Select a file in assy and run mapkey to "Show file in Windows Explorer"

To all the GURUS out there.  Got any idea how to accomplish this?

 

Using Creo5. i would like to be able to select a part and in the RMB menu i would like to be able to choose "SHOW FILE IN WINDOWS EXPLORER" because i use a lot of search_paths.    Got any idea how it can be done?

 

I know you can launch windows explorer with a mapkey, but to have it open the explorer to a specific location that a part/asm file sits.  

4 REPLIES 4

You can call an external OS script using a mapkey. Making a windows script to launch Windows file manager should be straight forward. Passing the filename as an argument to an external script using a mapkey is the tricky part here and because of this I think you will need to use a Creo API and not only a mapkey to accomplish this. I can not think of a way to pass an argument using only a mapkey you need to connect a pipe from Creo to the external script,

You can add your mapkey calling the OS script to the context sensitive menu for RMB selection.

 

See this article for an overview.

https://www.ptc.com/en/support/article/CS151240 

FV
17-Peridot
17-Peridot
(To:tbraxton)


@tbraxton wrote:

You can call an external OS script using a mapkey. Making a windows script to launch Windows file manager should be straight forward. Passing the filename as an argument to an external script using a mapkey is the tricky part here and because of this I think you will need to use a Creo API and not only a mapkey to accomplish this. I can not think of a way to pass an argument using only a mapkey you need to connect a pipe from Creo to the external script,

You can add your mapkey calling the OS script to the context sensitive menu for RMB selection.

 

See this article for an overview.

https://www.ptc.com/en/support/article/CS151240 


The first part of this mapkey should call 'Tools->Investigate->View Changes' or 'Tools->Model Information' or 'Tools->Component'. All of those commands will make a text file which would contain a text-line with the filesystem path for the component in question. The text file will be either in the working directory or in 'ProwtTmpDir' under some subdirectory in user's %temp% directory in case of the xml /html info file variety.  OS script could use this info and pop-up an explorer window. There is also a confi.pro option which would change behavior of 'info' commands to output info data as a plain text or as an html/xml.

 

another option is to write a script which will 'tail -f' a trail file and when a script would see a combination of certain commands - for example 'Volume', 'Date and Time', 'Date and Time' - this script would extract a model name from the 'Volume' line in the trail file and with the knowledge of the model name would scan the trail file for filesystem path of this model and so on...

 

HIH.

Have you tried the config option display_full_object_path?

Controls the display of the object's full file name (including its object-type suffix and its version number) and file path in the window title and Model Info display. Yes - Displays full file name and file path. No - Displays object name only.


@PetePickettII wrote:

To all the GURUS out there.  Got any idea how to accomplish this?

 

Using Creo5. i would like to be able to select a part and in the RMB menu i would like to be able to choose "SHOW FILE IN WINDOWS EXPLORER" because i use a lot of search_paths.    Got any idea how it can be done?

 

I know you can launch windows explorer with a mapkey, but to have it open the explorer to a specific location that a part/asm file sits.  


Hi,

you can use AutoIt script. When you open the part in separate window, you can launch AutoIt script via mapkey.

AutoIt functionality enables you to create AutoIt script which:

  • reads part name from Creo window title
  • reads the contents of active trail file and locates line containing path to part file
  • extracts the path and open File Explorer displaying directory contents

Note: Please do not ask me to help you to create such script 🙂


Martin Hanák
Announcements