Chapter 2. Graph Object

Table of Contents

2.1. Explorer & References
2.1.1. Item reference
2.2. View 3d / view 2d
2.3. Using as Instance
2.4. Cloning
2.5. Querying

2.1. Explorer & References

For GraphObjects a explorer is provided, which allow users to import graph structures as items and reference them from the project. This item reference relation ship follows the same concept a known form other parts of GroIMP (e.g. Datasets, Shaders).

2.1.1. Item reference

Yet it is important to mention that only SecGrpah objects that where imported through the explorer or created through a reference will be shown in the explorer.

The same works for SecGraph objects with SecGraphRef and the secgraph("xxx"); function, the only difference is that during the import to the SecGraph Explorer the file extension is removed since the graph structure is transformed into an GroIMP-graph.

If for example a file called toto.qsm as added to the GraphObjectExplorer (explorer/GraphObjectExplorer) it can be reference using a GraphObjectRef element:


public void run (){
    GraphObjectRef g = new GraphObjectRef("toto.qsm"); // creating a referene to toto.sqm
    println(count(g.(*F*))); // find all F in g and count them
}

Or short using the function graphobject("toto.qsm");