NAME

exp2ddf − create a ddf file from EXPRESS file

SYNOPSIS

exp2ddf [−option] EXPRESS_file [<schema_name> <ddf_file>]

DESCRIPTION

exp2ddf reads an EXPRESS file[s] and writes out a new DDF file that is created by extracting the Entity mappings from the EXPRESS schemas. The EXPRESS schemas are actually checked for syntax and semantic correctness prior to the DDF file generation. This "checking" will generate warnings (non-fatal) and errors (fatal). A DDF file will not be generated if "errors" exist.

EXPRESS_file

Specifies the name of the file that contains the EXPRESS schemas. This argument is required and must follow the optional arguments.

schema_name

Name of the schema of interest in the EXPRESS file. An EXPRESS file may have multiple schemas in it. If the EXPRESS schema_name is not specified, it will default to the first schema within the EXPRESS_file. However, all EXPRESS schemas in the file will be checked for syntax and semantics.

A schema_name is required if ddf_file will be specified.

ddf_file

Name of the ddf_file to create. If not specified, the file name for ddf_file will be derived from the EXPRESS_file name. Thus if the EXPRESS_file name is p203is.exp, the default ddf_file name will be p203is.ddf.

If a ddf file already exists with the same name as ddf_file, it will be overwritten.

If MS-DOS compatibility is a requirement, this filename should not exceed six characters in length.

When the −c option is specified, no ddf will be generated.

The generation of the DDF will normally include the Standard Part 21 Header Section Entities. However, these entities can be overridden if desired (see the −h option).

Support for user defined entities is also provided. This is done by specifying additional EXPRESS files that contain the entities which you would like supported. These EXPRESS files must contain a full EXPRESS schema. An example of a part21_user_def_data_schema follows:

	SCHEMA p21_user_def_data_schema;
	ENTITY user_def_data;
  	   attr1 : INTEGER;
	END_ENTITY;
	END_SCHEMA;

If you have specified a new schema for the Header section or a schema for the User defined entities, then the line numbers in the error/warning messages for those schemas will not match up. In order to compile all of the input filenames together, a temporary file has been created, with the Header Section and the User defined entities appended to the input Data Section Schema. This temporary file is deleted upon termination.

The first occurrence of an attribute name will not be modified. The second occurrence of an attribute name gets the entity name that declared the attribute as a prefix to the attribute name. A pair of underscores is used to seperate the entity name and the attribute name.

      entity 8016:0  cartesian_transformation_operator_3d
      supers = (8014:0 /* cartesian_transformation_operator */ )
      {  
         $STEP_HEADER;
         vstring name;
         vstring functionally_defined_transformation__name;
         vstring description;
                                
      }

Individual EXPRESS files can be "checked" without generating a ddf file by using the −c option.

During the parsing and reference resolution passes, exp2ddf detects any problems with the input schema. These problems are reported to the user, subject to the controls imposed by any −w and −i options. If no errors are encountered, exp2ddf proceeds to the output phase. It writes a new ddf file containing the specified schema to the output file. After writing its output to this file, exp2ddf promptly exits.

The −w and −i options are used to enable or disable various categories of warning messages. These options are processed left-to-right, with later options overriding earlier ones. Any number of these options may appear in any order.

Each warning/error will have a associated line number. If you have specified a new schema for the Header section or a schema for the User defined entities, than the line numbers for those schemas will not match up. In order to compile all of the input filenames together, a temporary file has been created, with the Header Section and the User defined entities appended to the input Data Section Schema. This temporary file is deleted upon termination.

OPTIONS

−c

Check the EXPRESS, but do not generate a ddf file.

−hfilename

Override standard Header Schema. The filename must contain compilable EXPRESS. The standard Part 21 Header entities will be replaced by whatever entities exist in the specified filename. The EXPRESS schema name must be "header_section_schema" in order to be processed.

−ufilename

User defined Data section entities. The filename is the name of a compilable EXPRESS schema. The entities defined in the EXPRESS will be added to the ddf. The EXPRESS schema name must be "p21_user_def_data_schema" in order to be processed.

−Hfilename

User defined Header section entities. The filename is the name of a compilable EXPRESS schema. The entities defined in the EXPRESS will be added to the ddf. The EXPRESS schema name must be "p21_user_def_header_schema" in order to be processed.

levels.−w|-iWarning

Either "all", "none", "circular_subtype", "entity_as_type", "unknown_subtype"

−p<object_type>

Where <object_type> is one or more of: e entity p procedure r rule f function t type s schema or file # pass # E everything (all of the above)

−Sshort_names_file

Each STEP Application Protocol (AP) is distributed with a Annex B. This annex contains the long to short name mappings. The short names are used in the Part 21 file in place of the long names to reduce the size of the file. The file format is one entry per line: short_name, longname. The short_names that are distributed (by NIST) are 6 characters or less. A Short name file will have the following format:

ACTION, ACTION
ACTASS, ACTION_ASSIGNMENT
ACTEXC, ACTION_EXECUTION
ACTMTH, ACTION_METHOD
ACRQAS, ACTION_REQUEST_ASSIGNMENT

The inclusion of short_names into your application will have no affect other than during parsing and formatting.

−D

The compiler can be invoked to create a file that is needed by the SDAI Interface. When this option is specified, a C source code file is created that will have the name sdaiLoad_<schema_name>.c. This C file contains additional information about the EXPRESS entities that is not normally carried by the DDF. This option has no affect on the generated ddf file.

SEE ALSO

STEP/Lib User's Guide, EXPRESS to DDF Mappings, ddc(1)