algorithmic modeling for Rhino
Hi all,
I am getting this error: "Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)" when i try to save a .GH file with the custom component i'm working on on the canvas.
I set a breakpoint for the method:
public override Guid ComponentGuid
{
get { return new Guid("{insert auto generated 8-4-4-4-12 GUID here}"); }
//get { return new Guid()
}
and it is not even being called. I'm on VS express 2013. I've tried googling the error code but the causes out there seem to be quite varied and there is nothing on this forum about this error.
Any thoughts?
Tags:
http://newguid.com/ Here you can generate your GUID. I'm not sure if that's really your problem :)
No, got plenty of GUIDs (VS has a built in tool). It's using the things i'm having trouble with.... The GHA VS assembly even setups all of this up for you so, as far as i understand, it should just work.
I had a similar problem last time (VB.NET) but it was caused by formatting error.
what was the bad format and what was the one the worked?
The Assembly wizard for C# uses ("{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}") but i understand from the overrides that multiple versions are allowed.
update: the debugger is now seeing a call to this method just after i try a save. I think i wasn't using the latest build of my .GHA before. Still don't understand why i'm getting the GH Error though....
ComponentGuid is called at least once when your library loads, if you're not hitting that breakpoint it means debugging isn't working as it should. The ID is then cached so it may never be called again, but then it may also be called lots of time later.
The exception seems to originate from the System.Guid constructor, which most likely means you're providing the wrong kind of string format. However it is odd that it only fails on saving, not loading. So maybe you're not providing the wrong kind of string format.
You're going to have to post some code that shows the problem. You can email it to me personally if you don't want to post it online.
--
David Rutten
david@mcneel.com
Sure, Here is the .cs & .csproj file for the component....
I was hitting the break points - its just that the build of my GHA was out of sync. when i copied over a newer version every thing worked (break-point wise).
I made a fresh component generated by the assembly wizard and it is having the same problem also :-(
Hi Dieter
can you explain what you are referring to with "copied over a newer version"? Generally you are supposed to load the file in the /bin folder, and avoid making copies if possible.
Also, can you please zip the whole project and attach it here? Not just the two files? This way I can maybe see what is going on.
Thanks!
Giulio
--
Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com
Ok so your saying i need to Set Grasshopper to look in my /bin folder as well as the normal library folder? I had been copying it each time i built it into the GH library folder....
so i see the pathing solution here:
http://www.grasshopper3d.com/forum/topics/grasshopper-library-folders
I'll make sure that i set that up. Not pathing correctly couldn't be causing problems i'm seeing though could it? Ultimately I'll need to be putting that file into the library folder...
I've uploaded all the grasshopper stuff and the .sln file but left out the library is that ok?
For end-users the GHA files should be installed in the appdata components folder, or as part of an RHI installer or as part of a custom installer which registers a specific location.
For developers it's usually easier to have GH look into the bin folder directly. You can add a search path to your bin folder using the GrasshopperDeveloperSettings command.
--
David Rutten
david@mcneel.com
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
© 2024 Created by Scott Davidson. Powered by