AnsweredAssumed Answered

XYPlot SetScaleConfiguration Error

Question asked by aksnk89 Champion on Jul 26, 2016
Latest reply on Jul 27, 2016 by wpribula

Hi all,

I am getting an error of "Invalid Scale Min argument" when setting the configuration via C# code. Can anybody help me resolving this

 

 

pbMinMaxEnum maxConfig;

 

pbMinMaxEnum minConfig;

 

 

 

Object maxScale = new Object();

 

Object minScale = new Object();

.

.

.

.

 

maxConfig = myXYtags[tagIndex].Max;

 

minConfig = myXYtags[tagIndex].Min;

.

.

if (maxConfig == pbMinMaxEnum.pbScaleAbsolute)
{
    maxScale =  Convert.ToDouble(myXYtags[tagIndex].AbsoluteMax);
}
if (minConfig == pbMinMaxEnum.pbScaleAbsolute)
{
    minScale = Convert.ToDouble(myXYtags[tagIndex].AbsoluteMin);
}
if (maxConfig == pbMinMaxEnum.pbScaleAutorange)
{
    maxScale = Convert.ToString(myXYtags[tagIndex].AutorangeMax);
}
if (minConfig == pbMinMaxEnum.pbScaleAutorange)
{
    minScale = Convert.ToString(myXYtags[tagIndex].AutorangeMin);
}
                                 
.

.

myXYtags[scaleCnt].SetScaleConfiguration(false, minConfig, minScale, maxConfig, maxScale); //Error "Invalid Scal Min Argument

Outcomes