How to fetch the subtypes of Project in ProjectLink?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Labels:
-
Other
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.