Create drawings from models (Creo Elements/Direct Annotation) > Advanced topics > Customization for advanced users > Sketch functions
  
Sketch functions
The DOCU-REGISTER-SKETCH function and options
The DOCU-REGISTER-SKETCH function is used to register sketches to be available in the Creo Elements/Direct Annotation Registered Sketches table. Any valid MI file can be registered as a sketch, which can then be added to a drawing by selecting it from the table, accessed from the Load Sketch menu.
The registration functions can be included in the am_customize file or in a separate file. To load a file into Creo Elements/Direct Annotation, enter (load "path / filename") in the user input line, where path / filename is the file and its path containing valid DOCU-REGISTER-SKETCH functions.
You can also enter a DOCU-REGISTER-SKETCH function in the user input line. Be sure to use unique names for registered sketches; a registration with a duplicate name replaces the previous definition.
The DOCU-REGISTER-SKETCH function, its options, and related functions are listed below. See the individual links for information about them. An Example is given below.
Syntax
(DOCU-REGISTER-SKETCH --+---> OBJ-NAME option----->+--->
| ^
`---> FILE-NAME option---->'
DOCU-UNREGISTER-ALL-SKETCHES function
DOCU-UNREGISTER-SKETCH function
OBJ-NAME option
:OBJ-NAME specifies the name of the sketch by which it will be known in the Registered Sketches table. Specifying an already declared sketch name replaces the older registered sketch with the new one.
Syntax
-->(:OBJ-NAME)----->|"sketch name"|------->
FILE-NAME option
:FILE-NAME specifies the name of the file containing the registered sketch. You can specify any valid MI file, giving the full path and filename enclosed within double quotes.
Syntax
-->(:FILE-NAME)----->|"filename"|------->
DOCU-UNREGISTER-ALL-SKETCHES function
The DOCU-UNREGISTER-ALL-SKETCHES function de-registers all previously defined sketches. In the am_customize file (or in a separate file), use this function before new instances of DOCU-REGISTER-SKETCH if you do not want previously-registered sketches to be available.
DOCU-UNREGISTER-SKETCH function
The DOCU-UNREGISTER-SKETCH function de-registers a previously-defined sketch. You can specify any registered sketch name, enclosing it within double quotes.
Syntax
(DOCU-UNREGISTER-SKETCH "sketch name")
Example
The following is an example of a sketch registration:
(docu-register-sketch :obj-name "Table 5"
:file-name "/opt/drawing_data/tables/t5.mi"