Collection: 2DBackgroundSegments
- Updated2024-09-12
- 1 minute(s) read
(2DAxisSettings | Collections) > Collection: 2DBackgroundSegments
Collection: 2DBackgroundSegments
Collection of all 2DBackgroundSegment objects in DIAdem REPORT. Use the 2DBackgroundSegments collection to access a single background element in DIAdem REPORT.
The following example displays the names of the 2D axis systems and the number of background segments in 2D axis systems. Then the example displays the x-channels and the y-channels of the background segments:
| VBScript | Python |
Dim oMyReportObj, oMyReportObjects, oMyBackgroundSegment, sOutput sOutput = "" Set oMyReportObjects = Report.ActiveSheet.Objects For Each oMyReportObj in oMyReportObjects If oMyReportObj.ObjectType = eReportObject2DAxisSystem Then Call MsgBoxDisp("Object name: " & oMyReportObj.Name & _ vbCrLf & "Number of background segments: " & oMyReportObj.Settings.BackgroundSegments.Count) For Each oMyBackgroundSegment in oMyReportObj.Settings.BackgroundSegments sOutput = sOutput & "X-channel: " & oMyBackgroundSegment.XChannel.Reference & vbTab & _ "y-channel: " & oMyBackgroundSegment.YChannel.Reference & vbCrLf Next End If Next Call MsgBoxDisp(sOutput)