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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Translate the entire conversation x

Copy name of model tree element to clipboard

DomenicLaritz
16-Pearl

Copy name of model tree element to clipboard

Hello folks,

 

a colleague asked me if I knew a way to copy the name of a selected model tree element to the clipboard.
Since I could not find an out-of-the-box solution, I developed a small tool for this purpose myself:
"Copy Model Tree Element Name To Clipboard"
Maybe someone else would like to use the tool.

12 REPLIES 12

I have released a new version 1.2.0 of the tool.
With this you can specify an optional second command line parameter /noext after the trail directory.
This will remove file extensions like ".PRT" or ".ASM".

Domenic, Thank you very much for your new version.

 

I tested in creo4, when I pasted the 'part name' the result was: "End of Trail File" not the name...

 

This program only works in creo7?  Thanks

Trebla
16-Pearl
(To:Trebla)

Sorry, I checked it again, I had a typo in the OS mapkey.

It works fine in creo4. Thank you

Hi,
I'm very interested in your script but I tried it and, with Creo Parametric 5, Paste give extra characters before and after the the name to copy.

The of the part (the name to COPY) is:
PROVA01
The result of the PASTE operationd is:
%CIPart 'PROVA01' not changes s

I checked the trail file and this  9 characters before and 15 characters after the part name.

I also tried checking the source code .au3 , but my code skills are VERY rusty.
Perhaps the character count to be parsed in the trail.txt file is in one of these files (File.au3; FileConstants.au3) that can't be downloaded? 


Any suggestions?


Hi,

 

I use the tool in Creo8 and it works fine, so if you use Creo5 I think it would work well also.

I don't understand the meaning of  "not changes s". 

If your part name is PROVA01, when you paste the name, I don't see the relation with any "s"...

Hi Trebla,
the text:

"%CIPart 'PROVA01' not changes s"

is exactly the sequence of characters that the Paste command returns after launching the script.
Not only the name I would like, that is, PROVA01, but also all the characters before and after how I wrote them between ""
So it seems that the .exe script makes a copy of characters higher than that it should copy from the trail.txt file

ok, sorry for my misundestanding...

I can tell you that without changing anything from the exe file; it works well for me in creo4 and also in creo8.

I would check your OS mapkey instead of the exe file...

Trebla
16-Pearl
(To:Trebla)

This is my mapkey, you could compare it with yours...

 

mapkey gn @MAPKEY_LABELget name;\
mapkey(continued) @SYSTEM"C:\\temp\\CopyModelTreeElementNameToClipboard.exe" \
mapkey(continued) "C:\\temp" /noext;

Hi Trebla,
my mapkey, obviolusly except for the path, is exactly the same.
I don't understand...

Hi,

I have the exe file saved in the "temp" directory.

You also need "trail files" saved in the same directory.

Therefore, in my case I have the config option:

trail_dir C:\temp

Ah, ok! I'll try this...

Again, this procedure in my system copy a wrong string of charater:
"%ClPart "PROVA-A" not changed s"
instead of:
"PROVA-A"

I give up!

Announcements

Top Tags