Method: Add for Constants
- Updated2024-09-12
- 2 minute(s) read
DIAdem VIEW > Methods > Method: Add for Constants
Method: Add for Constants
Adds an object to the Constants collection and returns a Constant object in the script interface of DIAdem VIEW.
Set oConstant = Object.Add(ValueExpression, Direction)
| Object | Constants Object with this method | ||||
| ValueExpression | String Specifies the value of the constants. | ||||
| Direction | LongInteger Specifies whether DIAdem displays the constants parallel to the x-axis or to the y-axis:
| ||||
| oConstant | Constant Returned object |
The following example creates a 2D axis system with one curve and one constant in the active area:
| VBScript | Python |
Dim oMyChart, oMyConstX View.ActiveSheet.ActiveArea.DisplayObjType = "CurveChart2D" Set oMyChart = View.ActiveSheet.ActiveArea.DisplayObj Call oMyChart.Curves2D.Add("[1]/[1]","[1]/[2]") Set oMyConstX = oMyChart.Constants.Add("30",0) oMyConstX.Color = "red"
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