ANSYS version: 2021r2 & 2023r1 mechanical
I'm trying to build an ACT APP extension in mechanical, when I tried to run it below warning shows up.
attribute 'CurrentUnitFromQuantityName' of 'namespace#' object is read-only
MissingMemberException
at IronPython.Runtime.Binding.PythonGetMemberBinder.NamespaceTrackerDelegate.Target(CallSite site, Object self, CodeContext context)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1 arg1)
at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
at Ansys.ACT.Core.Extension.ReadScripts()
Extension NamedSelection_Toolbox loaded for context Mechanical.
Then I tried to modified the code, then I noticed if I just add a line like below, without any operation, the warning still shows up.
DataModel.CurrentUnitFromQuantityName
And it very strange that the same code could be run normally in mechanical scripting without any warning.