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 an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

How to use LoadFromFile utility to load "Options" with custom IBA ??

Gucio
14-Alexandrite

How to use LoadFromFile utility to load "Options" with custom IBA ??

I am using Windchill PDMLink Release 12.1 and Datecode with CPS 12.1.2.2
I have created additional IBA for Options purpose.
How to use LoadFromFile utility to load "Options" with this additional IBA ??

Krzysztof
1 ACCEPTED SOLUTION

Accepted Solutions
HelesicPetr
21-Topaz II
(To:Gucio)

Hi @Gucio 

What have I written?

but if the definition does not exists, it is not possible to set the IBA definition for the option group

PetrH

View solution in original post

10 REPLIES 10
Rocket_Max
17-Peridot
(To:Gucio)

Hi @Gucio 

Options and Variants?

HelesicPetr
21-Topaz II
(To:Gucio)

Hi @Gucio 

In the file csvmapfile you should find begin and end element for the object and between this elements there are added the IBA definitions.

 

Here is example for WTPart object (same way it should be for the Options)

 

<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standardX20.dtd">
<NmLoader>
<csvBeginWTPart handler="wt.part.LoadPart.beginCreateWTPart" >
    <csvuser>Administrator</csvuser>
    <csvpartName>TESTIMPORT.ASM</csvpartName>
    <csvpartNumber>00151065</csvpartNumber>
    <csvtype>separable</csvtype>
    <csvgenericType></csvgenericType>
    <csvcollapsible></csvcollapsible>
    <csvlogicbasePath></csvlogicbasePath>
    <csvsource>make</csvsource>	
    <csvfolder>/Default/WtParts</csvfolder>
    <csvlifecycle>Basic</csvlifecycle>	
    <csvview>INWORK</csvview>
    <csvvariation1></csvvariation1>
    <csvvariation2></csvvariation2>
    <csvteamTemplate></csvteamTemplate>
    <csvlifecyclestate>RELEASED</csvlifecyclestate>
    <csvtypedef>wt.part.WTPart</csvtypedef>
    <csvversion>-</csvversion>
    <csviteration>1</csviteration>
    <csvenditem></csvenditem>
    <csvtraceCode></csvtraceCode>
    <csvorganizationName></csvorganizationName>
    <csvorganizationID></csvorganizationID>
    <csvsecurityLabels></csvsecurityLabels>
    <csvcreateTimestamp></csvcreateTimestamp>
    <csvmodifyTimestamp></csvmodifyTimestamp>
    <csvminRequired></csvminRequired>
    <csvmaxAllowed></csvmaxAllowed>
    <csvdefaultUnit>pcs</csvdefaultUnit>
    <csvserviceable></csvserviceable>
    <csvservicekit></csvservicekit>
</csvBeginWTPart>
<csvCreateOrUpdateIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" >
    <csvdefinition>MY_CODE</csvdefinition>
    <csvvalue1>0100101012100</csvvalue1>
    <csvvalue2></csvvalue2>
    <csvdependency_id></csvdependency_id>
</csvCreateOrUpdateIBAValue>
<csvEndWTPart handler="wt.part.LoadPart.endCreateWTPart" >
    <csvparentContainerPath>F</csvparentContainerPath>
</csvEndWTPart>
</NmLoader>

 

mapfile

BeginOption~create~com.ptc.windchill.option.load.Loader.beginOption~typedef~name~description~optionDataType~QoMName~OverrideDisplayUnits~optionGroup~requiredOption~singleChoiceSelection~number~autoCreateBooleanChoices
EndOption~create~com.ptc.windchill.option.load.Loader.endOption

 

PetrH

Gucio
14-Alexandrite
(To:HelesicPetr)

Hi PetrH,

 

thx for replaing for my next issue - hope this time you will help me again 🙂

I've done some test, and for Options (Options and Variants modul)  sample xml file should looks as follow:

 

<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standard12_1.dtd">
<NmLoader>
 <csvBeginOption handler="com.ptc.windchill.option.load.Loader.beginOption" >
 <csvtypedef>com.ptc.windchill.option.DesignOption</csvtypedef>
 <csvname>test_1</csvname>
 <csvdescription>description_1</csvdescription>
 <csvoptionDataType></csvoptionDataType>
 <csvQoMName></csvQoMName>
 <csvOverrideDisplayUnits></csvOverrideDisplayUnits>
 <csvoptionGroup></csvoptionGroup>
 <csvrequiredOption></csvrequiredOption>
 <csvsingleChoiceSelection></csvsingleChoiceSelection>
 <csvnumber></csvnumber>
 <csvautoCreateBooleanChoices></csvautoCreateBooleanChoices>
</csvBeginOption>

  <csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" >
   <csvdefinition>DESCRIPTION_PL</csvdefinition>
   <csvvalue1>myDescription</csvvalue1>
   <csvvalue2></csvvalue2>
   <csvdependency_id></csvdependency_id>
  </csvIBAValue>

 <csvEndOption handler="com.ptc.windchill.option.load.Loader.endOption" />

</NmLoader>

 but going deeper, customer wants to load group with custom IBA defined. So my file is

 

<?xml version="1.0" ?><!DOCTYPE NmLoader SYSTEM "standard12_1.dtd">
<NmLoader>
<csvOptionGroup handler="com.ptc.windchill.option.load.Loader.createGroup" >
    <csvname>Groupa 1</csvname>
    <csvoptionTypeDef>com.ptc.windchill.option.DesignOption</csvoptionTypeDef>
</csvOptionGroup>

<csvIBAValue handler="wt.iba.value.service.LoadValue.createIBAValue" >
    <csvdefinition>SP_GROUP_GROUP_DESCR_EN</csvdefinition>
    <csvvalue1>english group description</csvvalue1>
    <csvvalue2></csvvalue2>
    <csvdependency_id></csvdependency_id>
</csvIBAValue>

</NmLoader>

 

as a result 

 

Gucio_0-1698760719686.png

Question: what is wrong? How to debug to get more info?

 

Any idea??

 

Regards,

gucio

Krzysztof
HelesicPetr
21-Topaz II
(To:Gucio)

Hi @Gucio

You need to place the IBA definition between begin and end elements for the optionsgroup so you need to find correct definition in the csvmapfile.txt for the option same as the csvBeginOption and csvEndOption 

 

but if the definition does not exists, it is not possible to set the IBA definition for the option group

 

 PetrH

Gucio
14-Alexandrite
(To:HelesicPetr)

Hi PetrH,

 

There are no begin/end elements for OptionGroup in csvmapfile.txt. There is only one line conected to OptionGroup:

 

OptionGroup~create~com.ptc.windchill.option.load.Loader.createGroup~name~optionTypeDef

 

- so It seems there is no option to add IBA to option group.

Krzysztof
HelesicPetr
21-Topaz II
(To:Gucio)

Hi @Gucio 

What have I written?

but if the definition does not exists, it is not possible to set the IBA definition for the option group

PetrH

can we use this to load or create new iba 
CreateOrUpdateIBAValue~create~wt.iba.value.service.LoadValue.createOrUpdateIBAValue~definition~value1~value2~dependency_id

HelesicPetr
21-Topaz II
(To:@_1647)

Hi @_1647 

What do you need?

The method just load a value to the IBA parameter to a given object. For example WTPart.

It does not create the IBA parameter in the type and attribute management. 

PetrH

cgautier
17-Peridot
(To:Gucio)

Hi Gucio,

This is Charles from PTC Technical Support in Europe.
Was the information provided helpful somehow?
KR,

Charles.

Gucio
14-Alexandrite
(To:cgautier)

HI Charles,

 

@PeterH's knowledge was very helpful. All of my doubts are clarified now.

 

Regards,

Krzysztof
Top Tags