ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to access individual Contour Line in Characteristic Diagram from a script?

Solved!
Go to solution

I have a Characteristic Diagram with Isolines defined from a Channel. With this, the Contour Table is automatically populated with values corresponding to the Channel. However when I make the following command it returns 1:

 

Report.Sheets("Compressor Map").Objects("3DAxis1").Curves3D.Item(1).Shape.Settings.IsoValueTable.Count

When I look into the settings of the Characteristic Diagram, however, there are clearly several contour lines in the Contour Table.

 

What am I misunderstanding here?

0 Kudos
Message 1 of 4
(2,718 Views)

Capture.JPG

Select this option and make sure your contour table has a bunch of values.  Then you can try your script or this one I used from the examples to display the number of isolines in all your report objects:

Option Explicit  'Forces the explicit declaration of all the variables in a script.

Dim oMyReportObj, oMyReportObjects, oMyCurves, oMyCurve
Set oMyReportObjects = Report.ActiveSheet.Objects
For Each oMyReportObj in oMyReportObjects
  If oMyReportObj.ObjectType = eReportObject3DAxisSystem Then
    Set oMyCurves = oMyReportObj.Curves3D
    For Each oMyCurve in oMyCurves
      If oMyCurve.ShapeType = e3DShapeCharacteristicDiagram Then
        Call MsgBoxDisp("Number of isolines: " & oMyCurve.Shape.Settings.IsoValueTable.Count)
      End If
    Next
  End If
Next
0 Kudos
Message 2 of 4
(2,655 Views)

So if you use "From Channel" instead, it isn't possible to get the contour lines from within a script? Ultimately I'm trying to just get a list of the contour lines from my script so that I can change the colors of specific contours. But when I select IsoValueTable they don't show up if I'm loading the contours from a Channel.

 

If I select "From Contour Table" and manually write in the contours from the channel via a script it works fine and I can then access them. But why wouldn't they be accessible if they're automatically loaded from a channel?

0 Kudos
Message 3 of 4
(2,645 Views)
Solution
Accepted by topic author ShaneDuffy

After looking into it, it looks like DiAdem does not have the ability to set individual settings for each contour line. Settings must be applied across all of them. How unfortunate.

0 Kudos
Message 4 of 4
(2,621 Views)