DynamoDS / DynamoRevit

Dynamo Libraries for Revit
https://dynamobim.org
338 stars 188 forks source link

Dynamo Crashing upon creating Parameter Type node #2857

Open BotondGazda opened 2 years ago

BotondGazda commented 2 years ago

If this issue is not a bug report or improvement request, please check the Dynamo forum, and start a thread there to discuss your issue.

Dynamo version

Dynamo 2.6.2

Revit version

Revit 2021.1.7

Operating system

Windows 10

What did you do?

Create a Paramter Type node

What did you expect to see?

a Paramter Type node

What did you see instead?

Crash

Could not load type 'Autodesk.Revit.DB.ParameterTypeId' from assembly 'RevitAPI, Version=21.0.0.0, Culture=neutral, PublicKeyToken=null'.

at archilabUI.ParameterTypeUi..ctor() at lambda_method(Closure ) at Dynamo.Wpf.ViewModels.NodeSearchElementViewModel.OnClicked() at Dynamo.UI.Controls.InCanvasSearchControl.ExecuteSearchElement(ListBoxItem listBoxItem) at Dynamo.UI.Controls.InCanvasSearchControl.OnMouseLeftButtonUp(Object sender, MouseButtonEventArgs e) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent) at System.Windows.UIElement.OnPreviewMouseUpThunk(Object sender, MouseButtonEventArgs e) at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target) at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input) at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

Amoursol commented 1 year ago

@BotondGazda this appears to refer to a node from the Archilab package called "ParameterTypeUI" - is this what you were using?

FYI @ksobon

ksobon commented 1 year ago

@Amoursol @BotondGazda That's because Archi-lab package now has versions that are built for each version of revit. That means you want to download a version of the package that supports Revit API 2021. The latest for that is 2022.212.3221. It looks to me that you downloaded one of the newer version for Revit 2023 so they end with "23". For example: 2023.213.1523. If that was the case, revit doesn't support ParameterType anymore in 2023, so it is looking for ParameterTypeId instead, and you are getting an error. Again, please install a version of Archi-lab, that supports your version of revit.