Weld Rule
The action rule enables you to create the weld driven features on each IPM.
General Information
This action rule is invoked when you click Update IPM or Synchronization.
It returns Code(String)List and IMP List(VPMReference) to retrieve detail feature information in the Weld Detail Table.
Input Objects
Input objects must be of the following type:
Parameters correspond to the context object.Example
The following example shows how to determine Code(String). You can use this example to make another script in the action rule.
let fastenProcess(Fasten)
let fastenIPM(VPMReference)
let StrWeldType(String)
let connectedProcess1(ElementaryEndItem)
let connectedProcess2(ElementaryEndItem)
let weldFeatures(List)
let mfgWeld(DELStrMfgWeldLine)
let weldLength(LENGTH)
let bCreateAttachmentLine(Boolean)
let AlignLineFeatParameterList(List)
let bCreateAlignmentLine(Boolean)
let AlignmentModeExtremity(Integer)
let AlignLength(LENGTH)
let AlignOffset(LENGTH)
let IndepentPartAttrList(List)
let IndepentPartAttrListNew(List)
let ProfileWebAttrList1(List)
let ProfileFlangeAttrList1(List)
let ProfileWebAttrList2(List)
let ProfileFlangeAttrList2(List)
let FeatureInfoList_EdgeConnectionPart(List)
let FeatureInfoList_EdgeConnectionPartOther(List)
let FeatureInfoList_SurfaceConnectionPart(List)
set fastenProcess = Parameters.GetAttributeObject("FastenProcess")
if (NULL <> fastenProcess)
{
set fastenIPM = fastenProcess.GetProcessOutput()
if (NULL <> fastenIPM)
{
set weldFeatures = fastenIPM.GetMfgFeatures("DELStrMfgWeldLine")
if (weldFeatures.Size() > 0)
{
set mfgWeld = weldFeatures.GetItem(1)
if (NULL <> mfgWeld)
{
let strMfgBevelType(String)
let strMfgProfileFace(String)
let lenMfgBevelRootGapValue(LENGTH)
let strMfgBevelUDFSide(String)
let lenMfgMarginValue(LENGTH)
let nMfgPropagationModeValue(Integer)
// Initialize variable
strMfgBevelType = "Single_Bevel"
strMfgProfileFace = ""
lenMfgBevelRootGapValue = 1.5mm
strMfgBevelUDFSide = "Molded"
lenMfgMarginValue = 10mm
nMfgPropagationModeValue = 0
SetDSTFeatureAttributeIntoList(IndepentPartAttrList, "BevelType", strMfgBevelType)
SetDSTFeatureAttributeIntoList(IndepentPartAttrList, "ProfileFace", strMfgProfileFace)
SetDSTFeatureAttributeIntoList(IndepentPartAttrList, "Root_Gap", lenMfgBevelRootGapValue)
SetDSTFeatureAttributeIntoList(IndepentPartAttrList, "EdgePrepSide", strMfgBevelUDFSide)
SetDSTFeatureAttributeIntoList(IndepentPartAttrList, "MarginLength", lenMfgMarginValue)
SetDSTFeatureAttributeIntoList(IndepentPartAttrList, "PropagationMode", nMfgPropagationModeValue)
strMfgBevelType = "Double_Bevel"
strMfgProfileFace = "Web"
SetDSTFeatureAttributeIntoList(ProfileWebAttrList1, "BevelType", strMfgBevelType)
SetDSTFeatureAttributeIntoList(ProfileWebAttrList1, "ProfileFace", strMfgProfileFace)
SetDSTFeatureAttributeIntoList(ProfileWebAttrList1, "Root_Gap", lenMfgBevelRootGapValue)
SetDSTFeatureAttributeIntoList(ProfileWebAttrList1, "EdgePrepSide", strMfgBevelUDFSide)
SetDSTFeatureAttributeIntoList(ProfileWebAttrList1, "MarginLength", lenMfgMarginValue)
SetDSTFeatureAttributeIntoList(ProfileWebAttrList1, "PropagationMode", nMfgPropagationModeValue)
strMfgBevelType = "Double_Bevel"
strMfgProfileFace = "Flange"
SetDSTFeatureAttributeIntoList(ProfileFlangeAttrList1, "BevelType", strMfgBevelType)
SetDSTFeatureAttributeIntoList(ProfileFlangeAttrList1, "ProfileFace", strMfgProfileFace)
SetDSTFeatureAttributeIntoList(ProfileFlangeAttrList1, "Root_Gap", lenMfgBevelRootGapValue)
SetDSTFeatureAttributeIntoList(ProfileFlangeAttrList1, "EdgePrepSide", strMfgBevelUDFSide)
SetDSTFeatureAttributeIntoList(ProfileFlangeAttrList1, "MarginLength", lenMfgMarginValue)
SetDSTFeatureAttributeIntoList(ProfileFlangeAttrList1, "PropagationMode", nMfgPropagationModeValue)
FeatureInfoList_EdgeConnectionPartOther.Append(IndepentPartAttrList)
FeatureInfoList_EdgeConnectionPartOther.Append(ProfileWebAttrList1)
FeatureInfoList_EdgeConnectionPartOther.Append(ProfileFlangeAttrList1)
strMfgBevelType = "Single_Bevel"
strMfgProfileFace = "Web"
SetDSTFeatureAttributeIntoList(ProfileWebAttrList2, "BevelType", strMfgBevelType)
SetDSTFeatureAttributeIntoList(ProfileWebAttrList2, "ProfileFace", strMfgProfileFace)
SetDSTFeatureAttributeIntoList(ProfileWebAttrList2, "Root_Gap", lenMfgBevelRootGapValue)
SetDSTFeatureAttributeIntoList(ProfileWebAttrList2, "EdgePrepSide", strMfgBevelUDFSide)
SetDSTFeatureAttributeIntoList(ProfileWebAttrList2, "MarginLength", lenMfgMarginValue)
SetDSTFeatureAttributeIntoList(ProfileWebAttrList2, "PropagationMode", nMfgPropagationModeValue)
strMfgBevelType = "Single_Bevel"
strMfgProfileFace = "Flange"
SetDSTFeatureAttributeIntoList(ProfileFlangeAttrList2, "BevelType", strMfgBevelType)
SetDSTFeatureAttributeIntoList(ProfileFlangeAttrList2, "ProfileFace", strMfgProfileFace)
SetDSTFeatureAttributeIntoList(ProfileFlangeAttrList2, "Root_Gap", lenMfgBevelRootGapValue)
SetDSTFeatureAttributeIntoList(ProfileFlangeAttrList2, "EdgePrepSide", strMfgBevelUDFSide)
SetDSTFeatureAttributeIntoList(ProfileFlangeAttrList2, "MarginLength", lenMfgMarginValue)
SetDSTFeatureAttributeIntoList(ProfileFlangeAttrList2, "PropagationMode", nMfgPropagationModeValue)
FeatureInfoList_EdgeConnectionPart.Append(IndepentPartAttrList)
FeatureInfoList_EdgeConnectionPart.Append(ProfileWebAttrList2)
FeatureInfoList_EdgeConnectionPart.Append(ProfileFlangeAttrList2)
strMfgBevelType = "Single_Bevel"
strMfgProfileFace = ""
lenMfgBevelRootGapValue = 1.5mm
strMfgBevelUDFSide = "Molded"
lenMfgMarginValue = 10mm
nMfgPropagationModeValue = 2
SetDSTFeatureAttributeIntoList(IndepentPartAttrListNew, "BevelType", strMfgBevelType)
SetDSTFeatureAttributeIntoList(IndepentPartAttrListNew, "ProfileFace", strMfgProfileFace)
SetDSTFeatureAttributeIntoList(IndepentPartAttrListNew, "Root_Gap", lenMfgBevelRootGapValue)
SetDSTFeatureAttributeIntoList(IndepentPartAttrListNew, "EdgePrepSide", strMfgBevelUDFSide)
SetDSTFeatureAttributeIntoList(IndepentPartAttrListNew, "MarginLength", lenMfgMarginValue)
SetDSTFeatureAttributeIntoList(IndepentPartAttrListNew, "PropagationMode", nMfgPropagationModeValue)
FeatureInfoList_SurfaceConnectionPart.Append(IndepentPartAttrListNew)
set bCreateAlignmentLine = true
if (bCreateAlignmentLine == true)
{
set AlignOffset = 300mm
set AlignLength = 300mm
set AlignmentModeExtremity = 2
AlignLineFeatParameterList.Append(bCreateAlignmentLine)
AlignLineFeatParameterList.Append(AlignmentModeExtremity)
AlignLineFeatParameterList.Append(AlignOffset)
AlignLineFeatParameterList.Append(AlignLength)
}
set weldLength = mfgWeld.WeldLength
if (weldLength > 20mm)
set bCreateAttachmentLine = true
else
set bCreateAttachmentLine = false
}
}
}
}
Parameters.SetAttributeObject("FeatureInfoList_EdgeConnectionPart", FeatureInfoList_EdgeConnectionPart)
Parameters.SetAttributeObject("FeatureInfoList_EdgeConnectionPartOther", FeatureInfoList_EdgeConnectionPartOther)
Parameters.SetAttributeObject("FeatureInfoList_SurfaceConnectionPart", FeatureInfoList_SurfaceConnectionPart)
Parameters.SetAttributeBoolean("MarkingLinesForConnection", bCreateAttachmentLine)
Parameters.SetAttributeObject("AlignmentLineForConnection", AlignLineFeatParameterList)