[Previous Page] [Next Page] [Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]

Best Practices

Table of Contents

Introduction

The following chapters include documentation about some Best Practices coming from users of the Creo Elements/Direct Modeling Integration Kit.

This is by no means complete, however it provides some of the most important things to know.

Avoiding Lisp Garbage Collection

The Hourglass in Creo Elements/Direct Modeling indicates a Lisp feature called Garbage Collection.

Garbage collection occurs when the Lisp system is cleaning up its internal memory. Memory cells not used any more are the freed and returned to the system.

Garbage collection in Creo Elements/Direct Modeling can be reduced by

Debugging a User Defined Command

The normal Lisp debugging features are insufficient for troubleshooting User Defined Commands. Creo Elements/Direct Modeling provides an internal debugging mechanism for tracing the internal workings of a User Defined Command.

The tracing mechanism can only be used with interpreted User Defined Commands; the tracing code is removed when dialogs are compiled.

A traced User Defined Command will print the following information whenever a local function is entered:

The predefined Creo Elements/Direct Modeling commands are all compiled and will not print tracing information.

Arrow up Reference Manual

The Undo System in a User Defined Command

Using the Dialog Generator the programmer doesn't need to care about the Undo system. This is handled by the Dialog Generator.

It creates one Undo step per User Defined Command independent of the number of internally call commands. The only exception is, when no internal command is called that would modify the system.

Within a User Defined Command, the programmer can manage Undo states. The Creo Elements/Direct Modeling Integration Toolkit therefor provides functions to set and to jump to internal Undo states

* Tutorial Example * Reference Manual

Check for Active Licenses in a User Defined Command

Creo Elements/Direct Modeling commands cannot be called without having having a valid license. The following example shows how you can pre-check the availability of these licenses.

* Tutorial Example

Creating Your Own Lisp Package

Common Lisp provides packages to separate different applications within the Lisp system. Please see the recommended Lisp documentation for details.

All Creo Elements/Direct Modeling Integration Kit functionality is accessible from the :OLI package. We recommend, that you put your custom applications in own packages.

An example Creo Elements/Direct Modeling Integration Kit Lisp file will therefore start with

  (in-package :my-package)
  (use-package :oli)
[Previous Page] [Next Page] [Integration Kit Contents] [Integration Kit What's New] [Integration Kit Function Index] [More Documentation] [PTC]
© 2024 Parametric Technology GmbH
(a subsidiary of PTC Inc.), All Rights Reserved