The COM-based API of UModel enables clients to easily access the functionality of UModel and automate a wide range of tasks.
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