|
ExtensionTryGetObjectT Method
|
Attempts to get a PDM object.
Namespace:
CADSharpTools.PDM
Assembly:
CADSharpTools.PDM (in CADSharpTools.PDM.dll) Version: 1.4.16.0 (1.4.16)
Syntax public static MethodReturn<T> TryGetObject<T>(
this IEdmVault5 Vault,
EdmObjectType swPDMType,
int ID = 0
)
where T : class
<ExtensionAttribute>
Public Shared Function TryGetObject(Of T As Class) (
Vault As IEdmVault5,
swPDMType As EdmObjectType,
Optional ID As Integer = 0
) As MethodReturn(Of T)
Parameters
- Vault
- Type: IEdmVault5
Vault object. - swPDMType
- Type: EdmObjectType
PDM type of the object. - ID (Optional)
- Type: SystemInt32
ID of the object.
Type Parameters
- T
- Specified type.
Return Value
Type:
MethodReturnTMethodReturn of the specified PDM object type.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IEdmVault5. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Remarks The TryGetObject method is like the GetObject method, except the TryGetObject method does not throw an exception if the object does not exist.
See Also