algorithmic modeling for Rhino
Hi everyone-
So I'm curious about general scripting practices employed by all of the .NETers here. I should give some background: I've been programming for many years now, starting in my old work, where I performed data analysis...for this I used a lot of VBA for Microsoft Access, executing SQL, managing recordsets, loops, and whatnot. So when I went back to school to study architecture in 2007, I naturally started using as many computational approaches as I could. That said, I am completely untutored...pretty much everything I do is based on some mixture of luck, intuition, and picking up ideas from others. So I've never really operated in a truly native, scripting-only environment.
As a result in almost all cases I just work directly in VB components on the gh canvas, and for the most part this works fine for me. In fact, I very much enjoy the soft edges between visual and text-based computation afforded by the environment. That said, lately many of the scripts that I have been working with have been getting quite large. Custom classes and functions for some my projects have simply become unwieldy, and going back and forth between the canvas and the script just feels very inefficient. In my early dabblings with making components, it's become clear to me that Visual Studio is a much more robust place to work with and manage loads of code. But how does this work when you're going back and forth between the script and other objects on a gh canvas? does it at all? is there any way to operate in both simultaneously and have an efficient workflow between them? I'd love to hear from other people who use a lot of code so I can try to understand their approaches and hopefully use them to improve my own workflow.
thanks and best regards,
Dave
Tags:
Visual Studio (or some other .NET IDE) is the only real choice for large project development. It is possible to debug from within VS which is a major benefit, however you will have to restart Rhino and Grasshopper between compilations which can get frustrating if you're not making headway on a specific bug.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
I totally agree with David, one trick I also use times to times to play with best of both worlds is to test portions of code that I am not really sure about directly in the VB component, and then when I have solved the errors, I put it back in the VS project (cannot be done with everything but if it is just geometry it's OK). Can be useful... Otherwise, I am often using multiple addRuntimeMessages or outputing a log and some test objects from the component to check where things are wrong. I never used the VS debugger for that, maybe I should...
You definitely should, debugging is a must-have skill for any Visual Studio developer.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks for the replies guys. So at the risk of sounding ignorant...you basically develop all of your more significant projects specifically for compilation as either components or component groups, published as GHAs? and then set the "build output path" to simply be the components folder and overwrite any previous GHAs as they are built, tested and rebuilt?
Do you know of any examples of vs projects where multiple components are generated from the same project. I have using the wizard, which is amazing, but also which seems geared to work toward a single component output. What I'm aiming to do is have a series of components where I could develop a number of custom classes that could be passed from the output of one component to the input of another.
Here's the basic idea of GHA projects:
This GHA file is then created anew every time you compile the project in Visual Studio. You can only override existing GHA files if they are currently not loaded by any application, so if Grasshopper is running and has loaded your GHA then you cannot compile. You'll need to shut down Rhino,then recompile, then start Rhino and GH again.
By using the GrasshopperDeveloperSettings command you can add a GHA loading folder so that Grasshopper always loads your GHAs from your compilation bin folders.
There is further information in the SDK Documentation which can be downloaded via the Grasshopper help menu.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Outstanding. Thanks so much...between this, the documentation and various existing discussions on the forum I'll be on my way.
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
© 2024 Created by Scott Davidson. Powered by