Notifications
Clear all
[Closed] IINodeTab
Dec 15, 2022 10:28 pm
When I am using c# to develop a plug-in,I found a confusing question.Using Autodesk.Max in 3dsmax 2017,there is a method that
IINodeTab nodetab = g.NodeTab.Create()
but in 3dsmax 2022,there is another method that
IINodeTab nodetab = g.INodeTab.Create()
How can I use a method in both max2017 and max2022
thank you!
4 Replies
Dec 15, 2022 10:28 pm
get the Type using reflection and then invoke the Create method
btw, quite confusing thread name, isn’t it? Hardly useful for anyone who might have same problem as you
1 Reply
it is a maxscript code but in c# it has to be very similar
g = (dotNetClass "Autodesk.Max.GlobalInterface").Instance
t = g.gettype()
node_tab = for p in t.DeclaredProperties where matchpattern p.Name pattern:"*NodeTab*" collect p.Name
print node_tab
prop = t.GetProperty "NodeTab"
NodeTab_create = prop.PropertyType.GetMethod "Create"
NodeTab_create.invoke (prop.getvalue g) (dotNet.ValueToDotNetObject #() (dotNetClass "system.object[]"))