Skip to main content
1-Visitor
October 22, 2021
Question

How to use "Desktop::ReadTextFromTrail" in OTK Java

  • October 22, 2021
  • 1 reply
  • 2877 views

Dear community,

does anybody know how to read from the trail file using Desktop.ReadTextFromTrail()?

/otk_java_doc/objecttoolkit_Creo/api/c-uifcDesktop-Desktop.html#ReadTextFromTrail

I cannot get a handle on desktop object.

 

Kind regards

Michael

1 reply

15-Moonstone
December 2, 2021

uifc is part of paid version of java toolkit.

Can you describe what you are trying to achieve ?

MichelH1-VisitorAuthor
1-Visitor
December 2, 2021

When I click a modelitem in the modeltree I get something like:

 

~ Select `main_dlg_cur` `PHTLeft.AssyTree` 1 `node21`

 

which I wanted to use (`node21`) for building a mapkey dynamically...

15-Moonstone
December 2, 2021

You can programically prompt user to select model (eg. part or assembly) and toolkit return you handler to selected model object.

Selections sels = Session.Select(selOptions, null);
Model model = sels.get(0).GetSelModel();
String fileName = model.GetFileName();