Un altro esempio di come impostare il percorso di importazione quando i prodotti sono disponibili:
Creare un filtro VBS ( da qualche parte nella pipeline dopo l'esecuzione del convertitore). Mettere VBS (
plugin_template_DTO.vbs
) e VB Classe (PluginBaseC_DTO
).Aggiungere il codice seguente alla funzione
DTO
un:' Create new classification Dim classification As PSolUnitProxy.prxClassification_1 Set classification = CreateObject("wh.Classification_1") classification.SystemId = "customID" ' Prepare attribute. Dim newAttr As PSolUnitProxy.prxProductAttribute_1 Set newAttr = CreateObject("wh.ProductAttribute_1") ' Prepare the attribute value. Dim newAttrVal As PSolUnitProxy.prxAttributeValue_1 Set newAttrVal = CreateObject("wh.AttributeValue_1") newAttrVal.Text = "newtestpath/whatever“ ‘ Import Path for parts newAttr.Name = "imppath_" newAttr.Group = "imppath" Set newAttr.Value = newAttrVal ' Add Attribute to classification classification.addAttributeValue(newAttr) ' Add classification to product product.addClassification(classification)
Modificare il nodo struttura in PARTdataCenter.
Percorso del documento: imppath (gruppo di attributi); imppath_ (nome)
Nella classificazione: "SystemId": "customID", "AttributeValue": [ { "Name": "imppath_", "Group": "imppath", "Value": { "Text": "newtestpath2/whatever" } } ]