Object: 2DPalette

DIAdem 2018 Help


Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)


DIAdem 2015 Help
DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help
DIAdem 2020 Help

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:

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()

WAS THIS ARTICLE HELPFUL?

Not Helpful