You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception : Microsoft.Scripting.ArgumentTypeException: expected UnitType, got ForgeTypeId
at Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run5[T0,T1,T2,T3,T4,TRet](T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
at System.Dynamic.UpdateDelegates.UpdateAndExecute4[T0,T1,T2,T3,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at Microsoft.Scripting.Interpreter.DynamicInstruction`5.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 Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)
at Microsoft.Scripting.Hosting.ScriptSource.ExecuteAndWrap(ScriptScope scope, ObjectHandle& exception)
Expected behavior
RevitPythonShell should execute SetFormatOptions(ForgeTypeId, FormatOptions) and set the specified unit.
Screenshots
Desktop (please complete the following information):
OS: Windows 10
Revit version 2021.1.7
RevitPythonShell version 2021.0.0.0
Additional context
The tooltip indicates that both SetFormatOptions(UnitType, FormatOptions) and SetFormatOptions(ForgeTypeId, FormatOptions) are available.
Describe the bug
DB.Units.SetFormatOptions() expects
UnitType
, but should also expectForgeTypeId
To Reproduce
Output:
Expected behavior
RevitPythonShell should execute
SetFormatOptions(ForgeTypeId, FormatOptions)
and set the specified unit.Screenshots
Desktop (please complete the following information):
Additional context
The tooltip indicates that both
SetFormatOptions(UnitType, FormatOptions)
andSetFormatOptions(ForgeTypeId, FormatOptions)
are available.SetFormatOptions API documentation
The text was updated successfully, but these errors were encountered: