RegionRepository.GetAllGraphicsObjects Method

Gets all graphics objects.

Namespace: Gamanet.C4.SDK
Assembly: Gamanet.C4.SimpleClient (in Gamanet.C4.SimpleClient.dll) Version: 2026.0.0.733
Syntax
C#
public ISimpleCollection<GraphicsObjectV1> GetAllGraphicsObjects(
	Guid regionId,
	Guid moduleId,
	bool withDirectChild
)

Parameters

regionId  Guid
The region identifier.
moduleId  Guid
The module identifier. Defined by developer and must be used the same for whole visualization module.
withDirectChild  Boolean
if set to true with direct child.

Return Value

ISimpleCollection<GraphicsObjectV1>
All graphics objects for region and module

Implements

ISimpleClientRegionRepositoryV1.GetAllGraphicsObjects(Guid, Guid, Boolean)
Example
The following example illustrates how SimpleClient gets all graphic objects by region Id and module Id
C#
using System;
using Gamanet.C4.SDK;
using Gamanet.C4.SimpleInterfaces;

public class Example
{
    static void Main()
    {
        // Create instance of simple client
        var client = new SimpleClient(ConnectorConfiguration.HttpClient);

        ConnectionInfoV1 token;
        // Connect to local server
        var connectionResult = client.Connect(new Uri("https://localhost/"), "Support", "support", out token);

        if (connectionResult != ConnectionResult.Successful)
        {
            Console.WriteLine("Connection unsuccessful, result: {0}", connectionResult);
            return;
        }

        Console.WriteLine("Connection result: {0}", connectionResult);
        Console.WriteLine();

        // this example include all child
        var allGraphicObjects = client.Regions.GetAllGraphicsObjects(region.Id, moduleId, true);

        Console.WriteLine(allGraphicObjects.Count);

        // Disconnect from server
        client.Disconnect();
    }
}
See Also

Reference

RegionRepository Class
Gamanet.C4.SDK Namespace