DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Trouble displaying X-axis constant line

In a graph template I want to insert an x-axis constant line at the minimum measured value on the y-axis.  I have succeeded in printing the numeric x value in text on the graph by using the formula: 

 

str(ChD( find (“Vacuum_Smooth” -CMin(cno(“Vacuum_Smooth”))<0.001), 'Time1”)

 

However, this formula does not work when I insert it into the VBS code of an autosequence.

 

      D2CCONSTX        =str(ChD( find (“Vacuum_Smooth”) -CMin(cno(“Vacuum_Smooth”))<0.001), (“Time1”)

 

As written, I get the error message:

 

CHD(“FALSE”)”,” for the second index or parameter expected!

 

How can I accomplish this task in the autosequence  VBS code?

0 Kudos
Message 1 of 2
(3,015 Views)
Hello!

I was a little bit confused after reading your code. So I tried to solve the task from scratch. I hope this will help.

My solution to print the Time1 value at the Vacuum_Smooth minimum is:
str(ChD( find("Vacuum_Smooth = CMin(Vacuum_Smooth)"), "Time1"))
For D2CCONSTX you have to set a expression wich will deliver a double value. No str() is required! This expression must be encapsulated in @@ to show DIAdem that it is not a value string. The code line must look like this:
D2CCONSTXNAME = "@@ChD( find(""Vacuum_Smooth = CMin(Vacuum_Smooth)"" ), ""Time1"" )@@"
As you can see the " in the first code example are replaced by "" because it has to be a " after VBS had evaluated the string. If you put the value string in D2CCONSTX you have to update the layout on every change.

Matthias

Message Edited by Twigeater on 06-21-2006 10:51 PM

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 2
(3,008 Views)