11-28-2007 05:30 AM
11-28-2007 09:16 AM
Hi Robert,
Wenn I modify your code ever so slightly to operate on the channels I have in the Data Portal, and then execute the code in DIAdem 10.2, it works perfectly for me:
Call GraphObjNew("2D-Axis","MyGraph")
Call GraphObjOpen("MyGraph")
D2AXISSYSTEM ="one system"
Call GraphObjNew("2D-Curve","MyCurve")
Call GraphObjOpen("MyCurve")
D2CCHNXNAME ="[1]/[1]"
D2CCHNYNAME ="[1]/[2]"
Call GraphObjClose("MyCurve")
Call GraphObjClose("MyGraph")
Call Picupdate()
Of course, it creates a tiny little graph in the upper left hand corner of REPORT, which is probably not exactly what you want, but it is what you're asking DIAdem to do for you with the code. I assume this is not happening for you. What version of DIAdem are you using?
On another note, I'd actually encourage you not to create the 2D-Axis programmatically, but rather to configure its location and appearance by hand and save a *.TDR file, which you can then load with PicLoad() or PicFileAppend(). If you leave off the first line of your code, the rest of it will then programmatically add curves and configure them as you wish.
Brad Turpin
DIAdem Product Support Engineer
National Instruments