Autodesk-Forge / model.derivative-csharp-context.menu

Extract properties from Revit files: Adds context menu for extracting properties for Revit files and save into an excel file
MIT License
20 stars 19 forks source link

Can't register dll or upload file #1

Open michael-coffey opened 7 years ago

michael-coffey commented 7 years ago

Hello, I was able to follow along all the way to the "The CSShellExtContextMenuHandler.dll must be registered with Admin level permissions on the local machine:" except I can't get this part to work. I'm using Windows 10 and wondering if that's the problem? Any idea for me to try? When I do run the exe I'm getting "System.Exception: Error uploading file: 0 at Translator.Server.d__1.MoveNext() in C:\Users\17888\Dropbox\Work\Revit Addins\model.derivative-csharp-contex...\Translator\Server.cs:line 53" after selecting the file and i get the File Uploading popup. Thanks for any suggestion.

augustogoncalves commented 7 years ago

When you run regasm, do you get any error message? What's the console output?

From the EXE error you are pointing, it seems the Server is not running or you missed to adjust its address at the app.config (of the EXE).

cyrillef commented 7 years ago

regasm should be ran as admin, isn't it?

augustogoncalves commented 7 years ago

yes, and Michael said that's what he's doing...

but the error message Michael reported happens if the server is not running or the app.config is not pointing to the correct address (and I should improve the code to throw a better warning for this)

michael-coffey commented 7 years ago

Hi Augusto! Thanks for the reply. when i copy paste "regasm.exe CSShellExtContextMenuHandler.dll /codebase" into Command Prompt (running as admin) I get "'regasm.exe' is not recognized as an internal or external command, operable program or batch file" Thanks.

augustogoncalves commented 7 years ago

Regasm is located on your Windows .NET folder, which may vary. On Windows 10 64 bit with latested .NET runtime it should be at:

"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\RegAsm.exe" "C:\YourFolder\YourApp\CSShellExtContextMenuHandler.dll" /codebase

The readme shows the basics, so you need to adjust both paths... Note the sample assumes the DLL and EXE at the same folder. The server must be running (either on a web host or localhost) and you also need to adjust the app.config.

augustogoncalves commented 7 years ago

Michael, added a video demoing how to run it locally: https://www.youtube.com/watch?v=Vu8yAhmZUb0

michael-coffey commented 7 years ago

Augusto, Thanks for creating the video. I was able to follow along all the way to the end. I got the notification that the Excel file had been created but then I got this System.Exception in VS:

error

If the excel file was created, i have no idea where it went or where to go get it. Thanks.

augustogoncalves commented 7 years ago

This exception may occur if the endpoint was not yet ready, it happens on the server... you can safely ignore it and keep moving (Continue), the Excel should be created at the same folder as the .RVT.

michael-coffey commented 7 years ago

I figured that would be the place, but I don't see it. I also used the autodesk sample project.