VisualARQ API Parameter Method

Hello !

I would like to get parameter of a grasshopper model that I import using VisualARQ in Rhino.
I wrote following code to obtain parameter value but the value object I got was null everytime.

      using va = VisualARQ.Script;
      Guid[] parameterIds = va.GetAllObjectParameterIds(blkInstance.Id, true);
      foreach (Guid paramId in parameterIds)
      {
          // GetParameterName
          RhinoApp.WriteLine(va.GetParameterName(paramId));

          // GetParameterValue
          object paramValue = va.GetParameterValue(paramId, blkInstance.Id);
      } 

PS: Are there any examples using VisualARQ Script API using C# and RhinoCommon?

Thank you
-sam

Hi @sam15,

At first look, the code seems right to me. Take into account that VisualARQ Script API only works on objects in the document, and it doesn’t work with Grasshopper. If you want to get parameters inside a Grasshopper definition, there are specific components.

I’ve tried your code in a RhinoCommon C# plugin, and it works fine.

Can you send me the 3DM model you’re using?

Thanks,

Enric

Hi @enric

Thanks for your reply. The model is imported as a style from a Grasshopper file using VisualARQ, I would like to get the parameters for this model just like the properties shown in VisualARQ Property Panel when you select the model. I have attached the 3DM model and the Grasshopper file that I used.

Thanks for your time
-sam
3DM file
BOX.3dm (84.8 KB)
Grasshopper file
BOX.gh (17.4 KB)

Hi @sam15,

Why are you doing this using a C# script component? As I told you earlier, our VisualARQ.Script.API is not meant to be used inside a Grasshopper definition.

There are several Grasshopper Component to get properties, parameters, and their values.

Regards,

Enric

Hi @sam15,

Ignore my last post. I didn’t read correctly your message.

I’ve found the problem. When we created the parameters for VisualARQ, we added the “Integer” type as an unsigned integer (commonly named “Natural number”). Then we used those parameters in the Grasshopper Style feature, but as “Intergers” in Grasshopper can have negative values, we used a signed integer.

The problem is that VisualARQ Script API has no support for signed integers yet. I’m going to fix this for VisualARQ 2.13. If you want, I can send you a WIP build as soon as I implement it.

Regards,

Enric

Hi @enric,

Thanks for your post! Sure, it would be great if you could send me a WIP build when you implement that! Thanks again for your help!

Regards
-sam

Hi @sam15,

I’m managed to fix the issue and include it in VisualARQ 2.12.4 (not yet published).

Here are the download links for the latest builds:
https://visualarq.s3.amazonaws.com/download/visualarq-2.12.4.15644-rhino6-setup-snapshot.msi
https://visualarq.s3.amazonaws.com/download/visualarq-2.12.4.15644-rhino7-setup-snapshot.msi

Let me know if it works.

Thanks,

Enric

Hi @enric

I have tested and it works! Thanks for the quick update!

Regards,
-sam