algorithmic modeling for Rhino
Hi everyone,
If you follow my posts in the blog,you realize that I am trying to develop a set of components working with custom datatype.Thanks to all the info in your posts and forum,i get them to work but still an error is there.
With this implementation I get IO message in all events like Copying components or saving or cutting
to get it right my guess is i have to override write and read methods in ProfilGhGoo
or it has something to do with "proxy".
My implementation for custom datatype is something like this:
public class BaseProfileType{
public BaseProfileType()...
public override string ToString()...}
public class ProfileGHGoo : GH_Goo<BaseProfileType>
{ public ProfileGHGoo() : base() { }
public ProfileGHGoo(BaseProfileType profileSt) : base() { this.Value = profileSt; }
public override IGH_Goo Duplicate()
{ BaseProfileType dup = new BaseProfileType();
return new ProfileGHGoo(dup); }
public override bool IsValid { get { return true; } }
public override string ToString()
{ return string.Format(Value.ToString()); }
public override string TypeDescription
{ get { return "Profile"; } }
public override string TypeName
{ get { return "Facade Library"; } }
}
public class ProfileGHParam : GH_PersistentParam<ProfileGHGoo>
{ //public string result;
public ProfileGHParam() : base(new GH_InstanceDescription("Profile", "Pr", "Contains profile with all its properties", "Extra", "Profile ")) { }
public override Guid ComponentGuid
{ get { return new Guid("5f6f7e08-e2ba-4403-be1e-aa608eb4eae2"); } }
public override GH_Exposure Exposure
{ get { return GH_Exposure.hidden; } }
protected override GH_GetterResult Prompt_Plural(ref List<ProfileGHGoo> values)
{ return GH_GetterResult.accept; }
protected override GH_GetterResult Prompt_Singular(ref ProfileGHGoo value) { return GH_GetterResult.accept; }
}
I've read the GH SDk.In the example there for TriState type,Because it ia actually int type, in the Read and Write method getint32 and setint32 is used.but My data type is a custom type with whole bunch of different type properties.
Any help or hint,can help!
Thanks
Tags:
Welcome to
Grasshopper
Added by Parametric House 1 Comment 0 Likes
Added by Parametric House 1 Comment 0 Likes
© 2026 Created by Scott Davidson.
Powered by