Grasshopper

algorithmic modeling for Rhino

Hi,

 I have made a assembly that defines a class 'geometry' thus:

using Grasshopper;
using Grasshopper.Kernel;
using Grasshopper.Kernel.Data;

...

 class geometry {

 ....

 

 public DataTree<Point3d>  MeshData(string data)

{

  DataTree<Point3d> DTree = new DataTree<Point3d>();

 ....

 return DTree;

}

It compiles.

However, when I reference from another application and try to use the method MeshData(), I get following compilation error:

The type 'Grasshopper.DataTree`1<T0>' is defined in an assembly that is not referenced. You must add a reference to assembly 'Grasshopper, Version=1.0.0.20, Culture=neutral, PublicKeyToken=null'.

I have determined that other methods that do not use DataTree type work fine.

What am I doing wrong?

Views: 312

Replies to This Discussion

Point3d is defined in RhinoCommon. Did you reference that assembly?

I do not know what to make of this.

The issue is resolved. I had referenced all relevant assemblies (Grasshopper, RhinoCommon, GH_IO), yet I had that error.

Today, I removed reference to Grasshopper and then added it back again. This fixed it. Strange though.

Thanks David!

The vagaries of Visual Studio... Re-doing something that doesn't work is so often the solution when working with VS that it's the first thing I try these days.

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