algorithmic modeling for Rhino
I copied Arend's idea of using a text file to embed code into a scripting component. This way you can use Visual Studio or any other alternative as the editor.
It works real-time, the scripting component is run every time the file is saved. The code is also stored inside the component, so if you want to send the file to someone else, you just need to send the .gh. They don't need the text file or any additional plugin.
I haven't tested it much yet.
Things not working:
- You have to type the input arguments manually if you want intellisense for them.
- If you want to add assemblies you have to do it both in the scripting component and VS and manually add the using line.
Tags:
Comment
I forgot to add, if you want to build the .gha you need to add the script.gha reference in the plugin project.
Visual Studio won't allow you to reference files other than .dll. To work a round this you can copy/rename the file as a .dll, add the reference, close the project, open the .csproj file in a text editor and rename script.dll to script.gha. Remember to set copy local as false.
tzl: The .gha file is linked in a comment bellow.
Yes! Thanks for sharing.
Ohhhh! Very nice indeed.
incredible !! where can i download the GHA?
Great idea!
Congrats Vicente. The benefits of a real development environment! Thanks for sharing.
Hi Vicente,
I will take a look at it tomorrow, thanks.
If you want to try it, what I did is create in VS a Grasshopper plugin project, added a new .cs file, pasted all the default code from a scripting component and added some missing references (optional).
The commented lines
// <Custom code>
// </Custom code>
// <Custom additional code>
// </Custom additional code>
are needed for the component to know what code to place where.
Hi Mateusz,
I just posted the source code, it should be very simple to make it work in VB.NET as well.
Arend's post: http://www.grasshopper3d.com/forum/topics/c-add-list-s-to-branch-ye...
Component: ImportCodeGhScript.gha
Source code of the component: ImportCodeGhScriptComponent.cs
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by
You need to be a member of Grasshopper to add comments!