Value of a Param

Top  Previous  Next

Though it is odd you may have to cast a Parameter Param.Value to get hold of its double value. look at the last line of this:

 

 

        if (eParamType == ParamType_e.ekModel)

        {

            ModelParameters ModelParams = PartDef.Parameters.ModelParameters;

            ModelParameter ThisParam = ModelParams[sParamName];

            Param = (Parameter)ThisParam;

        }

        else if (eParamType == ParamType_e.ekUser)

        {

            UserParameters ModelParams = PartDef.Parameters.UserParameters;

            UserParameter ThisParam = ModelParams[sParamName];

            Param = (Parameter)ThisParam;

        }

 

        return (double)Param.Value * 10.0;

 

 

 

 

Text, images and diagrams © 2021 Owen F. Ransen. All rights reserved. (But copy the source code as much as you want!)