Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get InstanceMgr using C#

1 REPLY 1
Reply
Message 1 of 2
lazimdirlo
468 Views, 1 Reply

Get InstanceMgr using C#

How can write in c# 

 

This is c++ ;

 

INodeTab instanceAndRef;
IInstanceMgr::GetInstanceMgr()->GetInstances(node, instanceAndRef);

1 REPLY 1
Message 2 of 2
jeje_latteux
in reply to: lazimdirlo

I would say something like this, but the structure of the SDK wrapper is so strange, I'm always confused.

 

Autodesk.Max.IGlobal _global = Autodesk.Max.GlobalInterface.Instance;
Autodesk.Max.IIInstanceMgr _instanceManager = _global.IInstanceMgr.InstanceMgr;
Autodesk.Max.IINodeTab instancesHolder = _global.NodeTab.Create();
_instanceManager.GetInstances(_node, instancesHolder);

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report