Cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the name of a Robot.cojt

Experimenter
Experimenter

If I use TxRobot.Name,I can get the name of Robot that shows in TxApplication.

I want to know how to get the JT name of the robot that shows in resourse library .

Appreciate for any reply,Thanks!

2 REPLIES

Re: How to get the name of a Robot.cojt

Valued Contributor
Valued Contributor

DianeG gave a solution at the link below which gives the FullPath address for a component.  You could use this method and just use the split command with "\" delimeter.  The last element in the array should be the name of your COJT.  Building on her code, something like this

...

String[] substrings = cojtPath.Split("\");

String cojtName = substrings [substrings.Length-1];

 

 

TxLibraryStorage-Class

 

 

Re: How to get the name of a Robot.cojt

Experimenter
Experimenter

Thanks a lot for your reply! Finally It got worked.

Best wishes!