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.
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.
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.
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.
Cordially,
Jean-Pierre
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’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…
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…