Grasshopper

algorithmic modeling for Rhino

Hello All,

I'm trying to update my Karamba scripts from 1.2.2 version to 1.3.0. I'm trying to write a simple C# script to understand this new organization between materials and cross sections, but i'm facing some issues.

The code I wrote is the following, trying to retreive the Modulus of Elasticity of one element:

private void RunScript(object x, ref object A)
{

Karamba.Models.Model model = (Karamba.Models.Model) x;
A = model.elems[0].crosec.material.E();
}

 

With Karamba 1.3.0 properly assembled.

I'm getting the following errors:

1. Warning (CS1701): Assuming assembly reference 'RhinoCommon, Version=6.1.18037.13441, Culture=neutral, PublicKeyToken=552281e97c755530' matches 'RhinoCommon, Version=6.3.18090.471, Culture=neutral, PublicKeyToken=552281e97c755530', you may need to supply runtime policy

2. Warning (CS1701): Assuming assembly reference 'Grasshopper, Version=6.1.18037.13441, Culture=neutral, PublicKeyToken=dda4f5ec2cd80803' matches 'Grasshopper, Version=6.3.18090.471, Culture=neutral, PublicKeyToken=dda4f5ec2cd80803', you may need to supply runtime policy

1. [A]Karamba.Models.Model cannot be cast to [B]Karamba.Models.Model. Type A originates from 'karamba, Version=1.14.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadNeither' in a byte array. Type B originates from 'karamba, Version=1.14.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadFrom' at location 'C:\Program Files\Rhino 6\Plug-ins\karamba.gha'. (line: 116)

Looks like a problem between Karamba 1.3.0 and Rhino 6 assembles. Any ideia to solve this? I need to update my exiting scripts since they all stopped working.

Views: 43

Replies to This Discussion

Hello Márcio,

did you install the Rhino6-version of Karamba? Do you reference the correct karamba.gha-File in your C#-component? Did you disable the option that Grasshopper loads .gha-assemblies to memory? You can do this for all plug-ins using the 'GrasshopperDeveloperSettings' command in the Rhino text window. It is also possible to do this for each plug-in individually via Grasshopper/Help/About/...

Best,

Clemens

I have the following problem in karamba 1.3 for rhinoceros 6, I deactivate the Memory load.GHA * assemblies using COFF byte arrays, but at the moment of using the component c # this can not recognize the karamba.gha file, at which point I return to the Memory load. GHA assemblies using COFF byte arrays, then there if you recognize the karamba.gha file but it does not recognize the code (it does not recognize the classes), I can not use the GrasshopperUnloadPlugin and GrasshopperLoadPlugin commands because Rhinoceros 6 does not have them, then. How could you solve this issue to be able to program properly? 

In order that you can use 'karamba.gha' from the Grasshopper C#-component the 'Using COFF byte arrays'-option for Karamba3d needs to be disabled.

In case the C# -component has troubles with the 'karamba.gha'-assembly use 'Manage Assemblies' from the context menu of the C#-component (right-click on the component for that), remove 'karamba.gha' from the list of assemblies and then readd it.

Since Rhino6 does not have an unload command for Grasshopper it needs to be closed and reopened for changes to take effect.

Best,

Clemens

I also have the same problem, did you manage to solve it? 

RSS

About

Translate

Search

© 2018   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service