# Automation API

#### <a class="anchor" id="bkmrk-"></a>Automation API

SceneComposer provides an interoperable interface, accessible from any .NET language binding that support a progressive and evolving level of automation.

SCManager exposes the automation API enabling an application developer to write an own program which can load SceneComposer solutions and generate asset files. In order to use the operations provided by this API, refer to following dlls:

<div class="contents" id="bkmrk-scenecomposer.automa"><div class="contents"><div class="textblock">- <span style="color: rgb(230,126,35);">[SceneComposer.Automation.dll](#bkmrk-scenecomposer.automa-0)</span>
- <span style="color: rgb(230,126,35);">[SceneComposer.SDKInterface.dll](#bkmrk-scenecomposer.sdkint)</span>

</div></div></div>The API offers a singleton instance of SCManager which allows to instantiate a single object of class SCManager and use the methods provided.

Useing Automation API:

<div class="contents" id="bkmrk-create-a-c%23-applicat"><div class="contents"><div class="contents"><div class="textblock">- Create a C# application
- Add SceneComposer.Automation.dll and SceneComposer.SDKInterface.dll as references in the C# project.
- Reference the dlls in the C# application: 
    - using SceneComposer.SDKInterface.Solution;
    - using SceneComposer.Automation;

</div></div></div></div>##### <a class="anchor" id="bkmrk--0"></a>SceneComposer.Automation.dll

*SceneComposer.Automation.dll* provides the following methods and properties:

<div class="contents" id="bkmrk-scmanager.instance.i"><div class="contents"><div class="contents"><div class="textblock">- SCManager.Instance.Initialize(): Performs the initialization of all services.

- SCManager.Instance.Solution: Returns the current solution or null if no solution is loaded.

- SCManager.Instance.LoadSolution(solutionFileName): Loads and returns a new solution from the specified solution file, which can further be accessed and managed through the query interface.

- SCManager.Instance.GenerateAsset(assetFileName, solution.Scenes): Generates an asset file based on the current solution. The asset file will contain all items which have the "Always Export" flag set or are referred by other included items. In addition the asset file will contain the specified extra scenes with all their dependencies. GenerateAsset(assetFileName, scenesList ) requests the path of the asset as a parameter. Its function is to generate the asset file at the specified location on the computer. The second parameter represents a list of the extra scenes that you want to include.

</div></div></div></div>##### <a class="anchor" id="bkmrk--1"></a>SceneComposer.SDKInterface.dll

*SceneComposer.SDKInterface.dll* provides the methods that allow to manage and query the solution received with the LoadSolution() method or from the Solution property.

The query interface provides the following information:

<div class="contents" id="bkmrk-list-of-scenes-%2F-sce"><div class="textblock">- List of scenes / Scene by name iterating on elements of the list
- List of animations / Animation by name

</div></div>