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?
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.
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.
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?
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=22.214.171.124, Culture=neutral, PublicKeyToken=null’. (line 59)
I’m using the Rhino window that automatically opens when opening Revit.
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>
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?
The plan is to have it ready in V7.
Where can I find the Grasshopper Samples files ?
You might start here:
Thanks for the answer, but the directory "% APPDATA% \ Autodesk \ Revit \ Addins \ <revit_version> " does not contain the “Sample2.ghx, Sample3.ghx…” files.
Where can I download them.
Thanks for loading the files but I’m not able to open Sample2.ghx or Sample3.ghx
IO generated 1 messages
is an unexpected token. The expected token is ‘=’. Line 44, position 89.
I use Revit 2019 and load Rhino WIP/GH from Revit
I get the same error, did you figure out causes this? Are there any additional GH components to load? thx
I’m not sure if I remember correctly, but I think I copied the content of the ghx file to notepad and saved it as .ghx (from github). This gave me a functioning file…
May the force be with you
That worked! thanks!
The only additional thing i had to do was re-path the missing .DLL’s to Revit 2020 folders.
Ive tried doing this to no avail… still get the same error?
I only did this once, half a year ago, and have not used the wip since. To bad it did not work for you. Maby someone who uses the wip on a more regular basis can help you out.
I think the files should have been available as normal downloads. I’m not used to github, but it seems messy to me…
Hi @kike What if the RhinoInside.Revit.dll is not present in those folders…?
where can I find the dll?
I have a load error as u can see in image. Can u help me with it ?