DIAdem Help

Method: Copy for Areas

  • Updated2024-09-12
  • 2 minute(s) read

Method: Copy for Areas

Copies an area in DIAdem VIEW and splits the specified target area in the same worksheet. Use the CopyArea for Sheet method to copy an area to another worksheet. Use the MoveArea for Sheet or the Move for Areas method to move an area.

Set oArea = Object.Copy(SourceAreaNameOrIndex, TargetAreaNameOrIndex, enumSplitDirection, Ratio)
ObjectAreas
Object with this method
SourceAreaNameOrIndexVariant
Specifies the name or index of the area you want to copy.
TargetAreaNameOrIndexVariant
Specifies the name or index of the target area.
enumSplitDirectionLongInteger

Specifies the relative position of the copied area to the target area.
1eSplitTopTop
2eSplitBottomBottom
3eSplitLeftLeft
4eSplitRightRight
RatioDouble
Specifies the split ratio for values from 0 to 1. The split ratio is the proportion of original area which the copied area occupies. If the split ratio is 0.25, the copied area takes up a quarter of the original area.
oAreaArea
Returned object of the copied area.

The following example copies the first area to the right of the second area in the active worksheet. The copied area occupies a quarter of the target area.

VBScriptPython

 

Dim oMyAreas, oMyCopiedArea
Set oMyAreas = View.ActiveSheet.Areas
Set oMyCopiedArea = oMyAreas.Copy(1, 2, eSplitRight, 0.25)