CopyRefObjTechParams
You can use the CopyRefObjTechParams function to copy technical parameters (arguments) and their values from primary object to a newly created object. The function also provides control over copying attribute columns when copying between different object types.
When to use
You can use this function when implementing copy methods for objects created from the References tab.
When not to use
You cannot use this function outside of copy method workflows. This function requires specific content setup.
Syntax
object CopyRefObjTechParams(bool copyAttributes = true);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| copyAttributes | bool | Optional | Controls if the attribute column is copied along with the parameters. Possible values:
Note:
|
Return Value
The application returns a value greater than zero (0) if the operation is successful.
Impact
The changes are applied to the new object immediately and related calculations are updated.
Prerequisites
The attribute columns must be compatible if copyAttributes is true.
Examples
- Example 1
-
Copy Parameters Without Attributes (Different Object Types)
CopyRefObjTechParams(false);
- Description
-
This script is in a copy method for a specification 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 the parameters grid in the specification. Note that attribute columns are not copied as the copyAttributes flag is set to false.
- Example 2
-
Copy Parameters With Attributes (Same Object Types)
CopyRefObjTechParams();
- Description
- This script is in a copy method for a formula created from the References tab of another 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 that attribute columns are copied.