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

How to fetch the subtypes of Project in ProjectLink?

jselvaraj
Regular Member

How to fetch the subtypes of Project in ProjectLink?

Hello,

I have a requirement that I need to fetch all the subtypes of the Project type.

can you please let me know the available API for this?

Thanks in advance.

Best Regards,

John

3 REPLIES 3

Re: How to fetch the subtypes of Project in ProjectLink?

Hi John,

Are you looking to query all the projects created using sub-type or just list all the sub-types of Project?

Regards,

Bhushan

Re: How to fetch the subtypes of Project in ProjectLink?

Hi Bhushan,

Thanks for your reply.

I would like to list all subtypes of the project that we see from type and attributes management...

Regards,

John

Re: How to fetch the subtypes of Project in ProjectLink?

You can use Infoengine.

Copy the attached file in $WT_HOME/tasks.

You can test it from the browser with this URL, and you can change the type parameter

http://pdmlinkServer/Windchill/servlet/IE/tasks/TypeHierarchy.xml?type=wt.projmgmt.admin.Project

 

An infoengine task can be called from java.

 

 

import com.infoengine.SAK.Task
import com.infoengine.object.factory.Group
import wt.session.SessionHelper

Task task = new Task("TypeHierarchy.xml");
task.setUsername(SessionHelper.manager.getPrincipal().getName());
task.setParam("type", "wt.projmgmt.admin.Project");

task.invoke();
Group group = task.getGroup("types");

for (int i = 0; i < group.getElementCount(); i++) {
    String type = group.getAttributeValue(i,"type")
    //.....
}

 

Hope it helps.

Announcements