Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
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 ??
Solved! Go to Solution.
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
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
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
Question: what is wrong? How to debug to get more info?
Any idea??
Regards,
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
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.
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
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
Hi Gucio,
This is Charles from PTC Technical Support in Europe.
Was the information provided helpful somehow?
KR,
Charles.
HI Charles,
@PeterH's knowledge was very helpful. All of my doubts are clarified now.
Regards,