Skip to main content
1-Visitor
November 7, 2019
Solved

Aliased URL | Models in windchill using toolkit

  • November 7, 2019
  • 1 reply
  • 3017 views

Hi

 

 

We can identify aliased URL for model using API ProServerModelNameToAliasedURL(). This URL can be used to check-out model from windchill.

 

My query is that can we find all objects presents into windchill and from name of the those CAD objects, I would like to get aliased URL. 

 

Is it possible through toolkit to get list of objects present in Windchill?

 

Thanks and Regards

Ketan

Best answer by zemanekp

Hi, did you try ProFilesList?

You can get list of objects and subdirs from ProFilesList.

E.g. from path „wtpub://sip7/Products/product_name/parts/“ you obtain list (array) of:

wtpub://sip7/Products/product_name/parts/model_a.prt

wtpub://sip7/Products/product_name/parts/model_b.prt

 

This file pathes you can use to load models into a Workspace by ProMdlFiletypeLoad (or parse them and use ProMdlnameRetrieve).

Of course, you have to traverse subfolders recursively and scan Context by Context (mean „product_name“ - ProServerContextsCollect), and we talk about EPMDocumnets only…

 

It depends, what you need. Probably fast way would be ask through the WindChill API (I don't know it).

 

PZ

1 reply

zemanekp14-AlexandriteAnswer
14-Alexandrite
November 18, 2019

Hi, did you try ProFilesList?

You can get list of objects and subdirs from ProFilesList.

E.g. from path „wtpub://sip7/Products/product_name/parts/“ you obtain list (array) of:

wtpub://sip7/Products/product_name/parts/model_a.prt

wtpub://sip7/Products/product_name/parts/model_b.prt

 

This file pathes you can use to load models into a Workspace by ProMdlFiletypeLoad (or parse them and use ProMdlnameRetrieve).

Of course, you have to traverse subfolders recursively and scan Context by Context (mean „product_name“ - ProServerContextsCollect), and we talk about EPMDocumnets only…

 

It depends, what you need. Probably fast way would be ask through the WindChill API (I don't know it).

 

PZ

1-Visitor
November 20, 2019

Good option. I tried using API of ProFilesList(). How to identify whether context is product or library once we get contexts name using ProServerContextsCollect()? Product or Library is required for to prepare full directory path for ProFilesList() API.

14-Alexandrite
November 20, 2019

Hmm, the easiest way to differ them, is just from path (wch contexts are usually divided as follows):

wtpub://sip7/Products/product_name/parts/model_a.prt

wtpub://sip7/Libraries/norms/iso_a.prt

wtpub://sip7/Workspaces/

wtpub://sip7/Site/

----------------

Hmm, sorry, I didn't realize that, you don't know anything at the moment 🙂
So, try it? - check if context is accessible from Products\ or Librarier\ (at ProFilesList)?

 

PZ