DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to do I add only one or two cordinate markers on graph in script

Hi

How do I add one or two cordinate marks on a graph from script if there is an limit error.

If there isn´t any limit error then I don´t want to add cordinate markers on graph.

 

Regards

René

0 Kudos
Message 1 of 4
(3,333 Views)

Hi there,

 

 

Do you mean using something like this?

 

https://decibel.ni.com/content/docs/DOC-3994

 

-Michael

0 Kudos
Message 2 of 4
(3,301 Views)

Hi

 

Yes and then with one or more markers/coordinates  on.

There isn´t any markers/coordinates on

If could be difference from graph to graph in our system.

 

Regards

René

0 Kudos
Message 3 of 4
(3,289 Views)

The following below do the trick 🙂

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

Dim oMy2DAxisSystem, oMyCurveLine, oMyCurveConst, oMyPos, oMySettings,oMyCoordShape

Report.NewLayout

Set oMy2DAxisSystem = Report.ActiveSheet.Objects.Add(eReportObject2DAxisSystem, "My2DAxisSystem")

Set oMyPos = oMy2DAxisSystem.Position.ByCoordinate

'oMyPos.X1 = 20

'oMyPos.X2 = 80

'oMyPos.Y1 = 20

'oMyPos.Y2 = 80

 

Set oMyCurveLine = oMy2DAxisSystem.Curves2D.Add(e2DShapeLine, "MyCurve")

oMyCurveLine.Shape.XChannel.Reference = "[1]/[1]"

oMyCurveLine.Shape.YChannel.Reference = "[1]/[2]"

 

'Set oMyCurveConst = oMy2DAxisSystem.Curves2D.Add(e2DShapeConstant, "MyConstant")

Set oMyCurveConst = oMy2DAxisSystem.Curves2D.Add(e2DShapeCoordinate, "My2DCurveCoord")

oMyCurveConst.Shape.Settings.Type= eMarkerSquare

oMyCurveConst.Shape.XCoordinate.Reference=10

oMyCurveConst.Shape.YCoordinate.Reference=20

 

'oMyCurveConst.Shape.XConstant.Reference = 10

'oMyCurveConst.Shape.YConstant.Reference = 20

 

'Set oMyCurveConst = oMy2DAxisSystem.Curves2D.Add(e2DShapeConstant, "MyConstant2")

Set oMyCurveConst = oMy2DAxisSystem.Curves2D.Add(e2DShapeCoordinate, "My2DCurveCoord2")

oMyCurveConst.Shape.Settings.Type= eMarkerSquare

oMyCurveConst.Shape.XCoordinate.Reference=30

oMyCurveConst.Shape.YCoordinate.Reference=40

'oMyCurveConst.Shape.XConstant.Reference = 30

'oMyCurveConst.Shape.YConstant.Reference = 40

 

'set oMySettings = oMyCurveConst.Shape.Settings

'Call oMySettings.Line.Color.SetPredefinedColor(eColorIndexBlue)

'oMySettings.Line.Width = eLineWidth0100

 

0 Kudos
Message 4 of 4
(3,283 Views)