algorithmic modeling for Rhino
Hi everybody,
I am trying to add UserData to Geometry Objects using C#. I got this helpful example (http://frasergreenroyd.com/how-to-add-custom-user-data-to-rhino-obj...) but its just not working out for me :(
The Error-Message is saying: "Object reference not set to an instance of an object"
The Class which is storing the UserData looks like this. Its built in VS and referenced as .dll into the scripting component:
namespace UserDataTest
{
public class MeshUserData : Rhino.DocObjects.Custom.UserData
{
public List<double> meshResults;
public MeshUserData()
{
meshResults = new List<double>();
}
public void AddResults(List<double> results)
{
meshResults = results;
}
public void ClearResults()
{
meshResults.Clear();
}
}
}
Many thanks for any help or hints I could get on understanding the problem and reason behind this Error and making it work!!
Phil
Tags:
I can't see the mistake, but are you sure you want to use UserData? UserDictionary is more easily accessible.
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