Overview

The DigitalTwin class creates digital twins to manage manufacturing tasks. Each digital twin is a twin of a physical object that is being built, or used, on the shop floor. Each twin contains sufficient information to measure the current status of that physical object including its current geometry. Each twin also contains sufficient information to enable dynamic planning and replanning when tasks are blocked by broken, misplaced or missing, components and equipment.

This version of the DigitalTwin class makes digital twins for drill and fill operations. These are the operations that fasten structures by drilling holes into multiple layers of materials, and inserting pins and collars. The traditional way to make large structures is to generate long sequences of machine codes to drill and fill the holes in the correct sequences. The codes must be executed in exactly the right order. Unfortunately, stuff happens. For example, a component may be larger than expected, or a fastener may not be available, or a robot may have been pulled off the line for maintenance. The breakage requires adjustments before manufacturing can be completed.

Of course, when production is blocked the code sequences can be changed, but the operators must be very careful. The fastener holes must be drilled in an order that will avoid damage. The holes in a stackup must be aligned to ensure correct fastening. Some of the holes may have been made by third parties. Every time the order is changed there is a risk of non completion. Missing a production rule or production action can be easy to prevent for a familiar task when everyone is at full attention, but less easy for something new at the end of a long shift.

The DigitalTwin class mitigates these issues by holding a real-time database of the operations that have been completed and must still be completed. The database includes all the production rules that must be met. For example, there are "OneUp Assembly" (OUA) rules to describe when operations must wait for another operation to avoid "deburring" problems, and three frame rules to ensure correct alignment with other fasteners.

The DigitalTwin class uses Digital twin Standards so that your supply chain can participate in your digital twin automation. For example, if a hole in a component is made by a supplier, then you need to know its location. Again this is easy for small, rigid structures, but not so simple for large flexible ones. Therefore, the DigitalTwin class describes how production rules are added to STEP data to make digital twin objects. The input is standardized as ISO 10303-242 and the output is standardized as ISO 10303-238. The latter is better known as STEP-NC. Millions of airframe parts are already being made using STEP-NC, so it can be trusted.

Your systems need to know about that supplier hole in order to safely assemble it in a fastener stackup. You can have the supplier deliver that information as digital twins, or you can make measurements of the physical twins at your plant once the component has been delivered. Waiting for the components is time wasting. The wastage becomes especially significant, when there is a disagreement between what you think you asked for, and what they think you requested.

Adding production rules to design geometry is not easy because they are complicated. Until now the complexity has prevented the deployment of model based manufacturing which is a necessary pre-condition for digital twin manufacturing. However, a new method for layering additional information onto STEP information, called STEP Lite, has become available.

STEP Lite

STEP Lite adds information layers to a STEP model. The source of the information is the systems and databases already in the enterprise. The output is digital twin information necessary and sufficient to make better products more quickly.

If a supplier is always making the same product to the same tolerances, then it does not need digital twins. However, if dynamic adjustments and enhancements have to be made, perhaps by both the customer and supplier, then digital twins are safer and more flexible. For example, if the location of a feature is different because of fit issues, then the supplier might be required to do rework, but perhaps you can adjust your stackup on your shop floor. Shared digital twins give you the ability to make this decision.

The data to make digital twins already exists in the enterprise because it is used to plan the long code sequences. In order to make digital twins, it must be translated and layered onto the CAD data describing the product. This is the purpose of STEP Lite. In a typical drill and fill application up to ten layers of production rules may be added.

  1. The design data is integrated into an assembly describing the positions of the workpieces and fixtures.
  2. The location of the fasteners, and the direction of drill holes is exported from the CAD system as a geometry set.
  3. The dimensions and depths of the stackups are added to each fastener location.
  4. Drilling operations are defined for the stackups. In a typical application the holes will be drilled in multiple manufacturing stages.
  5. The drilling operations are ordered into workplans, with one plan per manufacturing stage, and one nested plan for each operation in that stage.
  6. Equipment information is added describing the types of pins, collars and tacks that can be used to hold the fasteners at each stage.
  7. Planning information is added describing the oneup, precedence and measurement rules that must be met for correct placement and assembly.
  8. Equipment information is added describing which robots can reach each fastener location.
  9. Escape sequences are added so that a robot can move to the next operation when the current operation is blocked.
  10. If there are multiple solutions for each stage, one is given preference for fast predicable selection during manufacturing. However, the sequence can change if an operation is blocked by missing equipment, an off-line robot, or a feature out of tolerance.

The early stages of the build use STEP to get design data from CAD. The latter stages get their data in proprietary data formats coded as XML or JSON. Lately JSON has been preferred because it is more flexible. STEP Lite describes how your programmers can use this information to make digital twins that can be shared across the supply chain because they contain both design rules and production rules.

STEP Lite for drill and fill is the API described on this web page.

DrillAndFillTwin()/DrillAndFillTwinStackup()/DrillAndFillTwinLayer()

System::Int64 DrillAndFillTwin(
    System::Int64 ws_or_fea_id
);
System::Int64 DrillAndFillTwinStackUp(
    System::Int64 twin_id,
    System::String^ measurement_state
);
System::Int64 DrillAndFillLayer(
    System::Int64 stackup_id,
    System::Int64 product_id,
    double start_dist,
    double end_dist
);

The DrillandFillTwin() function creates a digital twin for a round hole feature. The feature can be given as the identity of the feature, or the identity of a workingstep that uses the feature.

The DrillandFillTwinStackUp() functions creates a Stackup for a Drill and Fill digital twin. The measurement state must have one of the following values.

The DrillandFillLayer() functions adds a layer to a Stackup. The layer includes a reference to the material, the distance of the hole top from the start of the layer, and the distance of hole top from the bottom of the layer.

Arguments

ws_or_fea_id
The identity of a workingstep or feature. If the identity of a workingstep is given then the process feature of that workingstep will be twinned.
twin_id
The identity of a Drill and Fill twin.
measurement_state
A string describing how the stackup is being measured..
stackup_id
The identity of the Drill and Fill stackup.
product_id
The identity of the product that defines the material of the layer.
start_dist
The distance from the top of the hole to the top of this layer.
end_dist
The distance from the top of the hole to the bottom of this layer.

Related Functions

Common Errors

FindHoleGeometry()

double FindHoleGeometry();

The FindHoleGeometry() function uses the geometry of the model to find drill holes and compute stackups. The function finds holes by looking for cylinders, and cones. The holes and cones can be on multiple parts and it lines them up by using the geometry placements of the assembly. It then computes the depth of the hole, and creates a feature stackup.

After the stackups have been computed the hole geometry is removed from the part so that it can be drilled in later operations.

Related Functions

Common Errors

MakeProductTwins()

double MakeProductTwins();

The MakeProductTwins() function finds the geometry of the pins and collars that fit into each stackup on a product. The geometry is found in the assembly model of the final product. The function looks for product models in that assembly that contain the string "pin" or "collar" in their product name. A twin is made for each pin and collar found, and attached to the corresponding stackup.

Related Functions

Common Errors

PinDesign()/CollarDesign()/WasherDesign()

System::Int64  PinDesign(
    System::String file_name
);
System::Int64  CollarDesign(
    System::String file_name
);
System::Int64  WasherDesign(
    System::String file_name
);

The PinDesign() function reads a STEP file and uses it to make a pin. The new pin can then be used to define the as-planned or as-installed geometry of the pins in an assembly. In a typical usage, the pin design will be supplied by the vendor of the pin, and it will replace design geometry made by planning.

The CollarDesign() function reads a STEP file and uses it to make a collar. This function is identical to the PinDesign() function but is assumed to make a collar.

The WasherDesign() function reads a STEP file and uses it to make a washer. A fastener assembly can contain zero, one or many washers. They are not typically included in the design model. Instead they are added as necessary during the installation process.

All functions in this section return the identity of the new design.

All functions can also be used to label a model already in the project as a Pin, Collar or Washer. If the model identified by the file has the same name as a model already in the project, then the file is not ready and the "pin", "collar" or "washer" category is added to the existing model.

Arguments

file_name
The name of the STEP file containing the product geometry. The file can be AP-203, AP214 or AP242.

Related Functions

Common Errors

CategorizeAsPinDesign()/CategorizeAsCollarDesign()/CategorizeAsWasherDesign()

System::Boolean  CategorizeAsPinDesign(
    System::Int64 part_id
);
System::Boolean  CategorizeAsCollarDesign(
    System::Int64 part_id
);
System::Boolean  CategorizeAsWasherDesign(
    System::Int64 part_id
);

The CategorizeAsPinDesign() function categorizes a model as a pin so that it can be used as such in subsequent planning and manufacturing operations.

The CategorizeAsCollarDesign() function categorizes a model as a collar so that it can be used as such in subsequent planning and manufacturing operations.

The CategorizeAsWasherDesign() function categorizes a model as a washer so that it can be used as such in subsequent planning and manufacturing operations.

These functions enable a part to be classified as a pin, collar or washer when the name of the part is not the same as the name of its file. A frequent occurrence.

Arguments

part_id
The identity of a part previously read into the project.

Related Functions

Common Errors

FastenerSealantIcon()/FaySealantIcon()/CapSealantIcon()

	System::Boolean FastenerSealantIcon(
	    System::String^ filename
	);

	System::Boolean FaySealantIcon(
	    System::String^ filename
	);

	System::Boolean CapSealantIcon(
	    System::String^ filename
	);

	System::Int64 GetFastenerSealantIcon();
	System::Int64 GetFaySealantIcon();
	System::Int64 GetCapSealantIcon();

The FastenerSealantIcon() function sets an icon to be shows when that kind of sealant is placed on a twin. The function reads a STEP file, and uses the geometry in that file as the display model for the icon. There are three functions, one for each kind of Sealant.

In normal circumstances, the icon for a type of sealant only needs to be read once because once it has been ingested it will be included in the data of that project. An advanced project may change the icon if it wishes. Old icons will be dropped if they are not longer being used.

The GetFastenerSealantIcon function returns the product model that currently describes the icon for that type of sealant.

Arguments

filename
The address of a file that contains the geometry model. In normal circumstances, the name and address of the file will not matter after it has been ingested.

Related Functions

Common Errors

IsTwin()/IsPrototype()

System::Boolean  IsTwin(
    System::Int64 item_id
);
System::Int64  IsPrototype(
    System::Int64 item_id
);

The IsTwin() function true if the item identified is a twin of a feature or product. If the item is a twin of a feature then it will be an instance of that feature on the model. If the item is the twin of a product then it will be an instance of that product somewhere in an assembly.

The IsPrototype() function true if the item identified is the prototype of a twin. A prototype describes manufacturing constraints that must be met by all instances of the twin. For example, it may describe the required width of a washer, or the required diameter of a hole, or the required length of a cutter. Typically the constraint is defined somewhere in the design model of the product. The prototype labels the constraint as something that should be measured during manufacturing to ensure quality.

Arguments

item_id
The item that may be a twin or prototype of a feature or product.

Related Functions

Common Errors

PlaceFastenerWorkingstep()/PlaceCollarWorkingstep()/PlaceWasherWorkingstep() PlaceSealantWorkingstep()/ShaveFastenerWorkingstep()/ PlaceTackWorkingstep()/RemoveTackWorkingstep()

System::Boolean  PlaceFastenerWorkingstep(
    System::Int64 feature_id,
    double depth
);
System::Boolean  PlaceCollarWorkingstep(
    System::Int64 feature_id,
    double depth
);
System::Boolean  PlaceWasherWorkingstep(
    System::Int64 feature_id,
    double depth
);
System::Boolean PlaceFastenerSealantWorkingstep(
    System::Int64 feature_id,
    double quantity
);
System::Boolean PlaceFaySealantWorkingstep(
    System::Int64 feature_id,
    double quantity
);
System::Boolean PlaceCapSealantWorkingstep(
    System::Int64 feature_id,
    double quantity
);
System::Boolean  ShaveFastenerWorkingstep(
    System::Int64 feature_id,
    double remaining
);
System::Boolean  PlaceTackWorkingstep(
    System::Int64 feature_id,
    double depth,
    double diameter
);
System::Boolean  RemoveTackWorkingstep(
    System::Int64 feature_id,
    double depth,
    double diameter
);

The PlaceFastenerWorkingstep() function creates an operation to insert a pin into a feature. The feature must have a digital twin. The inserted pin will be the one defined for the twin by a group in the product model. See the GetPrimaryPin() function. The depth (height) of the pin may be defined as an optional parameter. If not required, then give the value as zero.

The PlaceCollarWorkingstep() function creates an operation to tighten a collar onto a feature. The feature must be defined by a digital twin. The inserted collar will be the one defined for the twin by a group in the product model. See the GetPrimaryCollar() function. The depth (height) of the collar may be defined as an optional parameter. If it is not required then give the value as zero.

The PlaceWasherWorkingstep() function creates an operation to add a washer to the fastener in a feature. The feature must be defined by a digital twin. The added washer will be the one defined for the twin by a group in the product model. See the GetPrimaryWasher() function. The depth (height) of the washer may be defined as an optional parameter. If it is not required then give the value as zero.

The PlaceFastenerSealantWorkingstep() function creates an operation to add sealant to the fastener in a feature. The feature must be defined by a digital twin. The quantity of sealant may be defined as an optional parameter. If it is not required then give the value as zero. The presence of sealant on the fastener may be shown by an icon. See the FastenerSealantIcon() function.

The PlaceFaySealantWorkingstep() function creates an operation to add fay sealant to a feature. The feature must be defined by a digital twin. The quantity of sealant may be defined as an optional parameter. If it is not required then give the value as zero. The presence of fay sealant may be shown by an icon. See the FaySealantIcon() function.

The PlaceCapSealantWorkingstep() function creates an operation to add cap sealant to a feature. The feature must be defined by a digital twin. The quantity of sealant may be defined as an optional parameter. If it is not required then give the value as zero. The presence of cap sealant may be shown by an icon. See the CapSealantIcon() function.

The ShaveFastenerWorkingstep() function creates an operation to reduce the depth (height) of a fastener above the stackup. This stick out can cause drag. The height remaining after the shaving is defined by the remaining parameter.

The PlaceTackWorkingstep() function is identical to the PlaceFastenerWorkingstep() operation but places a tack instead of a pin. This can be confusing. Tacks are temporary. Pins are for life.

The RemoveTackWorkingstep() function removes a tack so that it can be replaced by a pin after the hole has been made bigger.

Related Functions

Common Errors

PlaceFastenerAfterWorkingstep()/PlaceCollarAfterWorkingstep()/ PlaceSealantAfterWorkingstep()

System::Boolean  PlaceFastenerAfterWorkingstep(
    System::String^ label,
    System::Int64 index,
    System::Int64 plan_id,
    System::Int64 feature_id,
    double depth
);
System::Boolean  PlaceCollarAfterWorkingstep(
    System::String^ label,
    System::Int64 index,
    System::Int64 plan_id,
    System::Int64 feature_id,
    double depth
);
System::Boolean PlaceFastenerSealantAfterWorkingstep(
    System::String^ label,
    System::Int64 index,
    System::Int64 plan_id,
    System::Int64 feature_id,
    double quantity
);

The PlaceFastenerAfterWorkingstep() function is a version of the PlaceFastenerWorkingstep() function that places the operation at a given location in a given workplan. For more information on the placement parameters see WorkingstepAfter() function.

The PlaceCollarAfterWorkingstep() function is a version of the PlaceCollarWorkingstep() function that places the operation at a given location in a given workplan. For more information on the placement parameters see WorkingstepAfter() function.

The PlaceFastenerSealantAfterWorkingstep() function is a version of the PlaceFastenerSealantWorkingstep() function that places the operation at a given location in a given workplan. For more information on the placement parameters see WorkingstepAfter() function.

Related Functions

Common Errors

WasherCount()/WasherAdd()/WasherNext()/WasherThickness()

System::Int64 WasherCount(
   System::Int64 feature_twin_id
);
void WasherAdd(
   System::Int64 feature_twin_id,
   System::Int64 washer_id
);	
System::Int64  WasherNext(
   System::Int64 feature_twin_id,
   System::Int64 index
);
double  WasherThickness(
   System::Int64 washer_id
);

The WasherCount() function counts the number of washers that have been placed into a drill and fill twin. This number will increase when an operation places a washer onto the fastener and therefore depends on the flow of the program.

The WasherAdd() function adds a washer to a fastener in response to the program flow.

The WasherNext() function gets each washer using an index value.

The WasherThickness() function gets the thickness of a washer. The thickness is an expected property that can be set in the prototype of the washer. If the thickness has not been set then the system computes it from the geometry of the washer.

Arguments

twin_id
The Drill and Fill twin that contains or will contain the washer.
washer_id
The product model of the washer.

Related Functions

Common Errors

GetSealantData()SealantCount()/SealantAdd()/SealantNext()

System::Boolean GetSealantData(
   System::Int64 sealant_id,
   [System::Runtime::InteropServices::Out] System::String^% ret_product_name,
   [System::Runtime::InteropServices::Out] System::String^% ret_material_description,
   [System::Runtime::InteropServices::Out] System::String^% ret_material_standard
);
System::String^ GetSealantType(
   System::Int64 sealant_id
);
System::Int64 SealantCount(
   System::Int64 feature_twin_id
);
void SealantAdd(
   System::Int64 feature_twin_id,
   System::Int64 sealant_id
);	
System::Int64  SealantNext(
   System::Int64 feature_twin_id,
   System::Int64 index
);

The GetSealantData() function returns the product name, material description and material standard for a sealant.

The GetSealantType() function returns the type of the sealant which may be "fastener sealant", "fay sealant" or "cap sealant".

The SealantCount() function counts the number of time sealants have been placed onto a drill and fill twin. This number will increase every time an operation adds sealant and therefore depends on program flow.

The SealantAdd() function explicitly adds sealant to a drill and fill twin.

The SealantNext() function gets each sealant added to a drill and fill twin using an index.

Arguments

twin_id
The Drill and Fill twin that contains or will contain sealant.
sealant_id
The product model of an added sealant. Usually just the material definition, but possibly a full product model with geometry.

Related Functions

Common Errors

MakeFastenerSealant()/MakeFaySealant()/MakeCapSealant()/IsSealant()

	System::Int64 MakeFastenerSealant(
	    System::String^ product_name,
	    System::String^ material_description,
	    System::String^ material_standard
	);
	System::Int64 MakeFastenerSealant(
	    System::Int64 product_id,
	    System::String^ material_description,
	    System::String^ material_standard
	);

	System::Int64 >b>MakeFaySealant(
	    System::String^ product_name,
	    System::String^ material_description,
	    System::String^ material_standard
	);
	System::Int64 MakeFaySealant>(
	    System::Int64 product_id,
	    System::String^ material_description,
	    System::String^ material_standard
	);

	System::Int64 MakeCapSealant>(
	    System::String^ product_name,
	    System::String^ material_description,
	    System::String^ material_standard
	);
	System::Int64 MakeCapSealant(
	    System::Int64 product_id,
	    System::String^ material_description,
	    System::String^ material_standard
	);

	System::Boolean IsSealant(
	    System::Int64 product_id
	);
	System::Boolean IsSealantWithGeometry(
	    System::Int64 product_id
	);

The MakeSealant() functions make a material product definition for a sealant so that it can be used in twins and applied to fasteners.

If a CAD system will not write out data describing material products, then these API's are an easy way to make product definitions for sealants in an application program.

If the sealant needs to have geometry, then a second version of each API, that takes a product_id, can add the sealant definition to a product in the model that has the necessary geometry. Note however, that when a product is categorized as a material definition it cannot be used for anything else.

The IsSealant() tests a product to see if it has the sealant definition.

The IsSealantWithGeometry() tests a product to see if it contains geometry and has the sealant definition which means it was created using the second version of the MakeSealant() functions.

Arguments

product_name
The product name of the sealant.
material_description
The key characteristics of the sealant, typically given as a mathematical formula.
material_standard
A standard that can be reference to understand the mathematical formula.
product_id
.Existing product to be extended or tested.

Related Functions

Common Errors

StackupDepthCompute()/StackupDrilling()/StackupCounterDrilling()/StackupFeatureFill()

double StackupDepthCompute(
    System::Int64 stackup_id,
    System::Collections::Generic::List^ drilling_location,	// x, y and z coordinates
    System::Collections::Generic::List^ drilling_direction,	// i, j and k directions
    System::Collections::Generic::List^ omits
);
double StackupDrilling(
    System::Int64 stackup_id
    double breakthru_increment,
    double tool_length_increment,
    double feed,
    double speed
);
double  StackupCounterDrilling(
    System::Int64 stackup_id,
    double feed,
    double speed
);
double StackupFeatureMake(
    System::Int64 stackup_id
);

The StackupDepthCompute() function computes the drill depths for the different layers in a stackup. The total depth of all the layers is returned. This total may not be the same as the sum of the layers because of gaps and overlaps. The first required argument are three coordinates describing x, y and z locations for the start of the hole. These coordinates can be computed using the FastenerPointDrillingLocation() function. The second required argument are three directions describing i, j and k values for the axis of the hole. These directions can be computed using the FastenerPointDrillingDirection() function. The third argument is a list of products that are to be ignored while computing the stackup. These products describe fasteners and collars that will not be in the assembly when the hole is drilled.

The StackupDrilling() function makes a drilling operation for a stackup. The depth of the hole will be the same as the computed depth of the stackup. The drilling operation will continue for the breakthru_increment to ensure a clean finish. The operation will make a "virtual" drill for the operation which will have the diameter of the hole. The length of the tool will be the same as the computed depth of the stackup but with an increment added as defined by the tool_length_increment. The feed and speed of the drilling will be set to the given values.

The StackupCounterDrilling() function makes a drilling operation for a stackup that has a counter sink. The depth of the constant hole will be the same as the computed depth of the stackup. The depth of a tapered hole will be computed from the hole geometry. The operation will make "virtual" drills for both the constant hole and the tapered hole.

The StackupFeatureMake() function makes round hole features for the different layers in the stackup. The number of layers is returned. The depth of each feature is the computed depth. The diameter is the same as the twin prototype. The feature for each layer starts at the bottom of the layer, and finishes at the top of the layer. The coordinates computed for each feature are in the local coordinate space of the part that contains the feature.

Arguments

stackup_id
The identity of the Drill and Fill stackup.
breaktrhu_increment
Value added to the end of each drilling operation to ensure a clean breakthru
tool_length_increment
Value added to the length of each tools.
feed
The feed rate for the drilling operation (maybe should be a feedrate for each layer).
speed
The spindle speed for the drilling operation (maybe should be a spindles speed for each layer).

Related Functions

Common Errors

StackupFilling()/StackupTightening()/StackupSealing()

System::Boolean StackupFilling(
    System::Int64 feature_id
);
System::Boolean StackupTightening(
    System::Int64 feature_id
);
System::Boolean StackupSealing(
    System::Int64 feature_id
);

The StackupFilling() function creates a workingstep that fills a feature with the fastener defined in the product model. The workingstep is added to the end of the current workplan. Additional options can be implemented to place an external fastener (such as one defined by a supplier) and set the grip length.

The StackupTightening() function creates a workingstep that tightens a fastener with the collar defined in the product model. The workingstep is added to the end of the current workplan. Additional options can be implemented to place an external collar (such as one defined by a supplier) and set the tightening force.

The StackupSealing() function creates a workingstep that seals the collar and fastener. Additional options can be implemented for different types of sealants, and set the quantity of sealant to be placed..

Arguments

feature_id
The identity of the Drill and Fill feature.

Related Functions

  • PlaceFastenerWorkingstep() Make an operation to place a fastener into a drill hole.
  • PlaceWasherWorkingstep() Make an operation to place a washer onto a fastener.
  • PlaceCollarWorkingstep() Make an operation to place a collar onto a fastener.
  • PlaceFastenerSealantWorkingstep() Make an operation to apply sealant to a fastener.
  • GetOperationPlaceFastener() Get the parameters set for a place fastener and similar operations.

    Common Errors

    FastenerPointDrillingDirection()/FastenerPointDrillingDepth()

    	System::Int64 FastenerPointDrillingLocation(
    	    System::Int64 point_id,
    	    System::Int64 set_id,
    	    System::Int64 outer_id,
    	    double hole_diameter,
    	);
    	System::Int64 FastenerPointDrillingDirection(
    	    System::Int64 point_id,
    	    System::Int64 set_id,
    	    System::Int64 outer_id,
    	    double hole_diameter,
    	);
    	System::Int64 FastenerPointDrillingDepth(
    	    System::Int64 outer_id,
    	    double hole_diameter
    	    System::Collections::Generic::List^ drilling_location,	// x, y, z
    	    System::Collections::Generic::List^ drilling_direction	// i, j, k
    	);
    	System::Int64 FastenerPointDrillingTwinMake(
    	    System::Int64 point_id,
    	    System::Int64 outer_id,
    	    double hole_diameter
    	    System::Collections::Generic::List^ drilling_location,	// x, y, z
    	    System::Collections::Generic::List^ drilling_direction	// i, j, k
    	);
    

    The FastenerPointXxx() functions compute the geometric properties of a drill point. These include the location of the point. The direction of the surface normal at the point. And the drilling depth required to make a fastener hole at the point. After all this information has been computed, a drill and fill stackup can be created for the point using the FastenerPointDrillingTwinMake() function.

    The FastenerPointDrillingLocation() function computes a location for a drilling point. The input is a point close to the required location and the product containing the surface that will be drilled first. The function will find the point on the surface of the outer product that is closest to the given point.

    The FastenerPointDrillingDirection() function computes a direction for a drilling point by computing the surface normal for a given location. The direction given to the FastenerPointHoleDepth() function will be for the normal at the point computed by the FastenerPointDrillingLocation() function.

    The FastenerPointHoleDepth() function computes the fastener depth for a drilling point. The computed depth will be sufficient to fasten all the materials. The computation will cease when the gap between two materials is greater than 0.02 inches.

    The FastenerPointHoleTwinMake() function makes a drill and fill twin. A round hole is made for the twin and given the depth computed by the FastenerPointHoleDepth() function. A stackup is initialized for the drill and fill twin. The individual layers of the stackup can then be populated using the StackupComputing() functions.

    Arguments

    point_id
    The identity of a point gving the approximate location for the fastener.
    set_id
    The geometric set containing the point so that the world coordinates of the point can be computed.
    outer_id
    The identity of the first material to be drilled by the operaton.
    depth
    The depth of the hole.
    diameter
    The diameter of the hole.
    drilling_location
    The computed location for a hole in world coordiantes.
    drilling_normal
    The computed normal for a hole in world coordinates.

    Related Functions

    Common Errors

    SetStackupComputedDepth()

    double GetStackupComputedDepth(
        System::Int64 stackup_id
    );
    System::String^ GetStackUpComputedDepthUnit(
        System::Int64 stackup_id
    );
    double SetStackupComputedDepth(
        System::Int64 stackup_id,
        double depth
    );
    

    These functions return the computed depth for a stackup. Depths may different for different measurement states. For example, the as-designed depths may be different to the as-clamped depths, and the as-fastened depths.

    The GetStackupComputedDepth() returns a previously computed depth for a stackup.

    The GetStackupComputedDepthUnit() returns the unit of the computed depth.

    The SetStackupComputedDepth() sets the computed depth for a stackup. This will override any previously compute depth and may create an inconsistency if not done properly.

    Arguments

    stackup_id
    The identity of the Drill and Fill stackup.
    depth
    The computed depth of the Drill and Fill stackup.

    Related Functions

    Common Errors

    GeometrySetsOfProduct()/Name()/Size()/Points()/Axes()

    System::Collections::Generic::List^ GeometrySetsOfProduct(
       System::Int64 product_id
    );
    System::Collections::Generic::List^ GeometrySetsAll(
       System::Int64 product_id
    );
    System::Int64 GeometrySetWithName(
       System::String^ name
    );
    System::String^ GeometrySetName (
       System::Int64 set_id
    );
    System::Int64 GeometrySetSize (
       System::Int64 set_id
    );
    System::Collections::Generic::List^ GeometrySetAxesOnly (
       System::Int64 set_id
    );
    System::Collections::Generic::List^ GeometrySetPointsOnly (
       System::Int64 set_id
    );
    System::Int64 GeometrySetAxisAt (
       System::Int64 set_id,
       System::Int64 index
    );
    System::Int64 GeometrySetPointAt (
       System::Int64 set_id,
       System::Int64 index
    );
    System::Boolean GeometrySetNameAt (
       System::Int64 set_id,
       System::Int64 index
    );
    System::Int64 GeometrySetAxisWithName(
        System::Int64 set_id,
        System::String^ name
    );
    System::Int64 GeometrySetPointWithName(
        System::Int64 set_id,
        System::String^ name
    );
    System::Int64 AxisWithName(
        System::String^ name
    );
    System::Int64 PointWithName(
        System::String^ name
    );
    

    The GeometrySet functions returns information put into a set that can be used to define the drill and fill points on a product.

    The GeometrySetsOfProduct() function returns all the geometry sets that have been defined for a product. In many cases, only one set is returned, and this is the set you want when defining drill and fill points. However, it depends on the input. The other functions below enable more complex searches for the points using other criteria. The other functions also allow for searches for the geometry points required for escape sequences.

    The GeometrySetsAll() function returns all the geometry sets in a project. In a typical project there will be many sets for many purposes.

    The GeometrySetWithName() function returns the geometry set that has this name. This would be a good way to select a particular set, but many CAD systems set this name to a common default such as 'NONE'.

    The GeometrySetName() function returns the name of a geometry set.

    The GeometrySetSize() function returns the size of a set. In the typical case there will be one axis or one point for each hole that will be drilled on the product.

    The GeometrySetAxisAt() function returns the identity of an axis placement at a particular location in a set, or 0 if that location does not contain an axis_placement.

    The GeometrySetPointAt() function returns the identity of a cartesian point at a particular location in a set, or 0 if that location does not contain a point.

    The GeometrySetNameAt() function returns the name of the item at a particular location in a set. In many cases this will be the empty string but in some cases it may be the name of the point or axis required by your application. For example, it may be the name of an important escape point to be used when moving when drilling between drilling locations.

    The GeometrySetAxesOnly() function returns all the axes in a set. There will be one for each hole that is to be drilled. The location gives the start point for the hole. The direction gives the drilling direction.

    The GeometrySetPointsOnly() function returns all the points in a set. There will be one for each hole that is to be drilled. The point gives the start point for the hole.

    The GeometrySetAxisWithName() function returns the identity of the axis in a set with a given name if it has one, or 0 if not.

    The GeometrySetPointWithName() function returns the identity of the point in a set with a given name if it has one, or 0 if not.

    The AxisWithName() function returns the identity of any axis with a given name. The axis can be in any structure or set within the file and is the first one found. If not found then 0 is returned.

    The PointWithName() function returns the identity of any point with a given name. The point can be in any structure or set within the file and is the first one found. If not found then 0 is returned.

    Arguments

    name
    The name of a set, or an item in a set.
    product_id
    The identity of a product.
    set_id
    The identity of a set.

    Related Functions

    Common Errors

    GetOperationPlaceFastener()/Collar()/Sealant()/Washer()/Shave()

    	System::Int64 GetOperationPlaceFastener(
    	    System::Int64 ws_id,
    	    [System::Runtime::InteropServices::Out] double% ret_depth,
    	    [System::Runtime::InteropServices::Out] double% ret_diameter
    	);
    	System::Int64 GetOperationPlaceFastenerUnits(
    	    System::Int64 ws_id,
    	    [System::Runtime::InteropServices::Out] System::String^ %ret_depth_unit,
    	    [System::Runtime::InteropServices::Out] System::String^ %ret_diameter_unit
    	);
    	System::Int64 GetOperationPlaceCollar(
    	    System::Int64 ws_id,
    	    [System::Runtime::InteropServices::Out] double% ret_depth
    	);
    	System::Int64 GetOperationPlaceCollarUnits(
    	    System::Int64 ws_id,
    	    [System::Runtime::InteropServices::Out] System::String^ % ret_depth_unit
    	);
    	System::Int64 GetOperationSealFastener(
    	    System::Int64 ws_id,
    	    [System::Runtime::InteropServices::Out] System::String^% ret_seal_type,
    	    [System::Runtime::InteropServices::Out] double% ret_quantity
    	);
    	System::Int64 GetOperationSealFastenerUnits(
    	    System::Int64 ws_id,
    	    [System::Runtime::InteropServices::Out] System::String^% ret_quantity_unit
    	);
    	System::Int64 GetOperationPlaceWasher(
    	    System::Int64 ws_id,
    	    [System::Runtime::InteropServices::Out] double% ret_depth
    	);
    	System::Int64 GetOperationPlaceWasherUnits(
    	    System::Int64 ws_id,
    	    [System::Runtime::InteropServices::Out] System::String^% ret_depth_unit
    	);
    	System::Int64 GetOperationShaveFastener(
    	    System::Int64 ws_id,
    	    [System::Runtime::InteropServices::Out] double% remaining
    	);
    	System::Int64 GetOperationShaveFastenerUnits(
    	    System::Int64 ws_id,
    	    [System::Runtime::InteropServices::Out] System::String^% ret_remaining
    	);
    

    The GetOperationPlaceFastener() returns the paramaters set for a PlaceFastenerWorkingstep() The GetOperationPlaceFastenerUnits() returns the units of the parameters. If the parameter is not set then the function will return the value "unknown"

    The GetOperationPlaceCollar() returns the paramaters set for a PlaceCollarWorkingstep()

    The GetOperationPlaceWasher() returns the paramaters set for a PlaceWasherWorkingstep()

    The GetOperationSealFastener() returns the paramaters set for a PlaceSealantWorkingstep() The type of sealing is returned in the ret_seal_type parameter and may be "fastener", "fay" or "cap".

    The GetOperationShaveFastener() returns the paramaters set for a ShaveFastenerWorkingstep()

    Arguments

    ws_id
    The workingstep containing the operation.

    Related Functions

    Common Errors

    GroupDrillAndFill()/GroupFeatureAdd()/GroupManufacturingStageAdd()

    System::Int64 GroupDrillAndFill (
       System::String^ name,
    );
    System::Int64 GroupFeatureAdd (
       System::Int64 group,
       System::Int64 feature_id
    );
    System::Int64 GroupManufacturingStageAdd (
       System::Int64 group,
       System::Int64 phase_id
    );
    
    

    The Group functions describe information to enable the dynamic planning and replanning of drill and fill operations. Each group defines information for a set of manufacturing features. Each group is valid for all the manufacturing stages or it is valid for a defined set of manufacturing stages.

    The GroupDrillAndFill() function describes a generic group with user defined semantics. See GroupOneUpAssembly(), GroupFastener() and GroupEscape()for the functions that define groups with system defined semantics.

    The GroupFeatureAdd() function adds a feature to any type of manufacturing group. See the DrillAndFillTwin() function for information on how to drill and fill feature.

    The GroupManufacturingStageAdd() function adds a phase to any type of manufacturing group. See the ManufacturingStageFindOrMake() function for information on how to make a stage.

    Arguments

    feature
    The new feature for this manufacturing group.
    stage
    The new manufacturing stage for this manufacturing group.

    Related Functions

    Common Errors

    GroupOneUpAssembly()/GroupThreeFrame()/GroupBestFit()/GroupAllowableRobot() /GroupPrecedenceGroup()

    System::Int64 GroupOneUpAssembly (
       System::String^ name,
    );
    System::Int64 GroupOneUpAssemblyMustFollowOneOf (
       System::Int64 group,
       System::Int64 exe_id
    );
    System::Int64 GroupThreeFrameReference (
       System::String^ name,
       System::Int64 primary,
       System::Int64 secondary,
       System::Int64 tertiary
    );
    System::Int64 GroupBestFitReference (
       System::String^ name,
    );
    System::Int64 GroupBestFitReferenceAddTwin (
       System::Int64 group,
       System::Int64 twin
    );
    System::Int64 GroupAllowableRobot (
       System::String^ name,
       System::String^ robot_identifier,
       System::Int64 precedence
    );
    System::Int64 GroupSameAssembly (
       System::String^ name
    );
    System::Int64 GroupSameAssemblyAddPart (
       System::Int64 group,
       System::Int64 part
    );
    System::Int64 GroupPrecedenceGroup (
       System::String^ name,
    );
    System::Int64 GroupPrecedenceGroupAdd (
       System::Int64 group,
       System::Int64 preceeding_group
    );
    

    The GroupOneUpAssembly() function describes a set of holes that must be fastened together to meet the requirements of one-up assembly. If desirable the group can also list the operations that must be completed before work on this group can begin. The operations are executables and added using the GroupOneUpAssemblyMustFollowOneOf function. Only one of the list operations must be completed. If the required condition is complex, then all of the necessary components can be described as a workplan.

    The GroupThreeFrameReference() function describes a geometry reference frame for the features in a group using three reference holes. If there is only one reference hole in the frame then the secondary and tertiary reference holes are given as 0. If there are two reference holes in the frame then then the tertiary reference hole is given a 0.

    The GroupBestFitFrameReference() function describes a geometry reference frame for the features in a group by best fitting a set of holes. The function defines the group. Holes are added to the group using the GroupBestFitReferenceAddTwin function.

    The GroupAllowableRobot() function describes a robot that may be used to fasten a group of features. If multiple robots are allowed then the one with the lowest (best) precedence value should be selected.

    The GroupSameAssembly() function describes a set of features that fasten the same parts. The function defines the group. Parts are added to the group using the GroupSameAssemblyAddPart function.

    The GroupPrecedenceGroup() function describes groups of features that must finish before the items in this group can start work. Groups are added to the group using the GroupPrecedenceGroupAdd function. Each group added defines another list of twins that must be completed before work starts on this group. Any type of group may be the preceding group, including a generic group.

    Not all the groups are listed here. See GroupFastener(), GroupDrillAndFill(), and GroupEscape() for more details

    Arguments

    precedence
    When a manufacturing feature is in two groups, the rules of the group with the higher precedence are preferred.

    Related Functions

    Common Errors

    GroupFastener()/GroupFastenerAddWasher()/GroupFastenerAddFastenerSealant() /GroupFastenerAddFaySealant()/GroupFastenerAddCapSealant()

    System::Int64  GroupFastener(
        System::String^ name,
        System::Int64 fastener_id,
        System::Int64 collar_id,
        System::Int64 washer_id
        );
    System::Int64 GroupFastenerAddWasher(
        System::Int64 group_id,
        System::Int64 washer_id
        );
    System::Int64 GroupFastenerAddFastenerSealantGroupFastenerAddFaySealant(
        System::Int64 group_id,
        System::Int64 sealant_id
        );
    System::Int64 GroupFastenerAddCapSealant(
        System::Int64 group_id,
        System::Int64 sealant_id
        );
    

    The Group functions describe information that enables a plan to be changed when robots and components become unavailable. Each group contains a set of manufacturing features defining the drill and fill twins in a project. Each group has a set of manufacturing stages where its planning information is valid.

    The GroupFastener function lists the items that can be used to fasten the features in this group. This includes the preferred fastener, collar, washer and sealant.

    The GroupFastenerAddWasher function extends the items to include an additional washer. Multiple washes can be added. They will be placed onto the fastener in the same order as they are added onto the group. If only one washer is defined for the group, then it will be repeated for each placement.

    The GroupFastenerAddFastenerSealant function extends the items to include a fastener sealant. Only one Fastener sealant can be added to each group.

    The GroupFastenerAddFaySealant function extends the items to include a fay sealant. Only one Fay sealant can be added to each group.

    The GroupFastenerAddCapSealant function extends the items to include a fay sealant. Only one Cap sealant can be added to each group.

    Arguments

    fastener_id
    The product definition of a pin or tack.
    collar_id
    The product definition of a collar.
    washer_id
    The product definition of a washer.
    sealant_id
    The product definition of a sealant.
    feature
    New feature for a manufacturing group. See GroupFeatureAdd()

    Related Functions

    Common Errors

    GroupEscapeSequenceAbsolute()/GroupEscapeSequenceMiddle()/GroupEscapeSequenceVector()

    	System::Int64  GroupEscapeSequenceAbsolute(
    	    System::String^ name,
    	    System::Int64 location_id,
    	    double level
    	    );
    
    	System::Int64  GroupEscapeSequenceAbsolute(
    	    System::String^ name,
    	    double x,
    	    double y,
    	    double z,
    	    double i,
    	    double j,
    	    double k,
    	    double level
    	);
    
    	System::Int64  GroupEscapeSequenceMiddle(
    	    System::String^ name,
    	    double incremental_distance,
    	    System::Int64 incremental_direction_id,
    	    double level
    	);
    
    	System::Int64  GroupEscapeSequenceVector(
    	    System::String^ name,
    	    double distance,
    	    System::Int64 direction_id,
    	    double level
    	);
    
    	System::Int64  GroupEscapeSequenceRobotAdd(
    	    System::Int64 group_id,
    	    System::String^ robot_id
    	);
    

    The GroupEscapeSequence functions describe how to escape from a planned machining sequence when there is a blockage preventing the next drilling operation. The escapes are divided into levels in the expectation that a move between two operations that are close in the sequence is relatively easy, and a move between two that are on the opposite side of a product is more complex.

    The GroupEscapeSequenceVector function describes an easy escape that is similar to a retract, move and enter. The escape defines a move from the top of the hole for a given distance in a given direction. If no direction is given then the escape direction is the reverse of the hole axis. This escape can be used to skip a hole by moving to the next one in the programmed sequence.

    The GroupEscapeSequenceMiddle function describes an escape between different sequences. A middle point is calculated for all the features in the group. This point is then moved by a given distance in the given direction. The escape moves the escape of all the features in a group to the same middle point, before it moves to the middle point of another group, or to the next level.

    The GroupEscapeSequenceAbsolute function describes an escape to a defined point. There may be multiple such moves to safe points progressively farther from the workpiece. A second version of the function creates a point to be the escape axis. In this case the axis is given the name of the group.

    In an escape between two points, the first level escape (with the lowest level number) is found first. This will typically be a GroupEscapeSequenceVector() to move away from the part in the reverse direction of the hole. The second level escape then moves the tool to a middle point defined for all the holes in a sequence. The third and subsequent escapes then move the tool to absolute safe points progressively further from the workpiece.

    An escape from Point A to Point B continues until a level is found where both fastener points belong to the same escape sequence. The escape path from A is computed by following its rules up to this level. The similar path is computed for B except its path will be run in reverse order. The full path is then run as A to Escape A, to Escape B to B. Depending on the level, Escape A and Escape B may or may not meet at the same point. If they do not then a direct move is inserted between the A and B points.

    The level is given as a Float so that additional moves can be inserted for escapes where fixtures must be avoided for some of the points.

    By default each Escape group is valid for all the robots, but it can be restricted to a given set of robots by the GroupEscapeSequenceRobotAdd function given above.

    Arguments

    name
    The name of the group and the absolute axis if one is made.
    location_id
    The position and direction of an absolute escape point.
    distance
    The distance to be moved away from the start of a feature.
    direction
    The direction to move away if not the same as the direction of the feature.
    inc_distance
    The escape point is incremented this distance away from the computed middle point.
    inc_direction
    The escape point increment is in this direction.
    level
    The level of this escape. Escapes are computed in ascending order.
    x, y, z, i, j, k
    Coordinates of an absolute escape point.

    Related Functions

    Common Errors

    ManufacturingStageFindOrMake()/MaufacturingStageFindUsingName()/GetManufacturingStageName()

    	System::Int64  ManufacturingStageFindOrMake(
    	    System::String^ name
    	);
    	System::String^ GetManufacturingStageName(
    	    System::Int64 phase_id
    	);
    	System::Int64  ManufacturingStageFindUsingName(
    	    System::String^ name
    	);
    	System::Collections::Generic::List^ GetManufacturingStageAll(
    	);
    

    The ManufacturingStageFindOrMake() function finds or makes a stage with a given name. If a stage with this name already exists then the function returns its identity. If the stage does not exist then the function makes a new stage and returns the new identity.

    The GetManufacturingStageName() function returns the name of the given stage.

    The ManufacturingStageFindUsingName() function returns the stage with the given name if one exists, and 0 if one does not exist. It does not make a new stage.

    The ManufacturingStageAll() function returns a collection containing all the manufacturing stages.

    Arguments

    name
    The name a stage which is recommended to be the same as the name of the manufacturing phase that is being managed by the stage.
    stage_id
    The identity of a stage.

    Related Functions

    Common Errors

    GetDrillAndFillTwin()

    System::Int64 GetDrillAndFillTwinCount(
    );
    System::Int64 GetDrillAndFillTwinNext (
       System::Int64 index
    );
    System::Collections::Generic::List^ GetDrillAndFillTwinAll(
    );
    

    The GetDrillandFillTwin() functions return all the Drill and Fill Twins in a project. Each twin describes the current state of a fastener point. It may have not yet been started, or it may have been drilled and tacked, or it may have been pinned and collared by not yet sealed.

    Arguments

    index
    An index to select an individual twin.

    Related Functions

    Common Errors

    GetDrillAndFillTwinStackup()

    System::Int64 GetDrillAndFillTwinStackup (
        System::Int64 twin_id
    );
    System::String^ GetStackUpMeasurementState(
        System::Int64 stackup_id
    );
    System::Int64 GetStackUpOuterProduct(
        System::Int64 stackup_id
    );
    void StackUpOuterProductSet(
        System::Int64 stackup_id,
        System::Int64 product_id
    );
    System::Collections::Generic::List^ GetStackupProducts(
        System::Int64 stackup_id
    );
    System::Collections::Generic::List^ GetStackupStarts(
        System::Int64 stackup_id
    )'
    System::Collections::Generic::List^ GetStackupEnds(
        System::Int64 stackup_id
    );
    

    The GetDrillandFillTwinStackup() functions return information about the Stackups in a Drill and Fill Twin. The stackups describe the holes drilled in an assembly. There is one layer in the stackup for each material being fastened. Multiple stackups are made during the life cycle of an assembly. In the typical application:

  • The first stackup is measured by CAD using the nominal geometry.
  • The second stackup is measured by CMM when the pieces are ready.
  • The third stackup is measured by lasers after clamping the pieces together.

    The GetDrillandFillTwinStackup() function returns the stackup.

    The GetDrillAndFillTwinStackupMeasurementState function returns the state of the stackup. The stackup state can be "designed" if the stackup was computed using design data, "predicted" if the stackup was computed using CMM measurement data, and "measured" if the stackup was computed after clamping using lasers.

    The GetStackUpOuterProduct function returns the identify of the outermost product. The outermost product is the one that is drilled first to make the drill and fill hole.

    The StackUpOuterProductSet function sets the identify of the outermost product. The outermost product is the one that is drilled first to make the drill and fill hole.

    The GetStackupStarts function returns the distance to the start of each layer from the top of the hole.

    The GetStackupEnds function returns the distance to the end of each layer from the top of the hole. For design data this distance may overlap with the start of the next layer to allow room for a shim of unknown size to be inserted into the stackup.

    The GetStackupProducts function returns the product of the material being fastened at each layer.

    Arguments

    twin_id
    The identity of a drill and fill twin.
    stackup_id
    The identity of a stackup in a drill and fill twin.
    index
    An index to select each stackup.

    Related Functions

    Common Errors

    GetDrillAndFillLayer()

    double GetDrillAndFillTwinLayerStart(
        System::Int64 stackup_id,
        System::Int64 index
    );
    System::String^ GetDrillAndFillTwinLayerStartUnit(
        System::Int64 stackup_id,
        System::Int64 index
    );
    double GetDrillAndFillTwinLayerEnd(
        System::Int64 stackup_id,
        System::Int64 index
    );
    System::String^ GetDrillAndFillTwinLayerEndUnit(
        System::Int64 stackup_id,
        System::Int64 index
    );
    System::Int64  GetDrillAndFillLayerUsage(
    	System::Int64 stackup_id,
    	System::Int64 index
    );
    System::Int64  GetDrillAndFillLayerFeature(
    	System::Int64 stackup_id,
    	System::Int64 index
    );
    void  GetDrillAndFillLayerFeatureSet(
    	System::Int64 stackup_id,
    	System::Int64 index
    );
    

    The GetDrillandFillTwinLayer() functions return information about each layer in a stackup. Other functions return the same information, but these ones may be easier to use in loops. These functions also return the unit of the measurement.

    The GetDrillAndFillTwinLayerStart function returns the distance to the start of each layer from the top of the hole.

    The GetDrillAndFillTwinLayerStartUnit function returns the unit of the start distance of each layer from the top of the hole.

    The GetDrillAndFillTwinLayerEnd function returns the distance to the end of each layer from the top of the hole. See the note about possible overlaps in the GetStackupEnds function.

    The GetDrillAndFillTwinLayerEndUnit function returns the unit of the end distance of each layer from the top of the hole.

    The GetDrillAnDFillTwinLayerUsage function returns the product being fastened at each layer. This can be used to find the material of the layer (needs documentation?).

    The GetDrillAnDFillTwinLayerFeature function returns the feature defined for the hole at this layer.

    The DrillAnDFillTwinLayerFeatureSet function sets the feature for the hole at this layer. The StackupFeatureMake function will make features for all the layers in a stackup automatically using the depth of each layer, and the diameter of the drill hole.

    Arguments

    stackup_id
    The identity of a stackup in a drill and fill twin.
    index
    An index to select each layer.

    Related Functions

    Common Errors

    GetTwinOf()/GetTwinPrototype()/SetTwinPrototype()/GetTwinDisposition()/SetTwinDisposition()

    System::Int64 GetTwinOfWorkingstepFeature(
        System::Int64 ws_id
    );
    System::Int64 GetTwinOfFeature(
        System::Int64 fea_id
    );
    System::Int64 GetTwinOfStackup(
        System::Int64 stackup_id
    );
    System::Int64 GetTwinPrototype (
       System::Int64 twin_id
    );
    void SetTwinPrototype (
       System::Int64 twin_id
       System::Int64 fea_id
    );
    System::String^ GetTwinDisposition (
       System::Int64 twin_id
    );
    void SetTwinDisposition (
       System::Int64 twin_id
       System::String^ state
    );
    System::Boolean HasTwin (
       System::Int64 ws_or_fea_id
    );
    System::Boolean HasDrillAndFillTwin (
       System::Int64 ws_or_fea_id
    );
    

    The GetTwinOfWorkingstepFeature() function returns the twin of the process feature of a workingstep or 0. For drill and fill applications this will be the twin of a drill and fill hole.

    The GetTwinOfFeature() function returns the twin of a feature or 0. This is another way to get the twin which might make the code easier to understand.

    The GetTwinOfStackup() function returns the twin that owns a stackup. The stackup is one of the most important properties of a drill and fill twin. There are multiple functions in this API to get the layers. There can be different stackups for different stages of the manufacturing including design, planning and manufacturing. See the GetDrillAndFillTwinStackup() function for more information.

    The GetTwinPrototype() function returns the feature that is the basis of a twin. The prototype holds information that is common to a class of holes. For example, the recommended feeds and speeds for the layers, and the ISO fit of the hole to the fastener items.

    The SetTwinPrototype() function sets the feature that is the basis of a twin. This function should be used carefully because of the danger of creating an inconsistency.

    The GetTwinDisposition() function returns the current state of the twin. The state returned is a summary as determined by a system. During design this will be a simulation system. During planning this will be an emulation system. During manufacturing this will be a control system.

    The SetTwinDisposition() function sets the current state of the twin. Currently, a typical value might be "Green" if the twin is good, "Orange" if something about the twin may merit further examination, "purple" if the twin is unfinished, "red" if an error occurred, and "blue" if the twin did not contain enough information to enable simulation.

    The HasTwin() function returns true if the feature has a digital twin.

    The HasDrillAndFillTwin() function returns true if the feature has a drill and fill digital twin. In this API all feature twins are drill and fill twins but in the future there will be twins for machining pockets and surfaces.

    Arguments

    ws_id
    identity of a workingstep.
    fea_id
    identity of a feature.
    stackup_id
    identity of a stackup.
    twin_id
    identity of a digital twin.
    ws_or_fea_id
    identity of a workingstep or feature.

    Related Functions

    Common Errors

    GetProductInstanceTwinAll()/GetProductInstanceTwinSerialName()/GetProductInstanceTwinProduct()

    System::Collections::Generic::List^ GetProductInstanceTwinAll(
    );
    System::Collections::Generic::List^ GetProductInstanceTwinAll(
        System::Int64 product_id
    );
    System::Int64 GetProductInstanceTwinProduct(
        System::Int64 twin_id
    );
    System::Int64 GetProductInstanceTwinSerialNumber(
        System::Int64 twin_id
    );
    System::String GetProductInstanceTwinSerialName(
        System::Int64 twin_id
    );
    System::Int64 GetProductInstanceTwinAssemblyId(
        System::Int64 twin_id
    );
    System::Int64 GetProductInstanceTwinEnvelope(
        System::Int64 twin_id,
        [System::Runtime::InteropServices::Out] double% ret_x,
        [System::Runtime::InteropServices::Out] double% ret_y,
        [System::Runtime::InteropServices::Out] double% ret_z,
        [System::Runtime::InteropServices::Out] double% ret_length,
        [System::Runtime::InteropServices::Out] double% ret_width,
        [System::Runtime::InteropServices::Out] double% ret_height
    );
    System::Boolean GetProductInstanceTwinHasEnvelope(
        System::Int64 twin_id
    );
    

    The GetProductInstanceTwinAll() function returns all the product twins in a project. Any product may be twinned. In a drill and fill application the majority of product twins are fasteners and collars. There are two versions of the function. The first version returns all the twins. The second version returns all the twins of a specific product such as a fastener with a longer grip length.

    The GetProductInstanceTwinProduct() function returns the product twinned by a product instance twin. For example, it may return the product definition for the fastener with a longer grip length if it was the product twinned by this instance.

    The GetProductInstanceTwinSerialNumber() function returns the serial number of a product instance twin. This number will be unique within the single twin instance. For example, if there are 8 twin instances then the serial number of the first will be 0 and the serial number of the last will be 7.

    The GetProductInstanceTwinSerialName() function returns a unique name for the product instance twin. The name will be formed by catenating the name of the twinned product with the serial number of this twin instance. For example, if the twinned product is called "PinGrip6", and this is the first twin instance, then the serial name will be "PinGrip6(0)".

    If a twin has been made from an assembly instance then the GetProductInstanceTwinAssemblyId() function returns the identity of that assembly instance. For example, the product design for a wing may include hundreds of copies of a fastener, one for each drill hole location on the wing. This function returns the identity of the sub-assembly used to make the given product twin.

    The GetProductInstanceEnvelope() function returns a bounding box envelope that surrounds the twin in world coordinates. If there are many twins for a product then each will get its own envelope that can be used to pick this specific instance.

    The GetProductInstanceTwinHasEnvelope() function returns true if the twin has a bounding box envelope.

    Arguments

    product_id
    identity of a product.
    twin_id
    identity of a digital twin.
    ret_x, ret_y, ret_z
    center of the envelope in world coordinates.
    ret_length, ret_width, ret_height
    dimensions of the envelope.

    Related Functions

    Common Errors

    GetDrillAndFillTwinPinInPlace()/GetDrillAndFillTwinCollarInPlace GetFeatureContainingProductTwin()

    	System::Int64 GetDrillAndFillTwinPinInPlace(
    	    System::Int64 twin_id
    	);
    	System::Int64 GetDrillAndFillTwinCollarInPlace(
    	    System::Int64 twin_id
    	);
    	System::Int64 GetFeatureContainingProductTwin(
    	    System::Int64 twin_id
    	);
    

    The GetDrillAndFillPinInPlace() function returns the fastener twin that has been placed into a drill hole twin.

    The GetDrillAndFillCollarInPlace() function returns the collar twin that has been placed into a drill hole twin.

    The GetFeatureContainingProduct() function returns the drill and fill twin that contains a fastener or collar, and 0 if one is not found.

    Arguments

    twin_id
    identity of a drill and fill digital twin.

    Related Functions

    Common Errors

    GetGroupName()/GetGroupType()

    	System::String^ GetGroupName(
    	    System::Int64 group_id
    	);
    	System::String^ GetGroupType(
    	    System::Int64 group_id
    	);
    

    The GetGroupName() function returns the name of the group.

    The GetGroupType() function returns the type of a group by returning one of the following strings.

    Arguments

    group_id
    The group.

    Related Functions

    Common Errors

    GetGroupAllowableRobot()/GetGroupThreeFrameReferenceGuides()/GetGroupFastenerItems()/GetGroupFastenerWasherCount()

    	System::Collections::Generic::List^ GetGroupOneUpAssemblyMustFollowOneOfTheseAll(
    	    System::Int64 group_id
    	);
    	System::Boolean GetGroupAllowableRobot(
    	    System::Int64 group_id,
    	    [System::Runtime::InteropServices::Out] double ret_precedence,
    	    [System::Runtime::InteropServices::Out] System::String^ ret_robot_identifier
    	);
    	System::Boolean GetGroupThreeFrameReferenceGuides(
    	    System::Int64 group_id,
    	    [System::Runtime::InteropServices::Out] System::Int64% ret_primary_id,
    	    [System::Runtime::InteropServices::Out] System::Int64% ret_secondary_id,
    	    [System::Runtime::InteropServices::Out] System::Int64% ret_tertiary_id
    	);
    	System::Collections::Generic::List^ GetGroupBestFitReferenceFrameGuidesAll(
    	    System::Int64 group_id
    	);
    	System::Collections::Generic::List^ GetGroupSameAssemblyPartsAll(
    	    System::Int64 group_id
    	);
    	System::Collections::Generic::List^ GetGroupPrecedenceGroupAll(
        	    System::Int64 group_id
    	);
    

    The GetGroupOneUpAssemblyMustFollowOneOfTheseAll() function returns a list of the operations that are a precondition for beginning work on a oneup assembly. At least one of the operations in this group must be finished before work can begin. The operation can be simple or complex.

    The GetGroupAllowable() function returns the identifier of a robot that is allowed to operate on a group of holes. If multiple robots can be used then the one with the lowest precedence should be chosen. If the value of the precedence is 0 then it has not been set.

    The GetGroupThreeFrameReferenceGuides() function returns the geometry reference frame for the features in a group using up to three reference holes. If there is only one reference hole in the frame then the secondary and tertiary reference holes are given as 0. If there are two reference holes in the frame then the tertiary reference hole is given a 0.

    The GetGroupBestFitFrameReferenceGuidesAll() function returns the guides for a geometry reference frame for the features in a group defined by best fitting a set of holes.

    The GetGroupAllowableRobot() function returns a robot allowed to work on a set of holes. There may be many such groups. If multiple robots are allowed for a hole then the one with the lowest precedence should be selected.

    The GetGroupSameAssemblyPartsAll() function returns the parts fastened by the holes in a group.

    The GetGroupPrecedenceGroupAll() function returns the groups defining twins whose completion must precede this group. Any type of group may be the preceding group, including the generic group.

    Arguments

    group_id
    The group.

    Related Functions

    Common Errors

    GetGroupFastenerItems()/GetGroupFastenerWasherCount()/GetGroupFastenerSealantByType()

    	System::Boolean GetGroupFastenerItems(
    	    System::Int64 group_id,
    	    [System::Runtime::InteropServices::Out] System::Int64% ret_fastener_id,
    	    [System::Runtime::InteropServices::Out] System::Int64% ret_collar_id,
    	    [System::Runtime::InteropServices::Out] System::Int64% ret_washer_id
    	);
    	System::Int64 GetGroupFastenerWasherCount(
    	    System::Int64 group_id
    	);
    	System::Int64 GetGroupFastenerWasherNext(
    	    System::Int64 group_id,
    	    System::Int64 index
    	);
    	System::Int64 GetGroupFastenerSealantByType(
    	    System::Int64 group_id,
    	    System::String^ sealant_type
    	);
    

    The GetGroupFastenerItems() function returns the parts that can be used to fasten the holes in a group. Each group defines a pin, collar and washers that can be used to fasten the features in that group. If there are multiple fastening solutions for a feature then it can be in multiple groups. However, the system will then need to be told which solution should be used when the hole is fastened. See the GroupPrimarySetInStage() function.

    The GroupFastenerWasherCount() function returns the number of washers in the group. The GroupFastenerWasherNext() function returns each washer. If there are multiple washers in the group, then they will be added to the fastener in the order given. If there is only one washer, but multiple washers are needed, then the one washer will be added multiple times.

    A fastener group may also define 'fastener', 'fay; and 'cap' sealants. The GetGroupFastenerSealantByType() function returns the material definition of the sealant that has been defined for each type.

    Arguments

    group_id
    The group.

    Related Functions

    Common Errors

    GetGroupEscapeSequenceType()/GetGroupEscapeSequenceAbsolute() GetGroupEscapeSequenceMiddle()/GetGroupEscapeSequenceVector()

    	System::String^ GetGroupEscapeSequenceType(
    	    System::Int64 group_id,
    	    [System::Runtime::InteropServices::Out] double% ret_level
    	);	
    	
    	System::Int64 GetGroupEscapeSequenceAbsolute(
    	    System::Int64 group_id
    	);
    
    	double GetGroupEscapeSequenceMiddle(
    	    System::Int64 group_id,
    	    [System::Runtime::InteropServices::Out] System::Int64% inc_direction_id
    	);
    
    	double GetGroupEscapeSequenceVector(
    	    System::Int64 group_id,
    	    [System::Runtime::InteropServices::Out] System::Int64% direction_id
    	);
    
    	System::Int64 GetGroupEscapeSequenceRobotCount(
    	    System::Int64 group_id
    	);
    
    	System::String^ GetGroupEscapeSequenceRobotNext(
    	    System::Int64 group_id,
    	    System::Int64 index
    	);
    

    The GetGroupEscapeSequenceType function returns the level and type of an escape sequence. The returned value may be "Connect_absolute:, "Connect_middle" or "Connect_vector".

    The GetGroupEscapeSequenceXxx() functiona return the parameter data of each type of escape. See the GroupEscapeSequence function for definitions of the parameters.

    The GetGroupEscapeSequenceRobot/Count/Next() functions return the robots that can be used for the escape sequence. If no robots are listed then the sequence can be used for any robot.

    Arguments

    group_id
    The group.

    Related Functions

    Common Errors

    GetGroupFeatureFirst()/GetGroupFeatureCount()/GetGroupFeatureAll()

    	System::Int64 GetGroupFeatureFirst(
    	    System::Int64 group_id,
    	);
    	System::Int64 GetGroupFeatureCount(
    	    System::Int64 group_id
    	);
    	System::Collections::Generic::List^ GetGroupFeaturesAll(
    	    System::Int64 group_id
    	);
    
    

    The GetGroupFeaturesFirst() function returns the first feature in a group. This feature can then be used as an example for other operations.

    The GetGroupFeaturesCount() function returns the number of features in a group.

    The GetGroupFeaturesAll() function returns all the manufacturing features that are in the group.

    Arguments

    group_id
    The group.

    Related Functions

    Common Errors

    GetGroupManufacturingStagesAll()/GetGroupManufacturingStageApplies()

    	System::Int64 GetGroupManufacturingStagesFirst(
    	    System::Int64 group_id,
    	);
    	System::Int64 GetGroupManufacturingStagesCount(
    	    System::Int64 group_id
    	);
    	System::Collections::Generic::List^ GetGroupManufacturingStagesAll(
    	    System::Int64 group_id
    	);
    	System::Boolean GetGroupManufacturingStagesApplies(
    	    System::Int64 group_id,
    	    System::Int64 stage_id
    	);
    
    

    The GetGroupManufacturingStagesFirst() function returns the first manufacturing stage of a group.

    The GetGroupManufacturingStagesCount() function returns the number of manufacturing stages covered by a group.

    The GetGroupManufacturingStagesAll() function returns a list of all the manufacturing stages that are covered by a group.

    The GetGroupManufacturingStageApplies() function returns true if a group defines information for a manufacturing stage. Normally, the function returns true if the given phase is in its applicable_phase list, but the function also returns true if the applicable_phases list is empty because a group applies to all phases when the list is empty.

    Note: these functions compute results that are independent of the features. Two stages, in two groups, that appear to conflict may not do so in practice because they do not have any features in common.

    If there is a conflict between two groups because they both have the same type of information for a feature, for example, a list of the allowed fastener items, then it can be resolved by making one of the groups primary. See the GroupPrimarySetInStage() function. However, the conflict might be because the two groups define information for different manufacturing stages, in which case add the relevant stage to each group using the ManufacturingStageAdd() function.

    Arguments

    group_id
    The group.

    Related Functions

    Common Errors

    FindAllGroups()/FindXxxGroups()

    System::Collections::Generic::List^ FindAllGroups();
    System::Collections::Generic::List^ FindOneupAssemblyGroups();
    System::Collections::Generic::List^ FindReferenceFrameGroups();
    System::Collections::Generic::List^ FindSameAssemblyGroups();
    System::Collections::Generic::List^ FindAllowableRobotGroups();
    System::Collections::Generic::List^ FindPrecedenceGroups();
    System::Collections::Generic::List^ FindFastenerGroups();
    System::Collections::Generic::List^ FindEscapeSequenceGroups();
    

    The FindAllGroups() functions find all the groups in the project. This includes both the groups with user defined semantics, and the groups with system defined semantics.

    The FindXXXGroups() functions find the corresponding groups in the project. The properties of the groups as well as the twins/features that are members of that group can then be found using the related functions of the GetGroupMember() functions.

    Related Functions

    Common Errors

    FindXxxGroupMembersAll()

    System::Collections::Generic::List^ FindOneupAssemblyGroupMembersAll();
    System::Collections::Generic::List^ FindReferenceFrameGroupMembersAll();
    System::Collections::Generic::List^ FindSameAssemblyGroupMembersAll();
    System::Collections::Generic::List^ FindAllowableRobotGroupMembersAll();
    System::Collections::Generic::List^ FindPrecedenceGroupMembersAll();
    System::Collections::Generic::List^ FindFastenerGroupMembersAll();
    System::Collections::Generic::List^ FindEscapeSequenceGroupMembersAll();
    

    The FindXXXGroupMembersAll() functions return all the twins that belong to a particular type of group. This is every group of that type, so a feature will be included if it belongs to one Fastener group, or every Fastener group.

    Related Functions

    Common Errors

    FindXxxFeatureFriends()/FindXxxGroupFriends()

    System::Collections::Generic::List^ FindAllowableRobotGroupFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindAllowableRobotFeatureFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindOneupAssemblyGroupFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindOneupAssemblyFeatureFriends(
        System::Int64 feature_id
    );	
    System::Collections::Generic::List^ FindSameAssemblyGroupFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindSameAssemblyFeatureFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindThreeFrameGroupFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindThreeFrameFeatureFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindBestFitGroupFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindBestFitFeatureFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindPrecedenceGroupFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindPrecedenceFeatureFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindFastenerGroupFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindFastenerFeatureFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindEscapeSequenceGroupFriends(
        System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindEscapeSequenceFeatureFriends(
        System::Int64 feature_id
    );
    
    System::Collections::Generic::List^ FindAllGroupFriends(
    	System::Int64 feature_id
    );
    System::Collections::Generic::List^ FindAllFeatureFriends(
    	System::Int64 feature_id
    );
    

    The FindXXXFeatureFriends() functions return all the features that are in the same group as the given feature. This may include multiple groups and multiple types of groups.

    The FindXXXGroupFriends() functions return all the groups that have the given feature as a member. The features that are the friends of the given feature in each specific group can then be found using the functions in the GetGroupMemberAll() function.

    The FindAllFeatureFriends() and FindAllGroupFriends()functions are provided for completeness so that you can find all the features that are in the same group as a feature, and all the groups that contain a feature.

    Arguments

    feature_id
    The feature whose friends you would like to meet.

    Related Functions

    Common Errors

    GetPrimaryXxxGroup()

    System::Int64 GetPrimaryAllowableRobotGroup(
        System::Int64 feature_id
    );
    System::Int64 GetPrimaryOneupAssemblyGroup(
        System::Int64 feature_id
    );	
    System::Int64 GetPrimarySameAssemblyGroup(
        System::Int64 feature_id
    );
    System::Int64 GetPrimaryThreeFrameGroup(
        System::Int64 feature_id
    );
    System::Int64 GetPrimaryBestFitGroup(
        System::Int64 feature_id
    );
    System::Int64 GetPrimaryPrecedenceGroup(
        System::Int64 feature_id
    );
    System::Int64 GetPrimaryFastenerGroup(
        System::Int64 feature_id
    );
    System::Int64 GetPrimaryEscapeSequenceGroup(
        System::Int64 feature_id,
        double level
    );
    

    The GetPrimaryXxxGroup() functions returns the preferred group for a feature. This group will be the one for the current manufacturing stage with its primary flag set. If there are multiple groups with the primary flag set then an error message will be issued.

    If the Group is an Escape Sequence, then to be selected it must also have the right level.

    The primary group can be set for a group using the GetPrimarySetInStage() function, and unset using the GetPrimaryUnsetInStage() function.

    Arguments

    feature_id
    The feature for which you require primary group information.

    Related Functions

    Common Errors

    GetPrimarySetInStage()/GetPrimaryUnSetInStage()/GetPrimaryIsSetInStage()

    void GroupPrimarySetInStage(
        System::Int64 group_id,
        System::Int64 stage_id
    );
    System::Int64 GroupPrimaryUnsetInStage(
        System::Int64 group_id,
        System::Int64 stage_id
    );
    System::Boolean GroupPrimaryIsSetInStage(
        System::Int64 group_id,
        System::Int64 stage_id
    );
    

    The GetPrimarySetInStage() function sets the group that contains the primary information for a stage. If data is going to be accessed using the GetPrimaryXxx functions then only one group should be primary for each feature in each manufacturing stage. If a primary cannot be selected then the group information should be selected using other functions.

    Another way to get fancy is to set and unset the primary group during the operation of a program. The GetPrimaryUnSetInStage() function unsets the primacy of a group so that another group can climb the slippery pole.

    If life is becoming confused then the GetPrimaryIsSetInStage() function will tell you which groups have been set as primary. However, if you find yourself using this function, then you should probably give serious consideration to making separate groups for each fastener.

    In summary a group is primary, for a feature, in a stage, if:

    When life is simple you define one fastener group. Unfortunately, matters becomes more complex when you need to define fasteners for different phases, but as long as your fastener group is the only one for a phase, there is no issue. Finally, if there is a complex web of features and fastener groups, because there are multiple suppliers, then you may be able get out of jail by making one of the groups primary.

    Arguments

    group_id
    The group that is to become primary.

    Related Functions

    Common Errors

    GetPrimaryPin()/GetPrimaryCollar()/GetPrimaryWasher()/GetFirstWasher()

    System::Int64 GetPrimaryPin(
       System::Int64 feature_id,
       System::Int64 phase_id,
    );
    System::Int64 GetPrimaryCollar(
       System::Int64 feature_id,
       System::Int64 phase_id,
    );
    System::Int64 GetPrimaryWasher(
       System::Int64 feature_id,
       System::Int64 phase_id,
    );
    System::Int64 GetFirstWasher(
       System::Int64 feature_id,
       System::Int64 phase_id,
    );
    

    The functions in this section return the equipment chosen for a drill and fill twin if a clear selection can be disambiguated. Normally a large range of vendors can supply the fastener items, and the range of fasteners permitted is defined by setting fastener groups. These functions assume that one of the selected groups has been defined to be "primary" for a given phase of the project. An error message is given if there are multiple primaries.

    The GetPrimaryPin() function returns the primary pin for the given phase.

    The GetPrimaryCollar() function returns the primary collar for the given phase.

    The GetPrimaryWasher() function returns the primary washer for the given phase.

    The GetFirstWasher() function returns the first washer found for the given phase regardless of primacy.

    The primary group can be set for a group using the GetPrimarySetInStage() function, and unset using the GetPrimaryUnsetInStage() function.

    Arguments

    feature_id
    The feature for which you require primary group information.
    phase_id
    The manufacturing stage that requires this information. If this argument is 0 then the information is returned for any stage. However, the liklihood of a conflict over which group is the primary will also increase.

    Related Functions

    Common Errors

    GetSupplierTwinProduct()/GetSupplierTwinName()/GetSupplierTwinSerialName()

    System::String^ GetSupplierTwinProduct(
        System::Int64 twin_id
    )
    System::String^ GetSupplierTwinName(
        System::Int64 twin_id
    )
    System::String^ GetSupplierTwinSerialName(
        System::Int64 twin_id
    )
    
    The regular twin for a product is defined by the design data. However, another twin may be selected at manufacturing time using the planning information given in the groups. This twin then becomes the supplier twin. The functions in this section give access to information about this supplier twin.

    The GetSupplierTwinProduct() functions return the product model of a fastener item as defined by a supplier.

    The GetSupplierTwinName() function return the name of the supplier twin product model.

    Many twins maybe defined for the same product model, the GetSupplierTwinSerialName()function distinguishes between all the instances using an internally generated serial name.

    Related Functions

    Common Errors

    IsDrillAndFillTwin()/IsWorkpieceTwin()

    System::Boolean IsDrillAndFillTwin(
        System::Int64 eid
    );
    System::Boolean IsWorkpieceTwin(
        System::Int64 eid
    );
    

    The IsDrillAndFillTwin() function returns true if the argument identifies a drill and fill feature twin.

    The IsWorkpieceTwin() function returns true if the argument identifies a workpiece twin or a workpiece prototype. For example a pin, collar or washer twin or prototype.

    Common Errors

    GetProcessTwinElapsedTime()/Seconds()

    System::String^ GetProcessTwinElapsedTime (
    	System::Int64 ex_id
    	);
    
    double GetProcessTwinElapsedTimeSeconds (
    	System::Int64 ex_id
    	);
    

    The GetProcessTwinElapsedTime() functions return the time required to complete the executable which can be a workingstep, workplan or other program structure.

    The GetProcessTwinElapsedTime() function return the time as a string in days, hours, minutes and seconds.

    The GetPrpcessTwinElapsedTimeSeconds() function return the time as seconds in a double value..

    GetTwinEnd()/Start()

    System::String^ GetProcessTwinStart (
    	System::Int64 ex_id
    	);
    
    System::String^ GetProcessTwinEnd (
    	System::Int64 ex_id
    	);
    

    The GetProcessTwinStart() function gets the start time of the given executable in ISO 8601 format.

    The GetProcessTwinEnd() function gets the end time of the given executable in ISO 8601 format.

    Arguments

    ex_id
    The identity of an execuable which may be a workingstep, workplan or other program structure.

    Related Functions

    Common Errors

    GetProcessTwinException()

    System::String^ GetProcessTwinException (
    	System::Int64 ex_id
    	);
    

    If set then the execution of the executable was judged to have terminated before completion for the given reason.

    GetProcessTwinSource()

    System::String^ GetProcessTwinSource (
    	System::Int64 ex_id
    	);
    

    The name of the machine that executed the executable. This is useful information if the program was run by mulitple machines (robots).

    TwinProcessEnd()Start()Clear()

    void TwinProcessStart (
    	System::Int64 ex_id,
    	System::String^ source
    	);
    
    void TwinProcessStart (
    	System::Int64 ex_id,
    	System::String^ source,
    	System::String^ time_stamp
    	);
    
    void TwinProcessEnd (
    	System::Int64 ex_id
    	);
    
    void TwinProcessEnd (
    	System::Int64 ex_id,
    	System::String^ time_stamp
    	);
    
    void TwinProcessClear (
    	System::Int64 ex_id
    	);
    
    

    The TwinProcessStart() function is used to record the start time of an executable. If a time is given then it must be in a format compatible with ISO 8601, If no time is given then the system clock will be used to compute the start time. The time may be set using a value taken from an MTConnect stream. If there are many machines, then the source sets the machine used to perform the execution.

    The TwinProcessEnd() function is used to record the end time of an executable. If a time is given then it must be in a format compatible with ISO 8601, If no time is given then the system clock will be used to compute the start time. The time may be set using a value taken from an MTConnect stream.

    The TwinProcessClear() function is used to clear the twinning data in an executable so that a machining process, or machining simulation process, can be restarted.

    Arguments

    ex_id
    The identity of an executable which may be a workingstep, workplan or other program structure.
    source
    Optional string describing the machine executing the executable.
    time_stamp
    Time of the start or end in ISO 8610 compatible format.

    Related Functions

    Common Errors

    TwinProcessException()

    System::String^ TwinProcessException (
    	System::Int64 ex_id,
    	System::String^ explanation
    	);
    

    If an error has been detected then give an explanation. The twin is not ended. If the function is called multiple times then only the last exception will be saved. Multi-line explanation strings may be used for more complex cases.

    TwinReset()

    System::String^ TwinReset (
    	System::Int64 ex_id,
    	);
    

    Set all the twin data in the process back to its initial state.

    ReduceDrillingProcess()

    System::String^ ReduceDrillingProcess (
    	);
    

    Analyze the program to determine what drilling operations are not necessary because they already exist on the workpiece.

    A reduced size tool is generated for each operation. If the tool does not remove any material then the operation is determined to be redundant and its workingstep is disabled.

    The reduced sized tools are garbage collected when the file is saved, but not before.

    The function can be applied to other types of processes but is likely to produce incorrect results.