Receive Object Type

[ Edited ]


In SE ST3/4, How can I get a type of an object (as "ObjectType") from a regular .NET object?

Thank you




Posted by: Slava Z
Post date: 7/11/2012 2:00:11 AM


Re: Receive Object Type

[ Edited ]

Hi Slava,


The .NET type system and the ObjectType enumeration in the Solid Edge API are different. From .NET's perspective, all of the Solid Edge types are wrappers around COM objects. Those objects expose a Type method that returns a value matching in the ObjectType enum. That enum does not include native .NET objects, as .NET already supports type identification for those types (including user-defined types that Solid Edge doesn't know about).


The typeof (C#) and GetType (VB .NET) methods allow you to query .NET object types and get things like names, members, etc. So you should be able to identify types of .NET objects on the fly that way. Every Solid Edge type will show up as System.__ComObject.


Hope this helps,



Posted by: Jay Carlton
Post date: 7/12/2012 9:29:44 AM