Closed MM-SalvoDragotta closed 2 years ago
Hi,
Did you have any problems when compiling? I just made some minor cleanup of the csproject files (removed the reference to a specific version of the api dll) and had to migrate them to NET 4.7 because that's what the 2020 was targeting.
Could you please try the 2020 release and the updated installation readme on your end and see if that helps?
No problems when compiling. I tried the 2020 version and same story. When I click on NPS, it spins for a bit but Navisworks crashes at the end with no messages. I'm using Manage 2020 (64bit) version 17.0.1336.83. could there be anything preventing add-ins from running?
Also how do I change the name of the tab in the Ribbon to say "Python Shell" instead of Tool add-ins 1?
Can't imagine what would cause it. Try setting a breakpoint at the start of the Execute
method and debugging:
Navisworks is kinda backwards about creating custom tabs. The best example on how to do it is probably the old CASE bcf plugin:
The command class needs to inherit from CommandHandlerPlugin
instead of AddInPlugin
and you need to create a special ribbon layout xml that you feed in as an argument. It should look like this one:
Try finding the dump file created by Navisworks and debug it with Visual Studio.
You can access the actual exception message there.
On Tue, Sep 10, 2019, 4:03 PM MM-SalvoDragotta notifications@github.com wrote:
No problems when compiling. I tried the 2020 version and same story. When I click on NPS, it spins for a bit but Navisworks crashes at the end with no messages. I'm using Manage 2020 (64bit) version 17.0.1336.83. could there be anything preventing add-ins from running?
Also how do I change the name of the tab in the Ribbon to say "Python Shell" instead of Tool add-ins 1?
[image: image] https://user-images.githubusercontent.com/54158123/64656417-b2a48f00-d472-11e9-8aee-cb4886b3dcd5.png
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dimven/NavisPythonShell/issues/6?email_source=notifications&email_token=ADL2CE6LPOUJNSA7ORJDOO3QJARVFA5CNFSM4IUVH4J2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6MX6MI#issuecomment-530153265, or mute the thread https://github.com/notifications/unsubscribe-auth/ADL2CE2MOYEXZWED27U4M6DQJARVFANCNFSM4IUVH4JQ .
Try finding the dump file created by Navisworks and debug it with Visual Studio.
You can access the actual exception message there. …
Thanks! I got this msg
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Autodesk.Navisworks.Api.dll Could not load file or assembly 'PythonConsoleControl, Version=2017.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
I got something similar. I'm attaching my error dumps. I'm using the precompiled version from here: https://github.com/dimven/NavisPythonShell/releases/download/2020.0.1/NavisPythonShell_2020.zip
Did you download it from the releases? Is it possible the zip / dlls were blocked by windows? Try selecting Properties from the right-click menu on the zip before unpacking, or the dlls after unpacking, and check if there's an Unblock button/checkbox.
Yes, the zip is from the releases (2020.0.1). I unblocked the zip before unpacking. I have checked the plugin folder and the dll files have no unblock.
I'm using Navisworks 20 Version: 17.1.1338.62
I checked the error dump in Visual Studio and I got the same error as @MM-SalvoDragotta .
System.IO.FileNotFoundException
HResult=0x80070002
Message=Could not load file or assembly 'NpsRuntime, Version=2017.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Source=
Not sure why that would be happening.
NpsRuntime
is one of the dlls that gets compiled and referenced in the repo. Its version is hard-coded here:
We're referencing it in the main NPS dll but it's reference without a specific version:
Is it possible you have an older version of NpsRuntime.dll
stored somewhere that is somehow creating a conflict?
Thank you for trying to sort this out! The only NpsRuntime.dll is the one I first downloaded from your releases here: https://github.com/dimven/NavisPythonShell/releases/download/2020.0.1/NavisPythonShell_2020.zip
Not sure what more to test!
Sorry I couldn't be of more help. Not sure either what else could be causing the dll to fail to load. Do you have any navisworks plugins installed? Maybe one of them is loading a different version of a dependent assembly?
I've got the same issue when try to run RPW then NW will crashes.
Hi! I've had the exact same issues as described above, and it was very frustrating. Anyway, after some digging I found that the problem (at least for me) is that the dependencies for the NPS plugin are not found when executing it. ref.: Autodesk Forum
I've currently installed NPS to "%Program Files%\Autodesk\Navisworks Manage 2020\Plugins" and not "%APPDATA%\Autodesk Navisworks Manage 2020\Plugins", but had the same issues with both locations.
So by copying the NPS dependencies to the "%Program Files%\Autodesk\Navisworks Manage 2020/Dependencies" directory - it now works!
The way @hoggs described above worked perfectly for me e.i. extracting NavisPythonShell_2020.zip to "%Program Files%\Autodesk\Navisworks Manage 2020\Plugins" and then copying files directly to the "%Program Files%\Autodesk\Navisworks Manage 2020/Dependencies" allowed me to run NPS. Thanks for sharing!
NPS dependencies
Hallo I have the same problem I copy NavisPythonShell_2020.zip to "%Program Files%\Autodesk\Navisworks Manage 2020\Plugin But it still have problem I copy NPS to "%Program Files%\Autodesk\Navisworks Manage 2020/Dependencies" But it still have problem Can you help me please? What else problem can be? How can i fix it?
I found that crushed
typeof(NpsConfig)
I've recompiled in both manage 2018 and 2019 but Navisworks crashes when I try to open NPS. Any idea why?