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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

How to create windchill product through API

nimish
9-Granite

How to create windchill product through API

Hello,

            Can anyone help to create windchill product through API. thanks in advance

2 REPLIES 2

Hi @nimish ,

Did you try using below example?

 

 

<%@page language="java"%>
<%@taglib uri="http://www.ptc.com/infoengine/taglib/core" prefix="ie"%>

<ie:webject name="Get-Properties" type="MGT">
    <ie:param name="ATTRIBUTE"      data="wt.federation.ie.VMName"/>
    <ie:param name="GROUP_OUT"      data="properties"/>
</ie:webject>

<ie:webject name="Query-Objects" type="OBJ">
  <ie:param name="INSTANCE"      data="$(properties[0]wt.federation.ie.VMName[0])" />
  <ie:param name="TYPE"          data="wt.inf.container.WTContainer"/>
  <ie:param name="ATTRIBUTE"     data="name" />
  <ie:param name="WHERE"         data="name='Demo Organization'" />
  <ie:param name="GROUP_OUT"     data="container" />
</ie:webject>

<ie:webject name="Query-Objects" type="OBJ">
    <ie:param name="instance"    data="${properties[]wt.federation.ie.VMName[]}"/>
    <ie:param name="attribute"   data="*"/>
    <ie:param name="type"        data="wt.inf.template.DefaultWTContainerTemplate"/>
    <ie:param name="where"       data="name='${@FORM[]template[]}'" default="General Product"/>
    <ie:param name="group_out"   data="template"/>
</ie:webject>


<ie:webject name="Create-Objects" type="ACT">
    <ie:param name="INSTANCE"         data="$(properties[0]wt.federation.ie.VMName[0])" />
    <ie:param name="CONTAINER_REF"    data="$(container[]obid[])"/>
    <ie:param name="FIELD"            data="containerInfoName='Product Test4'"/>
    <ie:param name="field"            data="containerInfoNumber='Product Test4'"/>
    <ie:param name="field"            data="template=${template[]masterReference[]}"/>
    <ie:param name="FIELD"            data="privateAccess=false"/>
    <ie:param name="TYPE"             data="wt.pdmlink.PDMLinkProduct"/>
    <ie:param name="ATTRIBUTE"        data="name, obid" delim=","/>		
    <ie:param name="GROUP_OUT" 	      data="$(@FORM[]group_out[])" default="product" />	
</ie:webject>

Note: Modify highlighted fields accordingly.

 

Best Regards,

Shirish 

 

Thanks Shirish for the reply I will try it.

Top Tags