Your Products have been synced, click here to refresh
Can't see the tiny screenshot btw.
Have you checked you are catching the Type properly?
string ReturnValue="";
Variable tmpVarValue;
pcdPartProgram = pcdSession.ActivePartProgram;
tmpVarValue = pcdPartProgram.GetVariableValue(VarName);
if (tmpVarValue.VariableType == VARIABLE_TYPE_TYPES.VARIABLE_TYPE_STRING)
{
messagebox.show("String")
ReturnValue = tmpVarValue.StringValue;
}
else if (tmpVarValue.VariableType == VARIABLE_TYPE_TYPES.VARIABLE_TYPE_DOUBLE)
messagebox.show("Double")
{
ReturnValue = tmpVarValue.DoubleValue.ToString("F3");
}
else if (tmpVarValue.VariableType == VARIABLE_TYPE_TYPES.VARIABLE_TYPE_LONG)
messagebox.show("Long")
{
ReturnValue = tmpVarValue.LongValue.ToString("F3");
}
Have you tried it at runtime?
Can't see the tiny screenshot btw.
Have you checked you are catching the Type properly?
string ReturnValue="";
Variable tmpVarValue;
pcdPartProgram = pcdSession.ActivePartProgram;
tmpVarValue = pcdPartProgram.GetVariableValue(VarName);
if (tmpVarValue.VariableType == VARIABLE_TYPE_TYPES.VARIABLE_TYPE_STRING)
{
messagebox.show("String")
ReturnValue = tmpVarValue.StringValue;
}
else if (tmpVarValue.VariableType == VARIABLE_TYPE_TYPES.VARIABLE_TYPE_DOUBLE)
messagebox.show("Double")
{
ReturnValue = tmpVarValue.DoubleValue.ToString("F3");
}
else if (tmpVarValue.VariableType == VARIABLE_TYPE_TYPES.VARIABLE_TYPE_LONG)
messagebox.show("Long")
{
ReturnValue = tmpVarValue.LongValue.ToString("F3");
}
Have you tried it at runtime?
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |