Grasshopper

algorithmic modeling for Rhino

I've just started playing with c# and immediately bumped into a problem.

When I enter a declared List name there isn't any pop-up window after hitting a dot.

For example:

List<int> alist = new List<int>();
alist.  - nothing happens

Though the pop-up window works well with geometry:

Point3d pt = new Point3d(0, 0, 0);
pt.   - suggestion window appears


Do I have anything missing on my computer? Or is there another way of declaring a List?

Views: 483

Replies to This Discussion

Max, this is a problem with the script editors that GH uses. Intellisense for lists (and a few other classes) fails in both C# and VB.NET. Not much to do about it, unfortunately, although I believe that David is hoping to use a better system for GH 2.0. The one option you do have is to write your scripts outside of the GH environment, like in Visual Studio or VS Express, although you have to port things back and forth. That said, all list functionality correctly applied works fine, you're just "flying blind" when you're working with them, so if you keep MSDN close by, you can find the correct syntax for all of its properties and methods.

Hi David, just thinking, doesn't C#/VB have something similar to dir() and help() for introspection of Python objects? The intellisense in both the GHPython and EditPythonScript editor is rather rudimentary, so functions like these are really valuable!

Thanks for your reply, David.

I watched a video tutorial by Zach Downey from Designalyze and suggestions worked for him right in the GH editor. The video dates back to 2013 though. Maybe it worked in some of the older grasshopper versions.

Anyway missing this feature for a novice user like me is a pain. I hope David will fix it anytime soon.

Yeah it's a huge pain, but we license the editor from another company and they have for a long time refused to fix the problem and release an update. They did release a new version a few weeks ago but I haven't tested yet whether it fixes the bugs we reported.

Since this is clearly not working for us as a long term solution, we decided to bite the bullet and have someone actually develop code editors for all of Rhino (Rhino command macros, RhinoScript, Python, VB, C#, on both windows and Mac). I think we still haven't settled on what core editor to use, but I think our most successful attempts so far are based on atom.io

Alain Cormier is in charge of this project and I think chances are very good we'll have something far better when GH2 comes along. Another major help is the recent release of the Microsoft compiler services (formerly known as 'Roslyn'). It should make lexical analysis of .NET code much more reliable and easy for all people out there developing code editors.

Thanks for your detailed feedback, David!

Looking forward to GH2 release.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service