Skip to main content
2-Explorer
Nov 7, 2019 1:12 PM UTC
Solved

Aliased URL | Models in windchill using toolkit

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

zemanekpAnswer
14-Alexandrite
Nov 18, 2019 1:22 PM UTC

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

6 replies

zemanekp14-AlexandriteAnswer
14-Alexandrite
Nov 18, 2019 1:22 PM UTC

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

Translate
2-Explorer
Nov 20, 2019 7:16 AM UTC

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.

Translate
14-Alexandrite
Nov 20, 2019 8:00 AM UTC

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

Translate