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

How to assign model name to default CSYS

MartinHanak
23-Emerald V

How to assign model name to default CSYS

This discussion is my reaction to CSYS name should alway be the Part Name idea.

 

Attached CSYS_rename_CR3_prvek4.zip file contains following files:

 

How to install script:

  1. create C:\PTC directory
  2. save zip file into C:\PTC directory
  3. unzip zip file into C:\PTC directory to get structure show on picture
  4. open config.pro file and copy two lines into your config.pro

 

How to run script:

  1. launch Creo 3.0 (in my case it is M100, English version)
  2. open part
  3. run mapkey dd1
  4. open assembly
  5. run mapkey dd2

 

Notes:

  • .au3 ... source file
  • .exe ... compiled source file
  • if you unzip zip file into directory different from C:\PTC, then you have to modify path defined in config.pro
  • notes in source file are written in Czech language, I hope that translate.google.com transfers Czech texts into English properly

 

Good luck !

 

Martin Hanak


Martin Hanák
17 REPLIES 17
mliska
5-Regular Member
(To:MartinHanak)

Hi Martin!,

Thank you for this tool with source code. This gives a whole new level to Creo Mapkeys combined with external application. And it's pretty clever how you did the renaming.

I didn't know, something like this is possible! I cannot say my thanks with words!

I wanted to ask, if you could share the $F2-mapkey you are using for this renaming method of CSYS. I have original scripts from IPM with $F2 for opening model tree, so the .exe files don't work for me.

Thanks again and I wish you the best!

MartinHanak
23-Emerald V
(To:mliska)

Hi,

I don not understand well your last paragraph:

I wanted to ask, if you could share the $F2-mapkey you are using for this renaming method of CSYS. I have original scripts from IPM with $F2 for opening model tree, so the .exe files don't work for me.

My guess ... you want call mapkey by clicking F2 key instead of clicking dd1 key combination. If this is the case then simply change config.pro line using Notepad.

mapkey dd1 @SYSTEMstart C:\\PTC\\CSYS_rename_CR3_prvek4\\rename_csys_prt.exe;

to

mapkey $F2 @SYSTEMstart C:\\PTC\\CSYS_rename_CR3_prvek4\\rename_csys_prt.exe;

MH


Martin Hanák
Chris3
19-Tanzanite
(To:MartinHanak)

I think he was looking at the .au3 source code which calls the F2 key

This method will rename the csys to match the part number only or will it automatically match the csys name when I create a new part?

MartinHanak
23-Emerald V
(To:ssayyad)

Hi,

the mapkey renames coordinate system (feature no.4) in model tree.

MH


Martin Hanák

Short video showing dd1 and dd2​ results.


Martin Hanák

Not useful solution

Not useful solution

RPN
13-Aquamarine
13-Aquamarine
(To:MartinHanak)

In Tcl I need one Line of code for this:

 

ps_feat set_name [lindex [ps_visit type csys] 0] [file root [ps_model cur]]

 

Next a procedure, which is more save:

 

FirstCsysNameToModelName.png

 

Here a movie ... 

 

 

dschenken
21-Topaz I
(To:RPN)

Not a usable solution.

RPN
13-Aquamarine
13-Aquamarine
(To:dschenken)

You are almost right, but p-Shell is running in a SandBox, you need to copy one folder only.

pEnv.png

The "PNG" shows the env, the movie shows what happen if you add a new folder to your SandBox programs.

 

  1. Start the Csys app,
  2. keep it running,
  3. do the source code edit
  4. Source the edited file again
  5. Run the newly created button

This is not a final app, but should show how easy it is to make an update or test new code.

 

 

Note: This Tcl program run in synchronous mode.

Cheers

dschenken
21-Topaz I
(To:RPN)

Does p-Shell ship from PTC?

RPN
13-Aquamarine
13-Aquamarine
(To:dschenken)

Ha, as I guess you work for PTC, and this is not from PTC Smiley Very Happy

dschenken
21-Topaz I
(To:RPN)

If I worked for PTC then I would have a PTC badge.

Feel free to link to the source.

RPN
13-Aquamarine
13-Aquamarine
(To:dschenken)

Use the mail address from the Wiki to get more information.

 

RPN
13-Aquamarine
13-Aquamarine
(To:dschenken)

100 Kudos for this statement Smiley Very Happy

functionality can be customized by toolkit for open/rename/saveas/import

Announcements