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

Add Jlink to right click menu in model tree

akok
10-Marble

Add Jlink to right click menu in model tree

In assembly mode I have added a Jlink app to select then you right click on a part.

Can I send the part name to this Jlink, so I can let Jlink work with this part?

 

akok_0-1641903235786.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
sjuraj
13-Aquamarine
(To:akok)

When you have something selected it is in SelectionBuffer so you can retrieve anything you like from it. If you have selected component you can directly access whole model not just file name.

View solution in original post

5 REPLIES 5

Hi,

please ask PTC Support.


Martin Hanák

sjuraj
13-Aquamarine
(To:akok)

When you have something selected it is in SelectionBuffer so you can retrieve anything you like from it. If you have selected component you can directly access whole model not just file name.

akok
10-Marble
(To:sjuraj)

Thank you, it seems to by a step forward.

I can get the buffer, but a can't the part info, I have tried this:

Session session = pfcGlobal.GetProESession();
SelectionBuffer selection = session.GetCurrentSelectionBuffer();
Selections selections = selection.GetContents();

 

But I can't anything out of selections. The only thing I need is the file name.

 

Allan

sjuraj
13-Aquamarine
(To:akok)

You can have multiple items (seledted models) at same time .. to get first model in selection you do this

session.GetCurrentSelectionBuffer().GetContents().get(0).GetSelModel();

Or you can loop through all models in buffer  

Announcements
Attention: Creo 7.0 Customers
Please consider upgrading
End of Life announcement here.

NEW Creo+ Topics:
PTC Control Center
Creo+ Portal
Real-time Collaboration