Alvin.Zheng
02-04-2010, 04:34 PM
Who know how to translate below VB code to .Net in V2009.1
Dim oMkrCache As IJDEnumMoniker
Set oMkrCache = m_oConnCache.ConnectionCache
Dim oObj As Object
Dim vCacheObject As Variant, mkr As IMoniker
Dim i As Long, j As Long
Dim step As Long
step = 1
j = 0
For Each vCacheObject In oMkrCache
Set mkr = vCacheObject
Set oObj = Nothing
On Error Resume Next ' If session file contains objects not bindable now, i.e. deleted objects.
Set oObj = m_oConn.GetObject(mkr)
On Error GoTo 0
If Not (oObj Is Nothing) Then
If TypeOf oObj Is IJIfcEntity Then
I try to get specify objects from current filter that was defined by user when he work in SP3D any task.
Dim oMkrCache As IJDEnumMoniker
Set oMkrCache = m_oConnCache.ConnectionCache
Dim oObj As Object
Dim vCacheObject As Variant, mkr As IMoniker
Dim i As Long, j As Long
Dim step As Long
step = 1
j = 0
For Each vCacheObject In oMkrCache
Set mkr = vCacheObject
Set oObj = Nothing
On Error Resume Next ' If session file contains objects not bindable now, i.e. deleted objects.
Set oObj = m_oConn.GetObject(mkr)
On Error GoTo 0
If Not (oObj Is Nothing) Then
If TypeOf oObj Is IJIfcEntity Then
I try to get specify objects from current filter that was defined by user when he work in SP3D any task.