DGKC Control Documentation


Skip Navigation Links.
Start page
Quick Start
Search Page
Installation
What is new
Licensing
Expand ModelsModels
Collapse DG Kernel ControlDG Kernel Control
Expand API ReferenceAPI Reference
Expand Samples and TutorialsSamples and Tutorials
Expand GraphicsGraphics
Expand Math ObjectsMath Objects
Expand DeprecatedDeprecated
Redistribution
Model Viewer
Support
Skip Navigation LinksHome Page > DG Kernel Control > Programmatic Functionality > Generator Go to ActiveX docs Search Documentation


Object Generator

Object Generator is an object, which allow creation of other new objects. Object Generator is a sort of "new" operator similar to one of C#.

Using Object Generator

Object Generator implements IObjectGenerator_DG interface, which can be queried from IModel_DG, from IGlobalAPI_DG or from a standalone object as described in the Advanced section below.

IObjectGenerator_DG.Createethod can be used to create new instances of objects. See details for types of available objects.

Advanced

To create a standalone instance of the Object Generator construct and instance of public DgApi class from DGKC namespace. Its IObjectGenerator_DG can be obtained via call to IObjectGenerator_DG DgApi.GetGenerator() like:

         DgApi api = new DgApi();
        gen = api.GetGenerator();
        IModel_DG iModel = gen.Create();   // Use the generator

See Console.Init() in Console sample for a debuggable example.

See also Object Array sample.