Grasshopper

algorithmic modeling for Rhino

Hi,

I'm developping my code in VS C# Express 2008 and often have the problem, that I use types or methods, that are not available in the .Net Script Component and then need to change the code again.

(e.g. Sorted List and Sorted Dictionaries are available in VS but not GH)

My guess is that that has something to do with the .Net Version GH is using. (Please correct me if that's wrong.)

So I was wondering how I can set up my VS Express to only use the code that is available within grasshopper.

Thanks in advance,
Martin

Views: 535

Replies to This Discussion

Hi Martin,

it is not because of the DotNET version. It's because of referenced assemblies. I've just heard from someone else as well that C# is a lot less forgiving regarding access to framework assemblies. SortedList and SortedDictionary are located in the System.Collections.Generic namespace, but they are supplied by mscorlib.dll, which I forgot to reference.

I'll try and get this all fixed for the next release.

--
David Rutten
david@mcneel.com
Seattle, WA
Hi David,

it is good to know the source of the problem. For now I guess it is the best for me to work with regular dictionaries until the next release.

Thanks again,
Martin
Regarding references, can the development team check on the reference for SQL/Database types/methods? I think the types work if typed correctly in the VB component but the intellisense doesn't work without the system.data assembly being referenced again. However, if I do that, GH reports that a duplicate assembly is being referenced which is correct because I can see it at the top of the script editor.

In particular, I want to get to the OLEDB types and methods. For example,

Dim rst As OleDb.OleDbCommand
Dim reader As OleDb.OleDbDataReader

Thanks.
I'll have a look.

--
David Rutten
david@mcneel.com
Seattle, WA
I made sure those namespaces are now properly imported in both VB and C#.

--
David Rutten
david@mcneel.com
Seattle, WA
That's great.
Thanks.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service