algorithmic modeling for Rhino
Hi,
Does there exist a way to debug rhinocommon scripts for Rhino 5.0?
I found that components in grasshopper can't figure out syntax errors before I hit Ok button, and navigating in grasshopper C# or VB.NET components seemed to be quite inefficient when there are more than one thousand lines of code. VS2010 could give me a pleasant journey when I wring code but seem to be impossible to figure out some non-syntax errors that generated by rhino. Is there a way to run the scripts in Rhino just by hitting the "debug" button on the toolbar of VS2010?
I know there is a hybrid way of writing codes in VS and copying them back to Grasshopper component but this seems to be quite laborious and not all codes can be dealt with in this way since grasshopper component does not accept multiple classes in one single component.
Meanwhile, writing codes in VS could ensure the possibility of developing it as a Rhino plugin and also have a potential to enjoy those .net 4.0 new features.
Anyway, in one word, is there an easy way to detect and debug all the syntax and non-syntax(errors that generated by rhino) in VS2010? or, even further, to run the scripts in rhino viewport just by hitting the "debug" button and trap errors that generated?
Thanks,
Jerome
Tags:
Yeah, seems to work just fine. Use this as the Start Option command line arguments in Visual Studio:
/nosplash /runscript="-_LoadScript C:\DebugGH.rvb"
And the RVB file itself will look like this:
Option Explicit
Call DebugGHFile()
Sub DebugGHFile()
Dim GH
Set GH = Rhino.GetPluginObject("Grasshopper")
Call GH.DisableBanner()
Call GH.ShowEditor()
Call GH.OpenDocument("C:\SineBetweenCurves.gh")
Set GH = Nothing
End Sub
--
David Rutten
david@mcneel.com
Poprad, Slovakia
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