File Errors in Scripting Manual examples

Hello,

I’m trying to follow along with the scripting manual to use C# in my project, and it seems like I’ve run into some issues with my files. When running DataRetrieval.gh I get the following error message:

  1. Error (CS0103): The name ‘UnitsConversionFactories’ does not exist in the current context (line 74)

And when running ModelCreation.gh I get this message:

  1. Error (CS1502): The best overloaded method match for ‘Karamba.Factories.FactoryAlgorithms.AnalyzeThI(Karamba.Models.Model, out System.Collections.Generic.IReadOnlyList, out System.Collections.Generic.IReadOnlyList, out System.Collections.Generic.IReadOnlyList, out string)’ has some invalid arguments (line 99)
  2. Error (CS1503): Argument 2: cannot convert from ‘out System.Collections.Generic.List’ to ‘out System.Collections.Generic.IReadOnlyList’ (line 99)
  3. Error (CS1503): Argument 3: cannot convert from ‘out System.Collections.Generic.List’ to ‘out System.Collections.Generic.IReadOnlyList’ (line 99)
  4. Error (CS1503): Argument 4: cannot convert from ‘out System.Collections.Generic.List’ to ‘out System.Collections.Generic.IReadOnlyList’ (line 99)
  5. Warning (CS1701): Assuming assembly reference ‘Grasshopper, Version=7.35.23346.11001, Culture=neutral, PublicKeyToken=dda4f5ec2cd80803’ matches ‘Grasshopper, Version=7.37.24107.15001, Culture=neutral, PublicKeyToken=dda4f5ec2cd80803’, you may need to supply runtime policy
  6. Warning (CS1701): Assuming assembly reference ‘RhinoCommon, Version=7.35.23346.11001, Culture=neutral, PublicKeyToken=552281e97c755530’ matches ‘RhinoCommon, Version=7.37.24107.15001, Culture=neutral, PublicKeyToken=552281e97c755530’, you may need to supply runtime policy
  7. Warning (CS1701): Assuming assembly reference ‘GH_IO, Version=7.35.23346.11001, Culture=neutral, PublicKeyToken=6a29997d2e6b4f97’ matches ‘GH_IO, Version=7.37.24107.15001, Culture=neutral, PublicKeyToken=6a29997d2e6b4f97’, you may need to supply runtime policy

However, when I run HelloKaramba3D.gh no errors are found.

Hello @Juniper_Moscow,
I am currently in the process of updating the manuals of Karamba3D to the current version 3.
There were slight changes necessary in the API. In case of ‘AnalyzeThI’ the outputs were changed from List<> to IReadOnlyList and ‘UnitsConversionFactories’ is now available as ‘UnitsConversionFactoriy’.
Here are the two files updated to Karamba3D version 3:
DataRetrieval.gh (25.7 KB)
ModelCreation.gh (11.6 KB)
– Clemens