General InformationThis opening ID is invoked when computing the resulting product of a manufactured part. This opening ID is used to customize simple, countersunk, counterbored, counterdrilled, and tapered holes. The table below provides you with information related to the definition of the opening ID.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleThe following sample shows you how to use the opening ID.
/* INPUTS */ Let FastenerOccurrence(ProductOccurrence) /* the occurrence of design part */ Let PartOccurrence(ProductOccurrence) /* the occurrence of fastener */ Let FastenerReference(VPMReference) /* the reference of fastener */ Let TempStr(String) /* OUPUTS */ Let HoleType(Integer) Let CBDiameter(Real) Let CBDepth(Real) Let CSAngle(Real) Let CSDepth(Real) set HoleType=3 set CBDiameter=0.09 set CBDepth=0.0005 set CSDepth=0.0035 set CSAngle=90 /* The fastener on which the drilling information are retrieved */ set FastenerOccurrence = ThisObject if (NULL <> FastenerOccurrence) { FastenerReference = FastenerOccurrence.Reference TempStr = FastenerReference.V_Name if (TempStr.Extract(0,4) == "Fix2") { HoleType = 2 } if (TempStr.Extract(0,4) == "Fix3") { HoleType = 1 } if (TempStr.Extract(0,4) == "Ecro") { HoleType = 3 } } /* The part implemented by the Manufactured Part */ PartOccurrence = Parameters.GetAttributeObject ("iPartOccurrence") if (NULL <> PartOccurrence) { } Parameters.SetAttributeInteger ("oHoleType",HoleType) /* for all types of hole */ if (HoleType == 2) { Parameters.SetAttributeReal ("oCBDiameter",CBDiameter) /* for counterbored only */ Parameters.SetAttributeReal ("oCBDepth",CBDepth) /* for counterbored only */ } if (HoleType == 3) { Parameters.SetAttributeReal ("oCSDepth",CSDepth) /* for countersunk only */ Parameters.SetAttributeReal ("oCSAngle",CSAngle) /* for countersunk only */ } |