Object: 2DPalette
- Updated2024-09-12
- 2 minute(s) read
(2DBarsHorizontalSettings | 2DBarsSettings | 2DConstantSettings | 2DCoordinateSettings | 2DDifferentialSettings | 2DFilledAreaSettings | 2DLineAndPointsSettings | 2DLineSettings | 2DOutlineBarsHorizontalSettings | 2DOutlineBarsSettings | 2DSpecialCombinationSettings | 2DSpikesHorizontalSettings | 2DSpikesSettings) > Object: 2DPalette
Object: 2DPalette
The 2DPalette object provides the properties of the palette in 2D axis systems or in polar axis systems in DIAdem REPORT.
The following example generates a 2D axis system with a curve, assigns the color Palette to the curve, and defines the properties of the palette:
| VBScript | Python |
Dim oMyReportObj, oMyPos, oMyCurve, oMyShape, oMyLine, oMyPalette, oMyPaletteLine Dim iChannelMax, iChannelMin ,i Call Report.NewLayout() Set oMyReportObj = Report.ActiveSheet.Objects.Add(eReportObject2DAxisSystem, "My2DAxisSystem") Set oMyPos = oMyReportObj.Position.ByCoordinate oMyPos.X1 = 20 oMyPos.X2 = 80 oMyPos.Y1 = 20 oMyPos.Y2 = 80 Set oMyCurve = oMyReportObj.Curves2D.Add(e2DShapeLine, "MyCurve") Set oMyShape = oMyCurve.Shape oMyShape.XChannel.Reference = "[1]/[1]" oMyShape.YChannel.Reference = "[1]/[2]" iChannelMax = Data.Root.ChannelGroups(1).Channels(2).Properties("maximum").Value iChannelMin = Data.Root.ChannelGroups(1).Channels(2).Properties("minimum").Value Set oMyLine = oMyShape.Settings.Line oMyLine.Color.ColorIndex = eColorIndexPalette Set oMyPalette = oMyShape.Settings.Palette.Lines i = 0 For Each oMyPaletteLine in oMyPalette i = i + 1 oMyPaletteLine.LineType = eLineTypeDashDot oMyPaletteLine.Interval = 10 oMyPaletteLine.Width = eLineWidth0035 oMyPaletteLine.UpperLimit = iChannelMin + (iChannelMax - iChannelMin) / oMyPalette.Count * i Next Call Report.Refresh()
Properties
BeginValue | Channel | EndValue | Lines | ValueType
Returned From
2DBarsHorizontalSettings.Palette | 2DBarsSettings.Palette | 2DConstantSettings.Palette | 2DCoordinateSettings.Palette | 2DDifferentialSettings.Palette | 2DFilledAreaSettings.Palette | 2DLineAndPointsSettings.Palette | 2DLineSettings.Palette | 2DOutlineBarsHorizontalSettings.Palette | 2DOutlineBarsSettings.Palette | 2DSpecialCombinationSettings.Palette | 2DSpikesHorizontalSettings.Palette | 2DSpikesSettings.Palette