DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

YAxisList: catastrophic failure

Hi

 

As soon as I tried to add another Y-Axis to my diagrams I got a catastrophic failure. After trial & error I could figure out that it only happened when I accessed the primary "YAxis" object before. Here is a minimum example to reproduce this error. It is taken from the HELP-pages, just added one line. !!! Attention: DIAdem needs to be restarted thereafter !!!

 

Dim oMy2DaxisSystem, oMyPosition, oMy2DCurve1, oMy2DCurve2, oMyAxis
Call Data.Root.Clear()
Call DataFileLoad("C:\Program Files (x86)\National Instruments\DIAdem 2012\Examples\Data\" & "Example_data.tdm","TDM","")
Call Report.NewLayout()
Set oMy2DaxisSystem = Report.ActiveSheet.Objects.Add(eReportObject2DAxisSystem,"My2DAxisSystem")
Set oMyPosition = oMy2DAxisSystem.Position.ByCoordinate
oMyPosition.X1 = 20
oMyPosition.Y1 = 20
oMyPosition.X2 = 80
oMyPosition.Y2 = 80

'--- added line starts
Call oMy2DaxisSystem.YAxis.Label.Font.Color.SetPredefinedColor(ePredefinedColorBlack)
'--- added line ends

Set oMy2DCurve1 = oMy2DaxisSystem.Curves2D.Add(e2DShapeLine, "MyFirstCurve")
oMy2DCurve1.Shape.XChannel.Reference = "[1]/[1]"
oMy2DCurve1.Shape.YChannel.Reference = "[1]/[2]"
Set oMy2DCurve2 = oMy2DaxisSystem.Curves2D.Add(e2DShapeLine, "MySecondCurve")
oMy2DCurve2.Shape.XChannel.Reference = "[1]/[1]"
oMy2DCurve2.Shape.YChannel.Reference = "[1]/[3]"
Set oMyAxis = oMy2DaxisSystem.YAxisList.Add("SecondAxis")
oMy2DCurve2.YAxisReference = "SecondAxis"
Call Report.Refresh()

 Can anyone explain why that happens and how it could be solved? 

 

Thanks.

Phex

0 Kudos
Message 1 of 4
(5,225 Views)

Hi Phex,

 

Which exact DIAdem version do you use?

I checked your script with "12.0.1f5436 Service Pack 1b" and it worked fine.

If you don't have the latest SP you can download it from ni.com. If you search for "diadem 2012 sp1b" you get a list for the different languages.

 

Greetings

Walter

0 Kudos
Message 2 of 4
(5,221 Views)

I am using 12.0.0f4911 right now.

Will try to update my version in due time and test again or maybe wait for the 2014 release which is hopefully coming soon.

Phex

0 Kudos
Message 3 of 4
(5,214 Views)

DIAdem 2014 is planed for August 2014. So installing now the SP could make sense.

 

Greetings

Walter

0 Kudos
Message 4 of 4
(5,212 Views)