areNodesInstances <node1> <node2> it 's return if nodes instance true.
what is equal on c++ or c# ?
Especially i am looking for how can i find instances of node.?
IInstanceMgr::GetInstanceMgr()->GetInstances() -> return instance + reference
but i want only instance.
Thank you.Thank you for your help . Thank you for your help
Solved! Go to Solution.
Solved by denisT.MaxDoctor. Go to Solution.
what are instances? the nodes with the same Object. what are references? the nodes with the same BaseObejct (ReferenceTarget). so true insatneces when Object == Object, true reference when ReferenceTarget == ReferenceTarget && Object != Object
How Find references of any object using c++?
IInstanceMgr::GetInstanceMgr()->GetInstances() this function return instance + reference together.
But i want to get only references of one object.
Thank you for help denisT.MaxDoctor
maybe i'm missing something, but i've answered your question above... well. i see it as:
INodeTab GetNodeReferences(INode *node) { Object *obj = node->GetObjectRef(); INodeTab instances; IInstanceMgr::GetInstanceMgr()->GetInstances(*node, instances); INodeTab references; for (int k=0; k < instances.Count(); k++) { if (obj != instances[k]->GetObjectRef()) references.AppendNode(instances[k]); } return references; }