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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

How to fetch the subtypes of Project in ProjectLink?

jselvaraj
8-Gravel

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

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

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

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


Top Tags