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

How to get WTPart #?

ptc-190523
Newbie

How to get WTPart #?

How to get WTPart # We would like to use an automatic web link that could be as follows: http://server.com/Windchill/servlet/WindchillAuthGW/wt.enterprise.URLProcessor/URLTemplateAction?act... Where fixed url is http://server.com/Windchill/servlet/WindchillAuthGW/wt.enterprise.URLProcessor/URLTemplateAction?act... and WTPart # 30229365 The question is: How to get this WTPart #? I tried but not successfuly Thanks for any help
12 REPLIES 12

RE: How to get WTPart #?

I'm not sure I understand what you need. What do you mean "how to get this WTPart #?"? You want to know how to get this number for a particular part? It's IDA2A2 in the WTPART table in Oracle.

RE: How to get WTPart #?

Thanks for your reply. We shall try it Do you know a way to get this value directly from Windchill?

RE: How to get WTPart #?

There is different ways. Could you explain in more details what're you going to do and where are you going to implement it?

RE: How to get WTPart #?

Thanks for your reply. You will find more details at Windchill BOM customization topic. I want to export the technical information contained in Windchill PDMLink to our ERP system. From our ERP, we can directly access to the part in Windchill thanks to its URL, provided we have the WTPart # as explained. We created a special field in our ERP database where we put this WTPart value, so we can directly get technical data from PDMLink. This operation is manual at the moment. The next step will be automatic update of our ERP from Windchill. We already have all information, except where we could get this WTPart #... Any help is welcome... Thanks in advance JPC

RE: How to get WTPart #?

WTPart # is IDA2A2 in oracle table.It is random.I think no use for you. You can use WTPart Number as the key for integration with ERP System.

Re: RE: How to get WTPart #?

Starting with url "http://server.com/Windchill/servlet/WindchillAuthGW/wt.enterprise.URLProcessor/URLTemplateAction?act..."

This looks to be the details url for a WTPart. The given oid is a version reference. This url will always point to the latest iteration of the given version.

Alternately, you could have a url that looks like: "http://server.com/Windchill/servlet/WindchillAuthGW/wt.enterprise.URLProcessor/URLTemplateAction?act...."

In this case, 30229365 would be a unique value, found in table wtpart, column ida2a2.

I would store an ObjectReference (OR:wt....123) rather than a version reference (VR:345) but that's up to you.

Do you need to do this over the web? If so, create a custom jsp/servlet that returns/prints your String or xml or whatever you want.

In any case, once you work all that out. If you need a java approach, do something like the following.

String oid = request.getParameter("oid"); //"VR:wt.part.WTPart:12345" or "OR:wt.part.WTPart:12346"

WTPart part = (WTPart)new ReferenceFactory().getReference(oid).getObject();

return part.getNumber();

If you didn't know whether the given OID was a VR or OR and you wanted the latest info, you could do something like this:

String oid = request.getParameter("oid");

ReferenceFactory rf = new ReferenceFactory();

WTPart part = (WTPart)rf.getReference(oid).getObject();

VersionReference vr = VersionReference.newVersionReference(part);

part = (WTPart)vr.getObject();

return part.getNumber();

Re: How to get WTPart #?

Hello,

I'm also trying to make a interface between Windchill and Navision.

I looking for the Item number, name and statesstate. These I can find really quickly in the WTPart and WTPartMaster.

Now the complex part;

I'm also looking for the revision on the ITEM. By wich fileds can I connect WTPart and WTpartmaster?

Wright now I'm not getting the revision on the field

idA3containerReference

I hope that you can help!

Marco

Re: How to get WTPart #?

Hello,

I'm also trying to make a interface between Windchill and Navision.

I looking for the Item number, name and statesstate. These I can find really quickly in the WTPart and WTPartMaster.

Now the complex part;

I'm also looking for the revision on the ITEM. By wich fileds can I connect WTPart and WTpartmaster?

Wright now I'm not getting the revision on the field

idA3containerReference

I hope that you can help!

Marco

Re: How to get WTPart #?

Hello,

I'm also trying to make a interface between Windchill and Navision.

I looking for the Item number, name and statesstate. These I can find really quickly in the WTPart and WTPartMaster.

Now the complex part;

I'm also looking for the revision on the ITEM. By wich fileds can I connect WTPart and WTpartmaster?

Wright now I'm not getting the revision on the field

idA3containerReference

I hope that you can help!

Marco

Re: How to get WTPart #?

Hello,

I'm also trying to make a interface between Windchill and Navision.

I looking for the Item number, name and statesstate. These I can find really quickly in the WTPart and WTPartMaster.

Now the complex part;

I'm also looking for the revision on the ITEM. By wich fileds can I connect WTPart and WTpartmaster?

Wright now I'm not getting the revision on the field

idA3containerReference

I hope that you can help!

Marco

Re: How to get WTPart #?

Hello,

I'm also trying to make a interface between Windchill and Navision.

I looking for the Item number, name and statesstate. These I can find really quickly in the WTPart and WTPartMaster.

Now the complex part;

I'm also looking for the revision on the ITEM. By wich fileds can I connect WTPart and WTpartmaster?

Wright now I'm not getting the revision on the field

idA3containerReference

I hope that you can help!

Marco

Re: How to get WTPart #?

Hello,

I'm also trying to make a interface between Windchill and Navision.

I looking for the Item number, name and statesstate. These I can find really quickly in the WTPart and WTPartMaster.

Now the complex part;

I'm also looking for the revision on the ITEM. By wich fileds can I connect WTPart and WTpartmaster?

Wright now I'm not getting the revision on the field

idA3containerReference

I hope that you can help!

Marco

Announcements