Getting type of item in variable table

I came across a post (...4967-extract-informations-from-variable-table-using-api.html#5055) in which the fact that items in the variable table may be either variables or dimensions was discussed.


Is there a way to extract the type of an item in the variable list?


The motivation for this would be to assist in extracting the value of the variable or dimension. In the same post, it is suggested that the syntax (method name) used to get the value is different for dimensions (.Value) and variables (.GetValue).


I'd like to be able to read the value of either variable or dimensions deterministically; it seems like I may need to get the type in order to do this.


Alternatively, am I able to pass an argument to the .Query method which selects either variables or dimensions (I assume the "*" argument is non-selective in the context: objVariableList = objVariables.Query("*"))


Any comments or suggestions are greatly appreciated.






Posted by: Chris L'Esperance
Post date: 10/28/2012 9:17:20 PM


Getting type of item in variable table

You can get the type of the item with:

If TypeOf objItem Is SolidEdgeFrameworkSupport.Dimension Then




end if


Posted by: JR
Post date: 10/29/2012 8:18:22 AM

Getting type of item in variable table

Thank's JR.


In fact, I need a way to determine the type of element in the variableList (C++).

In an assembly I have the distance parameter for a reference plane. It appears in the variableList, but it seems neither to be a dimension nor a variable.

I need to access it (reading and writing the value).


Thank you,



Posted by: Bodo Quaschnowitz
Post date: 1/11/2013 1:19:38 AM