Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Variable: ReportObj

DIAdem 2011 Help

Edition Date: July 2011

Part Number: 370859J-01

»View Product Info

Valid names: ReportObj, PicObj

Specifies the names of objects in the current worksheet in DIAdem REPORT.

Definition ReportObj(i), String variable
i = 1 ... ObjectNoMax
Access: Read only
Note  The variable ReportObj replaces the variables TxtObj and GraphObjName.

Example

The following example displays a message box with the index, the name, and the type of the foreground object in the current worksheet in DIAdem REPORT.

Dim StrSheet
Dim StrType
StrSheet = ReportObj(ReportObjLast)
StrType = ReportObjType(ReportObjLast)
Call MsgBoxDisp("Report object no." & ReportObjLast & "— Name: " & StrSheet & "; Type: " & StrType)

The following example demonstrates how you color the axes of all 2D axis systems blue and all black curves yellow.

Dim iObjNo
Dim sObjectName
Dim objName
For iObjNo = 1 To ObjectNoMax         'Loop over all objects in DIAdem REPORT
  sObjectName = ReportObj(iObjNo)     'Gets the object name
  If sObjectName <> "" Then           'Ensures that the object is not deleted
    Select Case ReportObjType(iObjNo) 'Gets the object type
    Case "2D-Axis"
      Call Change2DAxis(sObjectName)  'Calls procedure to change the objects of the 2D axis system
    Case Else
      'Do something else
    End Select
  End If
Next
Call PicUpdate()

' --- Procedure to change object of the 2D axis system ---
Dim iCurveName
Dim sCurveName
Dim iCurveNo
Sub Change2DAxis(sObjectName)          
  Call GraphObjOpen(sObjectName)       'Opens the 2D axis system
    D2AxisColor      = "blue"          'Sets the axis color
    For iCurveNo = 1 To CurveNoMax     'Loop over all curves
      sCurveName= D2CurveObj(iCurveNo) 'Gets the curve name
      If sCurveName <> "" Then         'Ensures that curve is not deleted
        Call GraphObjOpen(sCurveName)  'Opens the curve object
          If D2CurveColor = "black" Then
            D2CurveColor     = "yell." 'Sets the curve color
          End  If
        Call GraphObjClose(sCurveName) 'Closes the curve object
      End If
    Next
  Call GraphObjClose(sObjectName)      'Closes the 2D axis system
End Sub
Note Refer to Accessing Objects in DIAdem REPORT for more information.

Related Topics

Used by


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit