Compute Resulting Product with Different Kinds of Holes (DELMIA_ElementaryEndItem_HoleType_ID)

An opening ID is an entry point used to customize business logic. The opening ID is run to define the types of holes drilled in the resulting product.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This 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.

Definition Description
PLM Opening ID DELMIA_ElementaryEndItem_HoleType_ID
Customization intent Execution
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: Fastener occurrence
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
iPartOccurrence Occurrence Write Implemented design part.
oHoleType Integer Read Type of the hole:
  • 1: Simple
  • 2: Counterbored
  • 3: Countersunk
  • 4: Counterdrilled
  • 5: Tapered.
oBottomType Integer Write Type of the bottom:
  • 0: Flat
  • 1: V-Bottom.
oBottomAngle Double Write Angle of the bottom (in degrees, between 0 and 180°).
oAnchorPoint Integer Write Anchor point:
  • 0: Extreme (or Bottom for Tapered)
  • 1: Middle (or Top for Tapered).
oCBDiameter Double Read Counterbored diameter (in meters, > 0).
oCBDepth Double Read Counterbored depth (in meters, > 0).
oCSDepth Double Read Countersunk depth (in meters, > 0).
oCSAngle Double Read Countersunk angle (in degrees, between 0 and 180°).
oCSDiameter Double Write Countersunk diameter (> 0).
oCSMode Integer Write Countersunk mode:
  • 0: Depth and Angle
  • 1: Depth and Diameter
  • 2: Angle and Diameter.
oCDDepth Double Write Counterdrilled depth (> 0).
oCDAngle Double Write Counterdrilled angle (in degrees, between 0 and 180°).
oCDDiameter Double Write Counterdrilled angle (> 0).
oCDSDiameter Double Write Sunk diameter.
oCDMode Integer Write Counterdrilled mode:
  • 0: NoCountersunkDiameter
  • 1: CountersunkDiameter.
oTaperedAngle Double Write Tapered angle (in degrees, between 0 and 180°).
oTHDiameter Double Write Diameter of the thread (>= oDiameter).
oTHDepth Double Write Depth of the thread (between 0 and <= oDiameter).
oTHPitch Double Write Pitch of the thread (>= 0).
oTHSide Integer Write Side of the thread:
  • 0: RightThreaded
  • 1: LeftThreaded.

Sample

The 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 */
}