Message 1 of 6

Not applicable
08-12-2018
05:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In FindUsingRay method, how can I access m_FoundEnts items types? My goal is to find the type of each item in the collection so I can't manually cast them (I don't know what they are yet) . please look at the same code in VBA which works.
Call oface.SurfaceBody.FindUsingRay(oVertex.Point, normalVector.AsUnitVector, 0, m_FoundEnts, m_LocPoints, False) If m_FoundEnts.Count <> 2 Then 'do something End If If Not ((TypeOf m_FoundEnts.Item(2) Is Vertex)) Then 'do something else End If
//these don't work
m_FoundEnts[2].Type(); //Type() does not exist for items.
//returns null for objectOfIntrest
ObjectsEnumerator objectOfIntrest = (ObjectsEnumerator)m_FoundEnts[2];
if (objectOfIntrest.Type == ObjectTypeEnum.kVertexObject) {}
Solved! Go to Solution.