FZ_PanDAForm.CopyUnit

Copies a processing unit

Public Shared Function CopyUnit( _
   ByVal srcUnitNo As Integer, _
   ByVal destUnitNo As Integer, _
   ByVal mode As Integer _
) As Integer

Parameters
srcUnitNo
The processing unit number of the processing unit which is copied from.
Input
destUnitNo
The processing unit number of the processing unit which is copied to.
Input
mode
Copy mode
0: Copies to a copy destination processing unit by overwriting.
1: Inserts a copy source processing unit and moves down the subsequent processing units by one.
Input

Return Value
Returns 0 when a processing unit is successfully copied.
Otherwise returns a non-zero value.

Description
Copies from the specified copy source processing unit to the copy destination processing unit.
Copy mode specifies whether the copy is overwrite-copy or insertion-copy.
The processing target scene is a current scene.
* When you execute this method, basically disable a measurement trigger (execute refMeasureStop ) before the execution.
After copied a processing unit, enable the measurement trigger (execute refMeasureStart ).

Example
   Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click

       ' Disables a measurement trigger
       MeasureStop()

       ' Overwrites the processing unit 1 to unit 2
       CopyUnit(1, 2, 0)

       ' Copies and inserts the processing unit 3 to unit 5
       CopyUnit(3, 5, 1)

       ' Enables a measurement trigger
       MeasureStart()

  End Sub