Creating an Object Definition
An object is the basic building block of all of the symbolic content contained in a document. After an Object Module has been created and a namespace has been defined, object definitions can be added.
To add an object definition to an Object Module:
- Open or create an Object Module from the Document Explorer. Create a namespace if necessary. See Creating an Object Module for details.
- Highlight the namespace object and press Ctrl + Enter, or right-click inside the namespace object and select Insert object from the context menu.
- Name the object. In the example below, the object is named MyAbsValue. An object name must begin with a letter and cannot contain spaces.
- The default type definition for a new object is Object. You can change the type
definition by editing this expression in the same way you would edit any other expression.
For example, to set the type definition to be Real → Real, the steps would be:
- Highlight the type definition and press the spacebar to create an empty box.
- Type To into the box to open the autocomplete pop-up, select the To object, and press the Enter key.
- Type "real" again and select Real from the autocomplete popup.
- Repeat this procedure as needed if the object definition needs to have additional parameters.
- A description can help when referring back to objects or when other users refer to object definitions. To add a description, right-click the object and select Add description from the context menu. The description does not affect functionality. To delete the description, delete the description content and press the Enter key.
- Add rendering(s) if needed. See Creating a New Rendering
To add an additional object, highlight the existing object and press the Insert key to add an object above the existing object or press the Enter key to add an object below the existing object.
Note that if a new object is given the name of an existing object, the new object will be created as an extension of the existing object. The definition will list the file that contains the original object definition and any other files that already contain an extension. Double-click an extension to open that definition. If an object with the same name has been defined in multiple locations, all file locations will be listed. An example of an object that lists extensions can be seen here: