Пример файла загрузки
Данный пример иллюстрирует файл загрузки, который используется, чтобы создать объекты общих, специфичных для вида данных предприятия и специфичных для производства функциональных данных для Part00001.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE NmLoader SYSTEM "standard11_1.dtd">
<NmLoader>
<!--This example creates the given objects and defines attributes and effectivities on the objects.
Part00001(Design)
-CED - DateEff(01/01/1950-01/01/1955), IBA(1)
-VSED(Design) - DateEff(01/01/1950-01/01/1955), IBA(1)\
PFD(PFD1_PFD_DATA_SOFT_TYPE) - DateEff(01/01/1977-01/01/1978), IBA(1)
PFD(PFD2_PFD_DATA_SOFT_TYPE) - DateEff(01/01/1977-01/01/1978), IBA(1)
-->
<csvDisableAutoCreationOfPFD
handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.disableAutoCreationOfPFD" />
<!--Search for Part00001.-->
<csvBeginSearchPart handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.beginSearchPart">
<csvpartNumber>Part00001</csvpartNumber>
<csvorganizationName>Demo</csvorganizationName>
<csvversion>A</csvversion>
<csviteration>1</csviteration>
<csvview>Design</csvview>
<csvvariation1/>
<csvvariation2/>
</csvBeginSearchPart>
<!--Create common enterprise data.-->
<csvBeginEnterpriseData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.beginCreateOrUpdateEnterpriseData">
<csvversion/>
<csviteration/>
<csvview/>
<csvlifecycle>Basic</csvlifecycle>
<csvlifecyclestate/>
</csvBeginEnterpriseData>
<!--Set effectivity.-->
<csvExtAddEffData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.addEffData">
<csvExtResItemEffectivityType>wt.effectivity.WTDatedEffectivity</csvExtResItemEffectivityType>
<csvtypeModifier/>
<csvExtResItemEffectivityValue>01/01/1950-01/01/1955</csvExtResItemEffectivityValue>
</csvExtAddEffData>
<!--Add attributes.-->
<csvIBAValue handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.createIBAValue">
<csvdefinition>ced-myattr1</csvdefinition>
<csvvalue1>ced-myattr1_value<//csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvEndEnterpriseData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.endCreateOrUpdateEnterpriseData"/>
<!--Create view-specific enterprise data.-->
<csvBeginEnterpriseData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.beginCreateOrUpdateEnterpriseData">
<csvversion/>
<csviteration/>
<csvview>Design</csvview>
<csvlifecycle>Basic</csvlifecycle>
<csvlifecyclestate/>
<csvphantom>true</csvphantom>
</csvBeginEnterpriseData>
<!--Set effectivity.-->
<csvExtAddEffData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.addEffData">
<csvExtResItemEffectivityType>wt.effectivity.WTDatedEffectivity</csvExtResItemEffectivityType>
csvtypeModifier/>
<csvExtResItemEffectivityValue>01/01/1950-01/01/1955</csvExtResItemEffectivityValue>
</csvExtAddEffData>
<!--Add attributes.-->
<csvIBAValue handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.createIBAValue">
<csvdefinition>myattr1</csvdefinition>
<csvvalue1>myattr1_value</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<!--Create plant-specific functional data.-->
<csvBeginPlantFunctionalData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.beginCreateOrUpdatePlantFunctionalData">
<csvversion/>
<csviteration/>
<csvlifecycle>Basic</csvlifecycle>
<csvlifecyclestate/>
<csvalternate1>SN00001</csvalternate1>
<csvcategory>Procurement</csvcategory>
<csvtypedef>org.rnd.PFD1_PFD_DATA_SOFT_TYPE</csvtypedef>
</csvBeginPlantFunctionalData>
<!--Set effectivity.-->
<csvExtAddEffData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.addEffData">
<csvExtResItemEffectivityType>wt.effectivity.WTDatedEffectivity</csvExtResItemEffectivityType>
<csvtypeModifier/>
<csvExtResItemEffectivityValue>01/01/1977-01/01/1978</csvExtResItemEffectivityValue>
</csvExtAddEffData>
<!--Add attributes.-->
<csvIBAValue handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.createIBAValue">
<csvdefinition>myPFDattr1</csvdefinition>
<csvvalue1>myPFDattr1_value</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvEndPlantFunctionalData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.endCreateOrUpdatePlantFunctionalData"/>
<!--Create plant-specific functional data.-->
<csvBeginPlantFunctionalData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.beginCreateOrUpdatePlantFunctionalData">
<csvversion/>
<csviteration/>
<csvlifecycle>Basic</csvlifecycle>
<csvlifecyclestate/>
<csvalternate1>SN00001</csvalternate1>
<csvalternate2>Floor-1</csvalternate1>
<csvcategory>Procurement</csvcategory>
<csvtypedef>org.rnd.PFD1_PFD_DATA_SOFT_TYPE</csvtypedef>
</csvBeginPlantFunctionalData>
<!--Set effectivity.-->
<csvExtAddEffData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.addEffData">
<csvExtResItemEffectivityType>wt.effectivity.WTDatedEffectivity</csvExtResItemEffectivityType>
<csvtypeModifier/>
<csvExtResItemEffectivityValue>01/01/1977-01/01/1978</csvExtResItemEffectivityValue>
</csvExtAddEffData>
<!--Add attributes.-->
<csvIBAValue handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.createIBAValue">
<csvdefinition>myPFDattr1</csvdefinition>
<csvvalue1>myPFDattr1_value</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvEndPlantFunctionalData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.endCreateOrUpdatePlantFunctionalData"/>
<!--Create plant-specific functional data.-->
<csvBeginPlantFunctionalData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.beginCreateOrUpdatePlantFunctionalData">
<csvversion/>
<csviteration/>
<csvlifecycle>Basic</csvlifecycle>
<csvlifecyclestate/>
<csvtypedef>org.rnd.PFD2_PFD_DATA_SOFT_TYPE</csvtypedef>
</csvBeginPlantFunctionalData>
<!--Set effectivity.-->
<csvExtAddEffData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.addEffData">
<csvExtResItemEffectivityType>wt.effectivity.WTDatedEffectivity</csvExtResItemEffectivityType>
<csvtypeModifier/>
<csvExtResItemEffectivityValue>01/01/1977-01/01/1978</csvExtResItemEffectivityValue>
</csvExtAddEffData>
<!--Add attributes.-->
<csvIBAValue handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.createIBAValue">
<csvdefinition>mynewPFDattr1</csvdefinition>
<csvvalue1>mynewPFDattr1_value</csvvalue1>
<csvvalue2/>
<csvdependency_id/>
</csvIBAValue>
<csvEndPlantFunctionalData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.endCreateOrUpdatePlantFunctionalData"/>
<csvEndEnterpriseData handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.endCreateOrUpdateEnterpriseData"/>
<csvEndSearchPart handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.endSearchPart"/>
<csvEnableAutoCreationOfPFD
handler="com.ptc.windchill.enterprise.data.load.LoadEnterpriseDataPlantFunctionalData.enableAutoCreationOfPFD" />
</NmLoader>