[Closed] dotNetObject:Autodesk.Max.Wrappers.Interface Error
Does any of you know whay this code:
(
globalInstance = (dotNetClass "Autodesk.Max.GlobalInterface").instance
oldSnapAngle = globalInstance.coreinterface7.SnapAngle_ as float
format "Old Snap Angle: % \n" oldSnapAngle
globalInstance.coreinterface7.SnapAngle_ = 3.5
)
gives this error:
-- Error occurred in anonymous codeblock; filename: C:\Users\MMM\Desktop\GetSnapAngle_01.ms; position: 2; line: 1
-- MAXScript FileIn Exception:
-- Unknown property: "SnapAngle_" in dotNetObject:Autodesk.Max.Wrappers.Interface
-- MAXScript callstack:
-- thread data: threadID:17672
-- ------------------------------------------------------
-- [stack level: 0]
-- In anonymous codeblock; filename: C:\Users\MMM\Desktop\GetSnapAngle_01.ms; position: 143; line: 3
-- Locals:
-- globalInstance: dotNetObject:Autodesk.Max.__Global
-- oldSnapAngle: undefined
-- Externals:
-- ------------------------------------------------------
-- [stack level: 1]
-- called from top-level
3ds Max 2020.2
globalInstance = (dotNetClass "Autodesk.Max.GlobalInterface").instance
globalInstance.coreinterface7.SnapAngle_
sounds like “SnapAngle_” is not a property any more in your version of max
I also don’t get any error in max 2020.2 but this error occurs on another person’s PC and his max 2020.2.
Is there any chance third party tool to “override” the “SnapAngle_”?
no. but in code there might be mistake. your client has to show you whole error log.
This is the whole error log. Nothing else is printed in the maxscript listener.
what is this line?
ask him/her to go to the listener and execute the line:
(dotNetClass "Autodesk.Max.GlobalInterface").instance.coreinterface7.SnapAngle_
it will show the issue
This is the code that I posted inmy first post but saved in a ms file, which I sent to him. Since he run 3ds Max as administrator I suppose that he ran the code by Scripting – Run Script.
I suppose that this should show if he have SnapAngle_ or not?
(
globalInstance = (dotNetClass “Autodesk.Max.GlobalInterface”).instance
show globalInstance.coreinterface7
)