Rhino Compute support for Integer and Number datatype for Grasshopper IO API endpoint

Hello,

We have Grasshopper templates working perfectly on both Rhino Desktop and Rhino Compute. While we are trying to retrieve the input and output parameters of the Grasshopper template through Rhino Compute’s /io API endpoint, only Number paramType is coming up both for Integer and Number Grasshopper DataTypes.

I looked at the source code of compute.rhino3d, it is relying on Grasshopper.kernel namespace which is supporting both GH_Number and GH_Integer datatypes.

Not sure exactly what I am missing here. Appreciate any inputs or pointers.

Specs:
Rhino Version: 7.4.21078.1001
Rhino Compute: 1.0.0.998

Stay Safe!!

I’m afraid I can’t reproduce the behaviour you’ve described. For the attached file I get the following output…

{
  "Description": "",
  "CacheKey": "md5_44403FD572E4C6E3B72BC7A322123D50",
  "InputNames": [
    "num2",
    "int2",
    "RH_IN:int1",
    "RH_IN:num1"
  ],
  "OutputNames": [],
  "Icon": null,
  "Inputs": [
    {
      "Description": "",
      "AtLeast": 1,
      "AtMost": 2147483647,
      "Default": null,
      "Minimum": null,
      "Maximum": null,
      "Name": "num2",
      "Nickname": null,
      "ParamType": "Number"
    },
    {
      "Description": "",
      "AtLeast": 1,
      "AtMost": 2147483647,
      "Default": null,
      "Minimum": null,
      "Maximum": null,
      "Name": "int2",
      "Nickname": null,
      "ParamType": "Integer"
    },
    {
      "Description": null,
      "AtLeast": 1,
      "AtMost": 2147483647,
      "Default": null,
      "Minimum": null,
      "Maximum": null,
      "Name": "RH_IN:int1",
      "Nickname": null,
      "ParamType": "Integer"
    },
    {
      "Description": null,
      "AtLeast": 1,
      "AtMost": 2147483647,
      "Default": null,
      "Minimum": null,
      "Maximum": null,
      "Name": "RH_IN:num1",
      "Nickname": null,
      "ParamType": "Number"
    }
  ],
  "Outputs": []
}

I tried with both the old “RH_IN” syntax and new the contextual components.

image

compute-io-int-test.gh (4.2 KB)