Table in VisualARQ for Grasshopper

grasshopper
unhandled
(P Rangi) #1

Is there any way I can create VisualARQ table inside Grasshopper?
Or at least import csv data already created in Grasshopper to VisualARQ table in Rhino?

(Francesc Salla) #2

Hi @p.rangi, the VisualARQ “Table” object is not available in Grasshopper. However, you can read the values of a list of VisualARQ objects (or not VisualARQ objects), and also assign values to objects from a csv data list.
In the following recorded webinar (from minute 32’) you can see how to assign a list of values to a set of beams. These values are calculated but they could also come from a csv data list. After the values are assigned to geometry and that is baked, you can create the table in VisualARQ.
Let me know if you have any doubts about this.
Cheers,

(Tomh) #3

Francesc, just to be clear there is no container in GH that can be used to hold a VA “table” object? I’m not even looking to access or modify the table properties, just make copies of the same table in different locations.

If not Grasshopper, can I affect the tables via scripting? Didn’t know if they were exposed in the API…

(Francesc Salla) #4

Correct, there is no VisualARQ Table object in Grasshopper. We could work to make it possible in future versions.

There is already a VisualARQ API available, but we need to add the functions to generate tables. I’ll let you know when we add them.

(Luis Fraguada) #5

Hello @tomh,
If all you want to do is make copies of a table, you do not need to use the VisualARQ API. VisualARQ objects can be thought of as InstanceObjects, and thus you can use RhinoCommon or other APIs to copy them around. For example, you can get the ID of the table you want to copy and a series of points which define the location to create the copies. From the ID of the table, you can get that table’s InstanceDefinition, then you can add new InstanceObjects:

I did it in grasshopper just to do it quickly.

Here is the script:

var obj = RhinoDocument.Objects.FindId(id);
var iObj = obj as Rhino.DocObjects.InstanceObject;
var iDef = iObj.InstanceDefinition;
foreach(var pt in pts)
    // this assumes the original table has an insertion point at 0,0,0.
    RhinoDocument.Objects.AddInstanceObject(iDef.Index, Transform.Translation(new Vector3d(pt.X, pt.Y, pt.Z)));

Attached are a 3dm with a basic table and the gh component that takes the ID of the table and a series of points.
Copying Instance Object.gh (6.1 KB)
Column Table.3dm (73.4 KB)

1 Like
(Tomh) #6

Thanks @fraguada ! This is far superior to the rs.command approach I ended up using. I’m going to switch to this now.

Ultimately I would still like to get at the full VA table functionality (create the table from scratch, assign/remove objects etc.) , but I can just lean on rs.command until then.

(Luis Fraguada) #7

@tomh, I’ve already added this issue to the VisualARQ bug tracker. Hopefully this will be available soon.

(Tomh) #8

Luis-

Just noticed that the tables that the script output were blocks, not VA tables.
image

Looks like maybe I’m back to rs.command until they make those methods available. Thanks again.