03-04-2006 08:04 AM
03-06-2006 02:42 AM
Hi Aled
How to modify or create an axis system is described in several articles of this forum, e.g. http://forums.ni.com/ni/board/message?board.id=60&message.id=3802#M3802
You ask how to modify it using ole. I attached a simple script that you can use as a base for you task. (For DIAdem 9.1)
Instead of using a reference to a channel with the syntax "[1]/[1]" you can use the names of the channels e.g. "[1]/Time" or "Example/Time"
Hope this helps.
Winfried
03-06-2006 07:43 AM
Thanks winner,
I managed to get it all working, though it was not so straightforward as I was coding with Borland c++Builder.
Just for the record:
MyToCommand->TextVarSet(TOleString("D2ChnX"),Variant("[1]/[1]"));
MyToCommand->TextVarSet(TOleString("D2ChnY"),Variant("[1]/[2]"));
Produced an error message "incompatible types in assignment" in diadem, (TOleString is a class provided by Borland that takes a char* - necessary for compilation where a BSTR input is required)
So next I tried:
MyToCommand->TextVarSet(TOleString("D2ChnXName"),Variant("[1]/Alpha"));
MyToCommand->TextVarSet(TOleString("D2ChnYName"),Variant("[1]/CL"));
This added a curve to the plot but no data were plotted, the channel names assigned to the curve were "[1]/Alpha" instead of "Alpha" etc., so I guessed
MyToCommand->TextVarSet(TOleString("D2ChnXName"),Variant("Alpha"));
MyToCommand->TextVarSet(TOleString("D2ChnYName"),Variant("CL"));
And that worked fine
Thanks again
Aled