Method: Add for Segments
- Updated2024-09-12
- 2 minute(s) read
DIAdem VIEW > Methods > Method: Add for Segments
Method: Add for Segments
Adds an object to the Segments collection in DIAdem VIEW and returns a Segment object:
Set oSegment = Object.Add(XChannel, YChannel, lpszDirection)
| Object | Segments Object with this method |
| XChannel | Variant Specifies the name or the number of the x-channel to be displayed. |
| YChannel | Variant Specifies the name or the number of the y-channel to be displayed. |
| lpszDirection | String Specifies whether DIAdem displays the segment in horizontal or in vertical direction. |
| oSegment | Segment Returned object |
The following example creates a 2D axis system with a curve and a segment:
| VBScript | Python |
Call View.Sheets.RemoveAll() Dim oMySheet: Set oMySheet = View.Sheets.Add("NewSheet") Dim oMyArea: Set oMyArea = oMySheet.ActiveArea oMyArea.DisplayObjType = "CurveChart2D" Call oMyArea.DisplayObj.Curves2D.Add("[1]/[1]","[1]/[3]") Call oMyArea.DisplayObj.Segments.Add("[1]/[2]","[1]/[4]","X")
See Also
Examples
Alignment Functions in DIAdem VIEW | Automatic Display of Harmonic Frequencies | Bird's Eye View Display | Calculating a Tangent to a Curve | Contour Display in DIAdem VIEW | Creating and Viewing Long Data Channels | Dynamic Display of Statistical Characteristic Values in DIAdem VIEW | Overlaying Objects in Videos | Planetary Motion | Synchronizing Videos and Data | Synchronizing Videos and Waveform Data | User Dialog Box in VIEW for the Calculation of the FFT and Harmonic Frequencies | Using a User Command to Calculate the Difference between the Y-Values | Various Display Modes in DIAdem VIEW | Vibration Data Analysis with Parallel Processing | Viewing and Automatically Analyzing Data