Create drawings from models (Creo Elements/Direct Annotation) > Advanced topics > Customization for advanced users > View functions
  
View functions
You can customize the following areas of Creo Elements/Direct Annotation relating to views:
The DOCU-REGISTER-VIEW-PROFILE function and options
DOCU-REGISTER-VIEW-EXCEPTION-PROFILE Function and Options
DOCU-CLEAR-VIEW-PROFILES function and options
The SET-LAYOUT-OPTION-2D function
The LAYOUT-PROGRESS-ENABLE function
The DOCU-SET-MOVE-MODE-IN-SCALED-VIEWS function
The DOCU-REGISTER-VIEW-PROFILE function and options
When a new view is created, Creo Elements/Direct Modeling first classifies the view according to the view profile definitions as specified using docu-register-view-profile. Based on those profiles, it will derive a profile proposal. If the user accepts the profile, the settings in the view profile are applied for the new view.
The docu-register-view-profile function takes the options listed below. See the individual options for more information.
Syntax
(DOCU-REGISTER-VIEW-PROFILE --+--> NAME option----------------------------->+---->
| ^
|--> LABEL option--------------------------->|
| |
|--> MINIMUM-NUMBER-OF-PARTS and MAXIMUM-NUMBER-OF-PARTS option--------->|
| |
|--> MINIMUM-NUMBER-OF-PARTS and MAXIMUM-NUMBER-OF-PARTS option--------->|
| |
|--> UPDATE-MODE option--------------------->|
| |
|--> FACET-ACCURACY option------------------>|
| |
|--> ECONOFAST option----------------------->|
| |
|--> ASSOCIATIVITY-2D option---------------->|
| |
|--> UPDATE-VIEW-IMMEDIATELY option--------->|
| |
|--> REMOVE-SMALL-PARTS option-------------->|
| |
|--> REMOVE-LIBRARY-PARTS option------------>|
| |
|--> REMOVE-FULL-CIRCLES option------------->|
| |
|--> REMOVE-DUPLICATE-HIDDEN-LINES option--->|
| |
|--> THREAD-CREATION option----------------->|
| |
|--> CENTERLINE-CREATION option------------->|
| |
|--> SYMMETRYLINE-CREATION option----------->|
| |
|--> HIDDEN-LINE-VISIBLE option------------->|
| |
|--> TANGENT-LINE-VISIBLE option------------>|
Parameters :name and :label must be entered. All other parameters are optional and can be specified as required.
If the parameters :minimum-number-of-parts and :maximum-number-of-parts are not specified, the system will not choose this profile as a default profile. However, it's possible to select this profile from the profile drop-down box in the UI.
NAME option
:NAME defines the internal name of the profile. Enter any string containing alphanumeric characters and numbers.
LABEL option
:LABEL names the view profile as it appears on the UI. Enter any string name for the :label parameter.
MINIMUM-NUMBER-OF-PARTS and MAXIMUM-NUMBER-OF-PARTS option
:MINIMUM-NUMBER-OF-PARTS and MAXIMUM-NUMBER-OF-PARTS define the model size range for the specific view profile. When a new view is created, the system counts the number of parts which belong to the owner of the new view, and inquires a suitable profile. If more than one profile matches the model size, the system selects the profile which was defined last. To avoid ambiguities, range specification for multiple view profiles should not overlap.
The MAXIMUM-NUMBER-OF-PARTS value must be larger than or equal to the MINIMUM-NUMBER-OF-PARTS value.
UPDATE-MODE option
The suboptions below update the views using algorithms.
Syntax
-->(:UPDATE-MODE)--+-->:classic------------------->+-->
| ^
|-->:graphics------------------>|
Suboptions
The :classic option activates the classic view update method using a very precise algorithm. The :graphics option activates the graphical view update method using a faster but less precise algorithm.
FACET-ACCURACY option
Enter a keyword for any of the following.
Syntax
-->(:FACET-ACCURACY)--+-->:low------------------->+-->
| ^
|-->:medium---------------->|
| |
|-->:high------------------>|
| |
|-->:current--------------->|
Suboptions
The options :low, :medium and :high define different accuracies for the graphical update mode. "Low" accuracy is usually fastest, while "high" produces the most accurate results. To use the facet refinement values as currently defined for each part, use the :current option.
The setting is only evaluated if :update-mode is set to :graphics and directly influences the quality of the resulting 2D geometry.
ECONOFAST option
Syntax
-->(:ECONOFAST)--+-->:on------------------->+-->
| ^
|-->:off------------------>|
| |
|-->:default-------------->|
Suboptions
The :on option enables Econofast mode within the classic view update method. The :off option disables Econofast mode. Use :default to use the Econofast setting as defined in the view settings menu.
This setting is not evaluated if :update-mode is set to :graphics.
More information
Update modes
ASSOCIATIVITY-2D option
Syntax
-->(:ASSOCIATIVITY-2D)--+-->:full------------------->+-->
| ^
|-->:limited---------------->|
Suboptions
The :full option uses the full update mode. All geometry in the 2D view are classified and assigned an update color.
The :limited option only assigns colors to geometry added in 2D.
Advantage: The view is updated faster.
Disadvantage: After an update in :limited mode, the Upd Color option in Creo Elements/Direct Annotation's Show Settings menu has no effect for this view.
UPDATE-VIEW-IMMEDIATELY option
Syntax
-->(:UPDATE-VIEW-IMMEDIATELY)--+-->:on------------------->+-->
| ^
|-->:off------------------>|
| |
|-->'(:by_faces |number|)->|
Suboptions
When turned :on, the view geometry is calculated immediately after the new views have been positioned in the drawing. When :off, views have to be updated in a separate step.
The :by_faces option specifies a face threshold. Models with less faces than specified by this threshold will be updated immediately after placement. Models exceeding the face threshold must be updated in a separate step.
REMOVE-SMALL-PARTS option
Enter a number >=0 for the following syntax.
Syntax
-->(:REMOVE-SMALL-PARTS)--+--|number|--->+-->
Suboptions
When :remove-small-parts >0, Creo Elements/Direct Annotation automatically removes parts smaller than the provided percentage number. Think of the percentage as a ratio of a part's size and the view size.
When :remove-small-parts =0, all parts are displayed.
More information
Manage parts or workplanes in views
REMOVE-LIBRARY-PARTS option
Syntax
-->(:REMOVE-LIBRARY-PARTS--+-->:on------------------->+-->
| ^
|-->:off------------------>|
Suboptions
When turned :on, Creo Elements/Direct Modeling library parts are automatically removed. The :off option shows all parts.
More information
Manage parts or workplanes in views
REMOVE-FULL-CIRCLES option
Syntax
-->(:REMOVE-FULL-CIRCLES--+--|number|----------------->+-->
Enter a number >=0.
Suboptions
When remove-full-circles >0 , circles smaller than the provided percentage are automatically removed. Think of the percentage as the ratio of a circle's size and the view size.
When remove-full-circles =0, all circles are displayed.
REMOVE-DUPLICATE-HIDDEN-LINES option
This option applies to parts that are aligned one behind the other so that multiple lines coincide at the same position.
Syntax
-->:REMOVE-DUPLICATE-HIDDEN-LINES--+-->:on------------------->+-->
| ^
|-->:off------------------>|
Suboptions
The :on option creates only one line, and :off creates multiple coincident lines.
THREAD-CREATION option
Syntax
-->:THREAD-CREATION--+-->:on------------------->+-->
| ^
|-->:off------------------>|
| |
|-->:default-------------->|
| |
|-->:parent--------------->|
Suboptions
:on—creates thread lines.
:off—disables thread line creation.
:default—uses the global setting as defined in the View Settings menu.
:parent—for dependent views, use the setting as defined in the parent view; otherwise use the global setting as defined in the View Settings menu.
More information
Set the thread appearance
CENTERLINE-CREATION option
Syntax
-->:CENTERLINE-CREATION--+-->:on------------------->+-->
| ^
|-->:off------------------>|
| |
|-->:default-------------->|
| |
|-->:parent--------------->|
Suboptions
:on—creates centerline.
:off—disables centerline creation.
:default—uses the global setting as defined in the View Settings menu.
:parent—for dependent views, use the setting as defined in the parent view; otherwise use the global setting as defined in the View Settings menu.
More information
Set auxiliary geometry settings
SYMMETRYLINE-CREATION option
Syntax
-->:SYMMETRYLINE-CREATION--+-->:on------------------->+-->
| ^
|-->:off------------------>|
| |
|-->:default-------------->|
| |
|-->:parent--------------->|
Suboptions
:on—creates symmetry lines.
:off—disables symmetry line creation.
:default—uses the global setting as defined in the View Settings menu.
:parent—for dependent views, use the setting as defined in the parent view; otherwise use the global setting as defined in the View Settings menu.
More information
Set auxiliary geometry settings
HIDDEN-LINE-VISIBLE option
Syntax
-->:HIDDEN-LINE-VISIBLE--+-->:on------------------->+-->
| ^
|-->:off------------------>|
| |
|-->:default-------------->|
| |
|-->:parent--------------->|
Suboptions
:on—shows hidden lines.
:off—hides hidden lines.
:default—uses the global setting as defined in the View Settings menu.
:parent—for dependent views, use the setting as defined in the parent view; otherwise use the global setting as defined in the View Settings menu.
More information
Set the default drawing/view settings
TANGENT-LINE-VISIBLE option
Syntax
-->:TANGENT-LINE-VISIBLE--+-->:on------------------->+-->
| ^
|-->:off------------------>|
| |
|-->:default-------------->|
| |
|-->:parent--------------->|
Suboptions
:on—shows tangent lines.
:off—hides tangent lines.
:default—uses the global setting as defined in the View Settings menu.
:parent—for dependent views, use the setting as defined in the parent view; otherwise use the global setting as defined in the View Settings menu.
More information
Set the default drawing/view settings
DOCU-REGISTER-VIEW-EXCEPTION-PROFILE Function and Options
The docu-register-view-exception-profile function defines an exception profile. When a new view is created,Creo Elements/Direct Modeling first classifies a view according to the view profile definitions as specified using docu-register-view-profile. Based on those profiles, it will derive a profile proposal.
After this first phase, Creo Elements/Direct Modeling searches the list of exception profiles that are defined using docu-register-view-exception-profile. Using exception profiles, the values derived from the standard view profiles can be overridden for certain view types.
For example, Creo Elements/Direct Modeling ships with an exception profile for isometric (general) views which disables automatic center/symmetry line generation for all model sizes - automatic center/symmetry lines usually do not make any sense for this view type.
(DOCU-REGISTER-VIEW-EXCEPTION --+--> NAME option----------------------------->+---->
| ^
|--> LABEL option---------------------------->|
| |
|--> VIEW-TYPE option------------------------>|
| |
|--> MINIMUM-NUMBER-OF-PARTS and MAXIMUM-NUMBER-OF-PARTS option---------->|
| |
|--> MINIMUM-NUMBER-OF-PARTS and MAXIMUM-NUMBER-OF-PARTS option---------->|
| |
|--> UPDATE-MODE option---------------------->|
| |
|--> FACET-ACCURACY option------------------->|
| |
|--> ECONOFAST option------------------------>|
| |
|--> ASSOCIATIVITY-2D option----------------->|
| |
|--> UPDATE-VIEW-IMMEDIATELY option---------->|
| |
|--> REMOVE-SMALL-PARTS option--------------->|
| |
|--> REMOVE-LIBRARY-PARTS option------------->|
| |
|--> REMOVE-FULL-CIRCLES option-------------->|
| |
|--> REMOVE-DUPLICATE-HIDDEN-LINES option---->|
| |
|--> THREAD-CREATION option------------------>|
| |
|--> CENTERLINE-CREATION option-------------->|
| |
|--> SYMMETRYLINE-CREATION option------------>|
| |
|--> HIDDEN-LINE-VISIBLE option-------------->|
| |
|--> TANGENT-LINE-VISIBLE option------------->|
Parameters :name, :label and :view-type must be entered. All other parameters are optional and can be specified as required.
The docu-register-exception-profile function uses the same parameters as The DOCU-REGISTER-VIEW-PROFILE function and options. There is one additional parameter, which is view-type.
VIEW-TYPE option
Syntax
-->:VIEW-TYPE--+-->:all------------------->+-->
| ^
|-->:standard-------------->|
| |
|-->:section--------------->|
| |
|-->:detail---------------->|
| |
|-->:general--------------->|
Suboptions
Enter a keyword or a list of keywords for the :view-type option (for example, list :detail :section).
:all is for all view types.
:standard is for standard views only.
:section is for all section view types (normal section, aligned section and section surface).
:detail is for detail and partial views.
:general is for isometric, exploded and general views.
DOCU-CLEAR-VIEW-PROFILES function and options
The docu-clear-view-profiles function resets all previously defined profiles. If you want to redefine the factory view profiles in your local am_customize file, call docu-clear-view-profiles before defining your own profiles using docu-register-view-profile and/or docu-register-view-exception-profile. Do not call docu-clear-view-profile if you only want to add profiles to the previously defined ones.
Syntax
None.
The SET-LAYOUT-OPTION-2D function
The SET-LAYOUT-OPTION-2D function can be used to set the accuracy of the view updates. Update accuracy is the accuracy to which freeform curves are approximated as 2D curves, the intersections of which are calculated. Freeform curves are essentially projected section curves and silhouettes.
The advantages of setting a lower update accuracy are the following:
Memory requirements during calculation are reduced.
The update calculation performance is improved.
The size of the drawing file is reduced.
Update accuracy has a major influence on the calculation time for freeform models but less influence on updating analytical geometry.
The default update accuracy setting corresponds to part accuracy. Where there are assemblies with parts of different accuracy, the lowest accuracy becomes the overall update accuracy.
Additionally, this function specifies how to handle hidden hatches and hidden lines.
Syntax
(SET-LAYOUT-OPTION-2D :RESOLUTIONn
:SUPPRESS-HIDDEN-TANGENT 1
:IGNORE-DUPLICATE-EDGES-IF-HIDDEN (level) )
Options
:RESOLUTION specifies the update accuracy as a number n, which must be in the range 10E-02 to 10E-06 (for example, 0.001) up to part accuracy.
:SUPPRESS-HIDDEN-TANGENT suppresses hidden tangent lines, if hidden lines and tangent lines are switched on.
:IGNORE-DUPLICATE-EDGES-iF-HIDDEN level controls the generation of special hidden lines - see Note: Duplicate Edges below.
* 
Duplicate Edges
Creo Elements/Direct Annotation sometimes generates hidden lines behind visible lines even if the user chooses to make hidden lines invisible during updates. This is required to retain a complete and clean part structure for users who want to add manual changes in Creo Elements/Direct Drafting.
If visible lines and hidden lines are drawn at the same position however, the hidden lines may be drawn on top of the visible ones. The switch (set-layout-option-2d :ignore-duplicate-edges-if-hidden level) controls the generation of those special hidden edges. It can be used to suppress hidden edges according to the value of the level parameter, which is a bit-field in which each bit enables or disables certain modes as follows:
If bit 0 of level is set, duplicate hidden edges of visible edges are generated, if hatch features are attached to them.
Example: (set-layout-option-2d :ignore-duplicate-edges-if-hidden (+ 1 8))
If bit 1 of level is set, duplicate hidden edges of visible edges are generated, if thread features are attached to them.
Example: (set-layout-option-2d :ignore-duplicate-edges-if-hidden (+ 2 8))
If bit 2 of level is set, all duplicate hidden edges of visible edges are reconstructed.
Example: (set-layout-option-2d :ignore-duplicate-edges-if-hidden (+ 4 8))
If bit 3 of level is set, all duplicate hidden edges of hidden edges are reconstructed; otherwise bit 0, bit 1, and bit 2 apply also to hidden edges.
Example: (set-layout-option-2d :ignore-duplicate-edges-if-hidden (+ 4 8))
If bit 10 of level is set, every duplicated hidden edge is drawn with the same setting (linetype, etc.) as its closest edge.
Example: (set-layout-option-2d :ignore-duplicate-edges-if-hidden (+ 4 8 1024))
If level is 0, no duplicate hidden edge is reconstructed.
Example: (set-layout-option-2d :ignore-duplicate-edges-if-hidden 0)
In order to set level, just start with level equal 0, and add 1 for bit 0, 2 for bit 1, 4 for bit 2, 8 for bit 3, and 1024 for bit 10, and then enter (set-layout-option-2d :ignore-duplicate-edges-if-hidden level).
The default value for level is 1036 (=4 + 8 + 1024), i.e. all duplicate hidden edges are reconstructed, and they are drawn with the same setting as their closest edge.
The LAYOUT-PROGRESS-ENABLE function
The LAYOUT-PROGRESS-ENABLE function sets the number of seconds between update steps of the update process indicator:
Update Process Indicator
Syntax
(ELAN::LAYOUT-PROGRESS-ENABLEn)
Options
Specify a non-negative integer value for the seconds between the steps.
The DOCU-SET-MOVE-MODE-IN-SCALED-VIEWS function
When you move elements owned by a view, you can select the options horizontal or vertical and enter an offset for the move. If the elements to be moved have been scaled, the offset value you enter is scaled by the same factor. The DOCU-SET-MOVE-MODE-IN-SCALED-VIEWS function can be used to switch off this scaling.
Note that the offset value is only scaled when the selected elements belong to views all having the same scaling. For example, moving elements horizontally by 20 mm has the following result:
With scaling (the default behavior), the selected elements are moved:
20 relative to the view scale factor, if all of the elements belong to views with the same scale;
20 mm absolutely, if elements belong to views with different scales.
Without scaling, all elements are moved 20 mm absolutely.
Syntax
(DOCU-SET-MOVE-MODE-IN-SCALED-VIEWS :COMMONor:UNSCALED )
Options
:COMMON retains the view elements' scaling in a move offset operation.
:UNSCALED does not scale move offset values.