Method: GetSize for Area
- Updated2024-09-12
- 2 minute(s) read
DIAdem VIEW > Methods > Method: GetSize for Area
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)
| Object | Area Object with this method |
| Top | Double Specifies the top margin as a percentage of the height of the worksheet. |
| Bottom | Double Specifies the bottom margin as a percentage of the height of the worksheet. |
| Left | Double Specifies the left margin as a percentage of the width of the worksheet. |
| Right | Double 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:
| VBScript | Python |
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)