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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Add Jlink to right click menu in model tree

akok
11-Garnet

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
MartinHanak
24-Ruby II
(To:akok)

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
11-Garnet
(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  

Top Tags