The UModel API

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  UModel Programmer's Reference >

The UModel API

The COM-based API of UModel enables clients to easily access the functionality of UModel and automate a wide range of tasks.

 

UModel follows the common specifications for automation servers set out by Microsoft. It is possible to access the methods and properties of the UModel API from common development environments, such as those using C, C++, C# and Visual Basic, and with scripting languages like JavaScript and VBScript.

 

The following guidelines should be considered in your client code:

 

Do not hold references to objects in memory longer than you need them. If a user interacts between two calls of your client, then there is no guarantee that these references are still valid.
Be aware that if your client code crashes, instances of UModel may still remain in the system.
See Error handling for details of how to avoid annoying error messages.
Free references explicitly, if using languages such as C or C++. In C# and Visual Basic, GC.Collect() can be used to force garbage collection.
UModel API collections are zero-based. For example, the statement myPackage.InsertPackagedElementAt( 0, "Interface" ); will insert a new interface as first child of the package.

© 2019 Altova GmbH