ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Plot

Solved!
Go to solution

Hi everyone,

 

I am currently working with DIAdem and I would have some newbie questions.

 

Call PicLoad("Template")   
Call GraphObjNew("2D-Axis","2DAxis1") 
Call GraphObjOpen("2DAxis1")   
  Call  GraphObjNew("2D-Curve","New_Curve") 'Creates a new curve
  Call GraphObjOpen("New_Curve")            'Opens the curve object
  D2CChnYName      = "GroupName/ChannelName"
  Call GraphObjClose("New_Curve")
  
D2AXISTOP        = 9
D2AXISBOTTOM     = 40
D2AXISLEFT       = 15
D2AXISRIGHT      = 40



Call GraphObjClose("2DAxis1")  
Call PicUpdate

 When I copy paste this twice and change the Channel Name, the previous plot is erased by the new plot. Would you know how to fix this?

Also I was wondering how to change the marker. By mouse it is possible to select the cross marker but I do not know how to do it by script. The only thing I know is that I should put "cross" somewhere, but have no idea of the right command.

0 Kudos
Message 1 of 15
(7,834 Views)

Bump.

I am not interested in placing the second plot next to the first one, but in placing the second courb in the first plot, with the first courb.

I hope someone will help me out !

0 Kudos
Message 2 of 15
(7,819 Views)
Solution
Accepted by topic author Near3
Call PicLoad("Template")   
Call GraphObjNew("2D-Axis","2DAxis1") 
Call GraphObjOpen("2DAxis1")   
  Call  GraphObjNew("2D-Curve","New_Curve") 'Creates a new curve
  Call GraphObjOpen("New_Curve")            'Opens the curve object
  D2CChnYName      = "GroupName/ChannelName"
  Call GraphObjClose("New_Curve")
  Call  GraphObjNew("2D-Curve","New_Curve2") 'Creates a new curve
  Call GraphObjOpen("New_Curve2")            'Opens the curve object
  D2CChnYName      = "GroupName/ChannelName2"
  Call GraphObjClose("New_Curve2")
D2AXISTOP        = 9
D2AXISBOTTOM     = 40
D2AXISLEFT       = 15
D2AXISRIGHT      = 40



Call GraphObjClose("2DAxis1")  
Call PicUpdate

Can you try this?

 

Basically you just want to have a new Curve and not reload the whole template (PicLoad("Template")) or change an Axis (the part with the axis ;)), so you wouldn't want to repeat that code.

 

4th of July is generally a slow response day on the forum..

I wonder why... 😉

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 3 of 15
(7,810 Views)

That worked !

Thank you very much 🙂

0 Kudos
Message 4 of 15
(7,805 Views)

No problems!

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 5 of 15
(7,801 Views)

Oh actually we forgot my second question about the marker. Would you know what command allows to use different markers?

0 Kudos
Message 6 of 15
(7,797 Views)

Actually, that's my mistake.

 

I focused on the second post 🙂

 

Here an adapted version:

Call PicLoad("Template")   
Call GraphObjNew("2D-Axis","2DAxis1") 
Call GraphObjOpen("2DAxis1")   
  Call  GraphObjNew("2D-Curve","New_Curve") 'Creates a new curve
  Call GraphObjOpen("New_Curve")            'Opens the curve object
  D2CChnYName      = "GroupName/ChannelName"
  Call GraphObjClose("New_Curve")
  
D2AXISTOP        = 9
D2AXISBOTTOM     = 40
D2AXISLEFT       = 15
D2AXISRIGHT      = 40

Call GraphObjClose("2DAxis1")  

Dim o2DLineExtensions, o2DAdditionalMarker
Set o2DLineExtensions = Report.ActiveSheet.Objects.Item("2DAxis1").Curves2D.Item("New_Curve").Shape.Extensions
Set o2DAdditionalMarker = o2DLineExtensions.Marker
o2DAdditionalMarker.Type        = eMarkerCross

Call PicUpdate

 

Are you familiar with script recording?

If not, here's the information about it:

http://digital.ni.com/public.nsf/allkb/B769AE10EDB656D28625692D00583166?OpenDocument

 

It can help alot when starting to write scripts.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 7 of 15
(7,789 Views)

Thank you for your rapidity.

 

If I copy paste what you wrote, DIAdem tells me that : Variable is undefined : 'Report'

I tried to use the script recording as you advised me, and manually removed the line then put the cross markers, but nothing has been written between the moment I started it and the moment I stopped it. It sadly seems that what's going on in the report section is not always taken into account by the script recording 😞

 

0 Kudos
Message 8 of 15
(7,785 Views)

Hello,

 

Did you read through the CTRL-A remarks?

Hmm, the Report should automatically refer to your Report class.

 

Which version of DIAdem are you using?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 9 of 15
(7,781 Views)

The REPORT object was first released in DIAdem 2012.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 10 of 15
(7,767 Views)