I'm trying to "read" variables from a .psm file (i need to process those variables outside SE). I have no problem reading
the variables but in the "variable" list there are Dimensions. I cant find a way to reach those values.
Can anyone help me?
(using C# as programming language)
Posted by: Kjell-Ake BobergPost date: 2/9/2010 4:47:22 AM
Search in this newsgroup for a thread called "Problems with modify variables"
I did an extensive explanation of this subject (Dim's and Var's) My post was dated 06/08/2009 10:48 AM
Posted by: Julian GuilloPost date: 2/9/2010 6:10:14 AM
Thanks for the suggestion. Here is a C# sample code snippet that works for Dimensions as well as properties
VariableList vl = (SolidEdgeFramework.VariableList)variables.Query("Dimension_to_look_for", Type.Missing, Type.Missing, false
// If any result.....
(vl.Count == 1)
// Get the result in an untyped variable. In this case it can be either a variable or a dimension
variable = vl.Item(1);
// Get the value of the variable by querying "Value" member
object Value = variable.GetType().InvokeMember("Value", BindingFlags.GetProperty, null, variable, null);// Now convert the result to a double and multiply with 1000
// to get a value in mm
Decimal dValue = Convert.ToDecimal(Value) * 1000;Kind Regards
Posted by: Kjell-Ake BobergPost date: 2/10/2010 8:20:31 PM