Sample files not working (Rhino.inside)

revit

(Eskiland) #1

Hi. I’m not able to open Sample2.ghx or Sample3.ghx
IO generated 1 messages
is an unexpected token. The expected token is ‘=’. Line 43, position 91.

Any ideas how to get it open, or a place to find grasshopper nodes that are made for the Revit interaction?


(Kike García) #3

Hi,

I’ve been looking the files you refer and both files have just 37 characters on line 43. Could you please tell me more about how do you obtain this message?

Both samples were done using Rhino WIP, so you need to use the Grasshopper that comes with this version of Rhino to fully use them. May it be the problem?

In case you don’t have Rhino WIP installed on your computer you can download it here.


(Eskiland) #4

This problem was resolved. It happened because I downloaded them from github the wrong way. Right click download, gave a file looking more like an html. The problem was not present when I copied the code from github «raw» and saved a file of it, using notepad ++. This allowed me to open the .ghx files.

Now the problem is within the c# nodes. I’m not at work atm. so I cannot check, but the nodes were red and complaining about a library not loaded.

I’m using Rhino WIP. And it opens correctly when opening Revit 2018.


(Kike García) #5

Keep in mind that the C# Grasshopper nodes those definitions contain are using Revit API. So to make them run you should open them from inside Revit.

Could you please give me more details about the library Grasshopper is complaining?


(Eskiland) #6

This is the error message from the node:
Error (CS0012): The type ‘Autodesk.Revit.UI.IExternalApplication’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘RevitAPIUI, Version=18.0.0.0, Culture=neutral, PublicKeyToken=null’. (line 59)

I’m using the Rhino window that automatically opens when opening Revit.


(Kike García) #7

It seams that you are using Revit 2018 to test it.
I did the Grasshopper definitions for Revit 2019.
So the C# component is referencing the wrong assembly in your case.

To fix it you can right click on top of the C# scripting assembly and pick “Manage Assemblies…” at the left you will see the assemblies the definition is currently using. Using the keyboard you can delete RevitAPI and RevitAPIUI, then using the Add link search the right assemblies there use to be on “C:\Program Files\Autodesk\Revit 2018”. You should do the same with RhinoInside.Revit reference, in your case the right one should be compiled in “%APPDATA%\Autodesk\Revit\Addins\2018\RhinoInside.Revit\RhinoInside.Revit.dll”

Since Sample2.ghx and Sample3.ghx are on text form you can also edit the assembly references using a text editor replacing 2019 by 2018 on those lines.

<item name="Reference" index="0" type_name="gh_string" type_code="10">%APPDATA%\Autodesk\Revit\Addins\2019\RhinoInside.Revit\RhinoInside.Revit.dll</item>
<item name="Reference" index="1" type_name="gh_string" type_code="10">C:\Program Files\Autodesk\Revit 2019\RevitAPIUI.dll</item>
<item name="Reference" index="2" type_name="gh_string" type_code="10">C:\Program Files\Autodesk\Revit 2019\RevitAPI.dll</item>

(Eskiland) #8

It’s alive!

Thank you, I’m really lookig forward to this being implemented in Rhino.

Are there any plans of releasing this in Rhino6, or do we have to whait until 7?

Eskil


(Kike García) #9

The plan is to have it ready in V7.