Method: ConvertPolarCoordinateToPageXPosition for PolarSystem

DIAdem 2018 Help

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

DOWNLOAD (Windows Only)

DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help
DIAdem 2020 Help
DIAdem 2020 SP1 Help

Converts in a polar axis system in DIAdem REPORT an angle and a radius into an x-page coordinate.

iConvertPolarCoordinateToPageXPosition = Object.ConvertPolarCoordinateToPageXPosition(Angle, Length)
Object with this method
Contains the angle.
Contains the radius.
Receives the converted x-page coordinate.

The following example generates a polar axis system with a curve and adds an arrow, which points to the curve maximum, to the current worksheet.

Dim oMyPolarSystem, oMyPos, oMyPolarCurve, oMyArrow, oMyChnGroupChannels, oMyArrowPosition, MaxValLength, MaxValAngle
Call Report.NewLayout()
Call Data.Root.Clear()
Call DataFileLoad(DataReadPath & "Report_Data.tdm","TDM","")

Set oMyPolarSystem = Report.ActiveSheet.Objects.Add(eReportObjectPolarSystem, "MyPolarSystem")
Set oMyPos = oMyPolarSystem.Position.ByCoordinate
oMyPos.X1 = 20
oMyPos.X2 = 80
oMyPos.Y1 = 20
oMyPos.Y2 = 80

Set oMyPolarCurve = oMyPolarSystem.CurvesPolar.Add(ePolarShapeLine, "MyPolarCurve")
oMyPolarCurve.Shape.XChannel.Reference = "[5]/[1]"
oMyPolarCurve.Shape.YChannel.Reference = "[5]/[4]"

Call Report.Refresh
Set oMyArrow = Report.ActiveSheet.Objects.Add(eReportObjectArrow, "MyArrow")
Set oMyArrowPosition = oMyArrow.Position.ByCoordinate
Set oMyChnGroupChannels = Data.Root.ChannelGroups(5).Channels
MaxValLength = oMyChnGroupChannels(4).Properties("maximum").Value
MaxValAngle  = oMyChnGroupChannels(1).Values(PNo("[5]/[4]", MaxValLength))
oMyArrowPosition.X1 = oMyPolarSystem.ConvertPolarCoordinateToPageXPosition (MaxValAngle, MaxValLength) + 10
oMyArrowPosition.Y1 = oMyPolarSystem.ConvertPolarCoordinateToPageYPosition (MaxValAngle, MaxValLength) + 10
oMyArrowPosition.X2 = oMyPolarSystem.ConvertPolarCoordinateToPageXPosition (MaxValAngle, MaxValLength)
oMyArrowPosition.Y2 = oMyPolarSystem.ConvertPolarCoordinateToPageYPosition (MaxValAngle, MaxValLength)
Call Report.Refresh()

See Also

Objects Overview


Not Helpful