Object: CustomScalingAxisSystem3DContext

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

The CustomScalingAxisSystem3DContext object provides information about the worksheet, the axis system, and the ID for a user-defined axis scaling in a 3D axis system in DIAdem REPORT.

Note   To test the following example scripts, first save the bottom script and select Settings»Extensions»User Commands to register it as a user command.

The following example creates a 3D axis system with a curve and assigns the user-defined axis scaling with the ID MotorWarmScaling to the y-axis:

Dim oMy3DAxisSystem, oMyPos, oMy3DCurve, oMyCustomScalings, oMyCustomScalingObj, oMyYScaling
Call Report.NewLayout()
Call Data.Root.Clear()
Call DataFileLoad(DataReadPath & "Report_Data.tdm","TDM","")
'Creating Axis System and Curve
Set oMy3DAxisSystem = Report.ActiveSheet.Objects.Add(eReportObject3DAxisSystem, "My3DAxisSystem")
Set oMyPos = oMy3DAxisSystem.Position.ByCoordinate
oMyPos.X1 = 20
oMyPos.X2 = 80
oMyPos.Y1 = 20
oMyPos.Y2 = 80
Set oMy3DCurve = oMy3DaxisSystem.Curves3D.Add(e3DShapeSurface, "My3DDCurve")
oMy3DCurve.Shape.XChannel.Reference = "[2]/[1]"
oMy3DCurve.Shape.YChannel.Reference = "[2]/[2]" 
oMy3DCurve.Shape.ZChannel.Reference = "[2]/[3]"
'Creating Custom Scaling
Set oMyCustomScalings = Report.Settings.CustomScaling.AxisSystem3DList
Call oMyCustomScalings.RemoveAll()
Set oMyCustomScalingObj = oMyCustomScalings.Add("MotorWarmScaling")
oMyCustomScalingObj.BaseScalingType = eAxisAutoScalingCompleteAutomatic
oMyCustomScalingObj.EventName = "MyCustomScalingEvent3D"
oMyCustomScalingObj.Label = "LabelForMotorWarmScaling"
'Assigning Custom Scaling to Axis
Set oMyYScaling = oMy3DAxisSystem.AxisList.Y.Scaling
oMyYScaling.AutoScalingType = eAxisScalingSimpleCustom
oMyYScaling.CustomScalingID = "MotorWarmScaling"
Call Report.Refresh()

The user command calculates the values for the axis scaling. The user command receives a parameter. This parameter is a CustomScalingAxisSystem3DContext object and provides information about the axis system and about the ID of the user-defined axis scaling.

Sub MyCustomScalingEvent3D(Context)
  Dim oMyAxisSystem, oMyAxis, MinMax
  Set oMyAxisSystem = Context.AxisSystem
  Select Case Context.AxisType
  Case e3DAxisTypeX
    Set oMyAxis = oMyAxisSystem.AxisList.X
  Case e3DAxisTypeY
    Set oMyAxis = oMyAxisSystem.AxisList.Y
  Case e3DAxisTypeZ
    Set oMyAxis = oMyAxisSystem.AxisList.Z
  Case Else
    Exit Sub
  End Select
  MinMax = ValMax(Abs(oMyAxis.Scaling.End),Abs(oMyAxis.Scaling.Begin))
  oMyAxis.Scaling.Origin = oMyAxis.Scaling.Begin
  oMyAxis.Scaling.Begin = -MinMax
  oMyAxis.Scaling.End = +MinMax
End Sub

WAS THIS ARTICLE HELPFUL?

Not Helpful