Description

EXPRESS-G is a standard graphical notation for information models. It is a useful companion to the EXPRESS language for displaying entity and type definitions, relationships and cardinality. For information on the EXPRESS-G notation, consult Annex B of the EXPRESS Language Reference Manual (ISO 10303-11)

The EXPRESS information models within STEP application protocols can become quite complex. EXPRESS-G diagrams help you master this complexity. With the tools described below, you can convert EXPRESS text to EXPRESS-G diagrams, view and edit them with a visual editor, and print them on any PostScript® or HP-GL based printer/plotter. We have the following EXPRESS-G utilities:

Why EXPRESS-G?

EXPRESS-G diagrams are an aid for understanding large information models. The diagrams show relationships and structure more clearly than the plain EXPRESS text.

The expgedit visual editor provides interactive access to diagrams. The expg2ps tool generates output that can be printed on any PostScript compatible printer, and expg2hpgl generates output that can be plotted by any HP-GL based plotter.

All of these tools operate on EXPRESS-G diagrams generated by the express2expg tool. This tool produces diagrams from plain EXPRESS text. The diagram layout is usually good enough to be used without modification, so you can simply regenerate the EXPRESS-G diagrams when you want to view changes to the original EXPRESS text.

The expgupdate program is a powerful tool for dealing with changes in your schema. This tool will preserve your investment in arranging your EXPRESS-G document when the underlying EXPRESS text changes.

The expgdiff tool can highlight any similarities and/or differences between two EXPRESS-G schemas. In many ways it is similar to a UNIX diff that knows about the syntax of EXPRESS.

In some situations, you may wish to improve upon the default layout, such as by arranging objects onto a few pages for printing. Use the expgedit editor to arrange the definitions as needed. Using the light gray lines on the screen as page guides, move a box by clicking and holding down the first (left most) mouse button. If you double click with the first mouse button it will also select any attached boxes. It is also possible to drag out a selection box, and everything that touches the box will then be selected. The shift key in cooperation with the mouse allows you to modify the current selection.

When you are done, save your changes using the "save" button. You can print your diagram from the editor on the Windows platform. On UNIX, you can use expg2ps to generate PostScript that can be piped to the UNIX lpr utility.

Examples

The following example uses the tools to view and print an EXPRESS information model. We will use the command line versions of the tools, although you may use them from the Windows Start Menu. We will look at AP203, one of the standard STEP information models.

  1. As with all of the STEP Tools utilities, make sure the environment variable $ROSE is set to the STEP Tools install directory, and that $ROSE_BIN is in your search path. Consult the release notes for details.
  2. Generate the EXPRESS-G diagrams from your EXPRESS text with the diagram layout tool:
  3.     % express2expg p203.exp
    
  4. View the diagrams with the expgedit editor.
  5.     % expgedit p203.exg
    
  6. If you would like a wall-mounted copy of the schema for your office, print the diagrams. Please note that the printout will be over 100 pages long. On Windows, you can print directly from expgedit. On UNIX, use one of the print filters. In this example, we will print to a PostScript printer using expg2ps and lpr. If you have a plotter, you may wish to use the expg2hpgl tool instead.
  7.     % expg2ps p203.exg | lpr
    

    The following example shows how one would use these tools to compare two different versions of an EXPRESS text file, using expgdiff. In this case, we will look at university and univ-extend.

  8. Generate EXPRESS-G diagrams using the layout engine.
  9.     % express2expg university.exp
        % express2expg univ-extend.exp
    
  10. You may want to view the diagrams with the expgedit editor at this point.
  11.     % expgedit university.exg univ-extend.exg
    
  12. Compare the two EXPRESS-G documents using expgdiff. If you want to see what entities, and types the diff tool correlates you can add the -verbose option as well.
  13.     % expgdiff university.exg univ-extend.exg
    
  14. Now view the diagrams again with the expgedit editor. You should now see that almost all of university.exg is highlighted, and all of the corresponding entities in univ-extend are also highlighted.
  15.     % expgedit university.exg univ-extend.exg
    
  16. Now repeat using the STEP information models p203.exp, and p42.exp.

The following example shows how to carry over changes from an older version of an EXPRESS file to a new version, using expgupdate. In this case, we will look at university and univ-extend.

  1. Generate the EXPRESS-G diagrams from your EXPRESS text with the express2expg tool:
  2.     % express2expg university.exp
        % express2expg univ-extend.exp
    
  3. At this point you may wish to view the diagrams with expgedit.
  4.     % expgedit university.exg univ-extend.exg
    
  5. Now we will update the university EXPRESS-G diagram with the univ-extend EXPRESS, using expgupdate. If you want to see what entities, and types the tool correlates you can add the -verbose option as well.
  6.     % expgupdate university.exg univ-extend.exg
    
  7. View the diagrams again with the expgedit editor. The most noticeable change is that 'student' and 'course' have been moved up to where they were located in the university EXPRESS-G document.
  8.     % expgedit university.exg univ-extend.exg
    

The following example shows how to use the working set option of express2expg to make large EXPRESS schemas easier to understand. The working set option selects a subset of the schema for processing. This selection is made by a simple text file that contains the entities that you are interested in working with. These entities and all of the entities above them in the inheritance hierarchy are automatically pulled into the EXPRESS-G diagram. Any references to objects not in the current working set are replaced with inter-schema references.

  1. Create a working set file for Part-42. Use any entities you wish, but two interesting ones are: b_spline_surface_with_knots, and quasi_uniform_surface. Create a file with the names of some entities you are interested in. Put each name on a separate line. Refer to Customizing Output with a Working Set File for more information about working set syntax.
  2. Generate the EXPRESS-G diagram from your EXPRESS text using the working set file created above.
  3.     % express2expg -workingset my_entity_names part-42.exp
    
  4. Now view the diagram with the expgedit editor.
  5.     % expgedit part-42.exg