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
(6,562 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
(6,547 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
(6,538 Views)

That worked !

Thank you very much 🙂

0 Kudos
Message 4 of 15
(6,533 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
(6,529 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
(6,525 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
(6,517 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
(6,513 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
(6,509 Views)

The REPORT object was first released in DIAdem 2012.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 10 of 15
(6,495 Views)