Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BHoM Dynamo Nodes #1167

Closed
leosteele opened this issue Jan 26, 2022 · 7 comments
Closed

BHoM Dynamo Nodes #1167

leosteele opened this issue Jan 26, 2022 · 7 comments
Labels
type:question Ask for further details or start conversation

Comments

@leosteele
Copy link

Installing the BHoM installer creates an Add-in in the Revit Ribbon. However, when Dynamo is opened there is no BHoM add-in or nodes. There is no information in the wiki or previous issues I could find (minus on issues from 4/2021 that had no reply) that was this same issue. Can you explain the steps if the installer doesn't add the package to Dynamo?

@leosteele leosteele added the type:question Ask for further details or start conversation label Jan 26, 2022
@FraserGreenroyd
Copy link
Contributor

Hi @leosteele , sorry to hear you're having this issue. Can I check, does any of the discussion on this topic relate or seem linked? In particular, this comment provides certain folders to check for information.

If that topic is not related, just to help us narrow down the issue, could you confirm which version of Revit and/or Dynamo you're attempting to use the BHoM with, and which version of BHoM (I'm presuming 5.0b, but best to confirm to be sure!) 😄

@leosteele
Copy link
Author

@FraserGreenroyd Yes! That comment is actually very close. When I look in the Dynamo package location, there is no BHoM folder. I did try copying the whole Assemblies folder from C:/ProgramData/BHoM to my Dynamo package location. Some nodes show up at that point, but there is no adapter node to setup BHoM.

I did find this comment which seems very close to what I am experiencing: BHoM Dynamo (dll or via Package Manager Download)

Though in your linked comment, you note that BHoM doesn't work with Revit 2022 or Dynamo 2.5+. I am using Revit 2022 and Dynamo 2.12 but the add-in is also not installed on any previous versions of Revit/Dynamo.

@FraserGreenroyd
Copy link
Contributor

@pawelbaran looping you in - time to get the sleuthing hat out again!

@leosteele
Copy link
Author

@FraserGreenroyd After some digging the BHoM package is installed in this location: C:\Users\CAUSR2\AppData\Roaming\Dynamo\Dynamo Revit\2.3\packages (as well as the 2.0 location, and the contents match the comment linked)

Revit 2020 is the only Revit version I have that runs Dynamo 2.3 and I receive this error when starting Dynamo:

image

The type initializer for 'BH.UI.Dynamo.Global.GlobalSearchMenu' threw an exception.

   at BH.UI.Dynamo.Global.GlobalSearchMenu.Activate(DynamoView window)
   at BH.UI.Dynamo.Global.Extension.<>c.<Loaded>b__19_0(Object sender, RoutedEventArgs e)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.FrameworkElement.OnGotFocus(RoutedEventArgs e)
   at System.Windows.UIElement.IsFocused_Changed(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyPropertyKey key, Object value)
   at System.Windows.Input.FocusManager.OnFocusedElementChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.Input.FocusManager.SetFocusedElement(DependencyObject element, IInputElement value)
   at System.Windows.Input.KeyboardNavigation.UpdateFocusedElement(DependencyObject focusTarget)
   at System.Windows.FrameworkElement.OnGotKeyboardFocus(Object sender, KeyboardFocusChangedEventArgs 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.KeyboardDevice.ChangeFocus(DependencyObject focus, Int32 timestamp)
   at System.Windows.Input.KeyboardDevice.TryChangeFocus(DependencyObject newFocus, IKeyboardInputProvider keyboardInputProvider, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
   at System.Windows.Input.KeyboardDevice.Focus(DependencyObject focus, Boolean askOld, Boolean askNew, Boolean forceToNullIfFailed)
   at System.Windows.Input.KeyboardDevice.Focus(IInputElement element)
   at System.Windows.UIElement.Focus()
   at Dynamo.ViewModels.DynamoViewModel.OnRequestShowHideGallery(Boolean showGallery)
   at Dynamo.UI.Controls.StartPageView.OnStartPageLoaded(Object sender, RoutedEventArgs e)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Interop.HwndTarget.OnResize()
   at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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)

Additionally, I copied the contents of C:\Users\CAUSR2\AppData\Roaming\Dynamo\Dynamo Revit\2.0\packages into the 1.3 location and was able to make the package work correctly in Revit 2019 that uses Dynamo 1.3. Though to note my office only uses Revit 2022 so as a longterm solution this isn't viable. Maybe it helps with troubleshooting.

Thanks so much for your help!

@pawelbaran
Copy link
Member

Hi @leosteele! Thank you for reporting this - unfortunately, Dynamo is a fragile product that often goes down without a clear reason. The error you are getting in Revit 2020 looks similar to BHoM/BHoM#1344 and is probably caused by a conflict with some other package. Fixing such issues reminds searching for a needle in a haystack, and that is the actual reason for discontinuing BHoM support for later versions of Dynamo (at least until it becomes more stable...) - similar to Lunchbox and others.

Following the above, I would strongly recommend using BHoM with Revit through Grasshopper - it is much more user friendly plus you can leverage fantastic geometry engine of Rhino.

I think this comment concludes the discussion, so I will close the issue. However, please feel free to reopen if you think more input is needed. Thanks!

@leosteele
Copy link
Author

@pawelbaran Just to clarify, are you saying above that BHoM does not work in Revit 2022/Dynamo 2.12? This comment in the similar issue is contradictory:

it seems to work BHoM seems to play nicely with Revit and 2022 and dynamo 2.12.

Just trying to understand if I should troubleshoot any custom packages I have installed for Dynamo 2.12 to get this package to work or if there's no way to have it work and I should instead focus my energy on Grasshopper.

Additionally, can Grasshopper run in Revit outside of the Rhino.Inside add-in? There's no option for downgrading Dynamo versions in Revit 2022, correct?

@pawelbaran
Copy link
Member

I am 100% sure BHoM does not support Dynamo 2022 @leosteele - we have not even compiled our files for anything above 2.3 😉 So BHoM should not affect any version of Dynamo beyond 2.3. Unfortunately, I have not heard of any ways of downgrading Dynamo under latest versions of Revit (they are built-in as far as I know).

Regarding Grasshopper, if you want to run the plugin inside Revit process, it needs to go through Rhino.Inside. However, BHoM's Revit adapter does not require to be run this way - you can run it from Rhino/Grasshopper as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Ask for further details or start conversation
Projects
None yet
Development

No branches or pull requests

3 participants