What You Need to Know About Generative View Styles  

  This section deals with the following subjects:

About Generative View Styles

  Generative view styles let you customize the appearance and behavior of a generated view via a set of pre-defined parameters and options.

Administrators can create one or several generative view styles from which users can choose when creating a generative view.

Generative view styles are defined in an XML file.

 

Some workbenches (such as Structure Design or Generative Shape Design) also offer the possibility of configuring generative view styles. These styles will be specific to views generated from this workbench, and will specify the appearance of the geometry to be generated.  To know if a given workbench supports generative view styles, either refer to its documentation or to Setting Generative View Style Parameters.

 

Managing Generative View Styles

 

One generative view style per view

When you create a view using a generative view style, you specify the XML file that will be associated with this view. Within a drawing, you can only associate one generative view style to a given view, but you can use several generative view style files by associating different files to different views.

 

Standalone drawings

The values of the parameters in the specified XML file are embedded into the CATDrawing document when a generative view style is applied to a view. Each drawing contains an embedded copy of the generative view style(s) it uses. The drawing is therefore standalone. This makes it possible for users, projects, or companies to exchange CATDrawing documents without needing to send the generative view style file along.

 

Administrator-controlled access and modification

The administrator defines and controls the location of the generative view style files as well as the ability to modify existing ones. For example, the administrator can define a single generative view style, and prevent users from modifying it. 

Administrator-controlled authorized styles

The administrator defines the list of authorized generative view styles, in the Drafting standards XML file.

A generative view style file available by default

By default, a pre-defined generative view style file is delivered. This file is located in install_root/resources/standard/generativeparameters/DefaultGenerativeStyle.xml.

Administrators can customize this file to define their default generative view styles. They can also use this file as a template for creating new generative view styles.

They can add as many generative view style files as needed. Refer to Administering Generative View Styles for more information.

 

Do not delete the DefaultGenerativeStyle.xml file: it contains all generative view style parameters. Furthermore, it is used as a default if a parameter happens to be missing from a custom view style file (in this case, the corresponding parameter defined in DefaultGenerativeStyle.xml will be used instead). In case the DefaultGenerativeStyle.xml file cannot be found, then the application will use its own default parameter instead.
 

Editing the generative view style file

The generative view style files can be edited using an interactive editor. This editor provides an easy-to-use graphic interface to let you customize the parameters included in the generative view style file. For information on how to customize the parameters included in the generative view style file, refer to Setting Generative View Style Parameters.

The interactive editor is available in Tools > Standards. (It is the same editor with which you can customize the Drafting standards). For more information on how to use this editor, refer to the Customizing Standards chapter in the Infrastructure User's Guide.

 

Make sure you use the Standards editor available in Tools > Standards when modifying and customizing the XML generative view style files. Using other editors (such as text editors) may alter the consistency of the generative view style XML files, and may make them unusable.

 

 

Import of a newer version of a generative view style file

Once a generative view style has been assigned to a view, it is embedded into the drawing. This means that if you update the generative view style file that was used to create the view, the style of the view itself will not be modified and will remain as it was when the view was created.

To modify the style used by the view, you need to import the newer version of the generative view style XML file into the drawing. To do so, select Tools > Import a generative view style. In the dialog box which is displayed, select the generative view style to import and click OK

Note the following points:

  • The newer, imported generative view style will completely override the older version of the generative view style in all views which use this generative view style.
  • If the drawing contains views which use other generative view styles, these views will not be affected by the import.

Importing a newer version of a given generative view style file will be useful to ensure that views created on a previous release using the generative view styles provided by default with the application benefit from the new styles parameters that were added in the latest release.

 

To sum-up

A view with a generative view style is created according to the following procedure:

  1. You create View 1 using the generative view style defined in Style1.xml.

  2. As a consequence, Style1.xml is embedded into the drawing.

  3. Then, when a given parameter cannot be retrieved from Style1.xml, DefaultGenerativestyle.xml is embedded into the drawing.

  4. Finally, the missing parameter is retrieved from DefaultGenerativestyle.xml

If a given parameter cannot be retrieved from the default xml file, a pre-defined and non modifiable value is used instead.
 

 

  Import of a generative view file is as follows:
  1. View 1 has been created using the generative view style defined in Style1.xml that was embedded into the drawing.

  2. You import External Style1.xml and the current xml file is removed.

  3. As a consequence View1 refers to imported Style1.xml.

 

Using Generative View Styles

 

Creating views using generative view styles

When generating a view from the 3D, users can choose to use one of the styles defined by the administrator. Refer to Creating Views Using Generative View Styles.

Switching a view to another generative view style

Once a view has been created using a specific generative view style, it is possible to switch this view to another view style. Refer to Switching a View to Another Generative View Style.

Applying the generative style of a view to another view

You can apply the generative view style used to create a given view to another view. Refer to Applying the Generative Style of a View to Another View.

Applying a generative view style to a view

You can apply a generative view style to a view which was created without one. Refer to Applying a Generative View Style to a View After its Creation.