algorithmic modeling for Rhino
i dont speack french, unfortunately!
did you load the karamba.GHA as an assembly for the c# component?
if yes, try to toggle the 'Load .COFF byte arrays' option in the grasshopper developer settings!
best
R
robert here is the attachment you can see it's not the same ://
ok, i didnt know you are developing in visual studio. my advice was for a custom c# component within GH!
in VS, you need a little workaround -
rename karamba.gha to karamba.dll and link it into VS. after linking it, you can name it back it think. if VS then gives you an error you would have to copy it, so you got a karamba.gha and a karamba.dll ..!
you can also link it dynamically in your code, which I did for david's galapagosComponents.gha ... !
I m sorry Robert but how I link it dynamically in my code :/
I don't understand
thank you :)
for dynamically adding an assembly reference you need to do something like the following:
(basically you need just one line if you know the path for sure. this was A) bad code and B) for GH 0.9.0014)
// Load GeneList - reference
int j = -1;
for (int i = 0; i < Grasshopper.Folders.AssemblyFolders.Count; i++)
{
if (File.Exists(Grasshopper.Folders.AssemblyFolders[i].ToString() + "\\GalapagosComponents.gha")) j = i;
}
if ((j == -1) && (File.Exists(Grasshopper.Folders.PluginFolder.ToString() + "\\GalapagosComponents.gha")))
{
Assembly.LoadFile(Grasshopper.Folders.PluginFolder.ToString() + "\\GalapagosComponents.gha");
}
else if (j >= 0)
{
Assembly.LoadFile(Grasshopper.Folders.AssemblyFolders[j].ToString() + "\\GalapagosComponents.gha");
}
else
{
GAlog.Text += "\r\nGalapagosComponents.gha was not found, so GenePools cannot be used with Octopus.";
}
The script component in the attached GH definition reads out the properties of arbitrary Karamba cross sections.
You have to point the component to where Karamba is installed: right-click on the component, select 'Manage Assemblies...' and select 'karamba.gha'. It is also necessary to unhook the 'Memory load *.GHA assemblies...'-option in the GH developer settings.
Best,
Clemens
Does this work for version 1.0.4? do you have a similar for that version?
Thank you.
It should. Maybe you have to adapt some property names. In case of that MSVC will issue an error. You can find out the right names using ILSpy.
Best,
Clemens
Hello,
Thank you for the quick answer!
I had to put this project on hold for a while, and i only had the time to look at it now.
Honestly, i am a complete begginner in coding, i've tried checking it out but i can't really figure out what to do.
From what i have figured, this component you sent me is expecting a CroSec_Beam type of Info, and i'm inputing a CroSec_Circle. All the data is supposed to be in CroSec_Beam, and changing the name doesn't really help me out.
Can you give me a hand?
Thank you
Bruno
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