Method: Add for SynchronizationGroups
- Updated2024-09-12
- 1 minute(s) read
DIAdem REPORT > Methods > Method: Add for SynchronizationGroups
Method: Add for SynchronizationGroups
Adds a synchronization group to the list of synchronization groups in DIAdem REPORT.
Set oSynchronizationGroup = Object.Add(ID)
| Object | SynchronizationGroups Object with this method |
| ID | String Specifies the name of the synchronization group. |
| oSynchronizationGroup | SynchronizationGroup Returned object |
The following example creates a synchronization group for x-axes if the synchronization group does not yet exist, and assigns this synchronization group to the x-axes of all 2D axis systems in the current worksheet. If you then modify the x-axis scaling, DIAdem automatically modifies the scaling of all x-axes of the same synchronization group.
| VBScript | Python |
Dim oMyXSync, oMyReportObjs, oMyReportObj Set oMyXSync = Report.Settings.Synchronization.AxisSystem2D.XAxis If Not oMyXSync.Exists("XAxis Group1") Then Call oMyXSync.Add("XAxis Group1") End If Set oMyReportObjs = Report.ActiveSheet.Objects For Each oMyReportObj in oMyReportObjs If oMyReportObj.ObjectType = eReportObject2DAxisSystem Then oMyReportObj.XAxis.Scaling.SynchronizationID = "XAxis Group1" End If Next