Skip to main content
10-Marble
August 3, 2023
Question

How we can copy the windchill dynamic url through java code?

  • August 3, 2023
  • 1 reply
  • 1536 views

How we can copy the windchill dynamic url through java code?

How we can achieve the to copy the windchill dynamic url through java code? from part action menu with (new action item). 

 

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
August 3, 2023

Hello @CH_10067600 

You need to describe what you are trying achieve. 

There are apis to generate URL to a object. 

 

Here is example how to get URL to persistable object detail page 

(persistable object can be any object in the system , WTPart, CADDocument, WTDocument)

 

 

NmOid workOid = new NmOid();
workOid.setRef(persistObject); // persistObject is a object as a WTPart and so on. You just need to search for them with another API....
NmAction workNmAction = NmActionServiceHelper.service.getAction("object", "view");
workNmAction.setContextObject(workOid);

String objURL = workNmAction.getActionUrlExternal();

 

 

Hope this can help

PetrH

10-Marble
September 4, 2023

Can it be done through javascripts ?

Could you please the steps ?

 

 

Thanks, 

HelesicPetr
22-Sapphire II
22-Sapphire II
September 5, 2023

Hi @CH_10067600 

I couldn't I do not know the PTC javascript library so deeply and I do not use them so often. 

I call the java method directly on the jsp page

PetrH