DIAdem Help

Method: GetSize for Area

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

Method: GetSize for Area

Specifies in DIAdem VIEW the margins between an area and the edges of the worksheet, as a percentage of the size of the worksheet.

Object.GetSize(Top, Bottom, Left, Right)
ObjectArea
Object with this method
TopDouble
Specifies the top margin as a percentage of the height of the worksheet.
BottomDouble
Specifies the bottom margin as a percentage of the height of the worksheet.
LeftDouble
Specifies the left margin as a percentage of the width of the worksheet.
RightDouble
Specifies the right margin as a percentage of the width of the worksheet.

The following example splits the enabled area several times and then displays the margins of the enabled area:

VBScriptPython

 

Dim dTop, dBottom, dLeft, dRight
Dim oMySheet: Set oMySheet = View.Sheets.Add("NewSheet")
Dim oMyArea: Set oMyArea = oMySheet.ActiveArea
Dim oMyTopArea: Set oMyTopArea = oMyArea.SplitTop("TopArea",0.5)
Dim oMyRightArea: Set oMyRightArea = oMyTopArea.SplitRight("RightArea",0.5)
Dim oMyBottom Area: Set oMyBottomArea = oMyRightArea.SplitBottom("BottomArea",0.5)
Dim oMyLeftArea: Set oMyLeftArea = oMyBottomArea.SplitLeft("LeftArea",0.5)
Call oMyLeftArea.GetSize(dTop,dBottom,dRight,dLeft)
Call MsgBoxDisp("Top: " & dTop & " - " & "Bottom: " & dBottom & vbCrLf & "Left: " & dLeft & " - " & "Right: " & dRight)