CopyRefObjTechParams

You can use this function for Optiva Copy Methods.

Purpose

This function copies Arguments and values from the reference object to a new object.

Syntax


object CopyRefObjTechParams(bool copyAttributes = true)

Return Value

If the code is successful, a value greater than zero (0) is displayed.

Arguments

Part Description
copyAttributes The technical parameters are copied from a primary object to a new reference object:
  • If the objects are of different types (e.g., Formula → Specification), and you do not want attribute columns copied, the parameter must be set to false.
  • If the objects are of the same type (e.g., Formula → Formula), this parameter does not apply as attribute columns are always copied in that case.

Example

This script is in a copy method for a specification that is created from the References tab of a formula (Object Type = SPECIFICATION, Reference Type = FORMULA, Events = Create From As New). It adds all of the formula parameters, even if they have no value, to the specification. If a formula parameter has a value, it is added as the target value in the specification.


Dim lParam As Long = CopyRefObjTechParams()

This script is in a copy method for a specification that is created from the References tab of a formula (Object Type = SPECIFICATION, Reference Type = FORMULA, Events = Create From As New). It copies all parameters (with or without value) from the formula to the target column of parameters grid in specification.

Note: The attribute columns are not copied as the copyAttributes flag is set to false.

This script is in a copy method for a specification that is created from the References tab of a formula(Object Type = FORMULA, Reference Type = FORMULA, Events = Create From As New). It copies all parameters (with or without value) from the reference formula to the new formula.

Note: The attribute columns are copied.
CopyRefObjTechParams();