External Reference Files

Reference files can be read in two ways. In order to read the supported elements stored in reference files, the keyword READ_XREF_FILES has to be set to yes. The default is no. For this method of reading the following is true: All the reference files inherit the working units and offsets from the parent file and their respective units and offsets are ignored. The V8 reader can read both v7 and v8 attachments, whereas V7 will read only V7 references. Both V7 and V8 can read nested references. The nesting can be restricted to first level only by setting the keyword READ_XREF_UPTO_FIRST_LVL as true.

Alternatively or in addition, when the keyword READ_XREFS_AS_ELEMENTS is set to yes, the V8 reader is able to read reference files as individual features with an igds_type of igds_xref. These features are a non-graphical representation of the XREF elements themselves, not the elements stored within the referenced files.

An external reference file is referred to by a path. If the V8 reader is unable to find a reference file at the path that is stored, it will make a secondary check for a file of the same name in the same folder as the source dataset, which may then be read as the reference file. The value of the igds_xref_file_path attribute reflects the path that is actually used, not the path that was stored. In contrast, the igds_linkage{}.string attribute, which generally exists for external reference file elements, is not altered on read, and will reflect the path which is stored in the file, regardless of whether it exists.

The V8 writer is able to create external reference elements in two ways. When the V8 writer uses a seed file, the external reference file elements in the seed file are preserved and put into the destination dataset. Additionally, when features with an igds_type of igds_xref are given to the V8 writer, it will create an XREF element to establish an external reference for the destination dataset. If the same external reference file is to be created by both a feature and the seed file, the V8 writer will prefer the element from the seed file.

An external reference element has the attributes shown below.

Attribute Name

Contents

igds_xref_camera_focal_len

The focal length value for the camera used for the view of the external file reference data.

Range: Real Number

Default: 0.0

igds_xref_camera_pos_x

The position in the x dimension for the camera used for the view of the external reference file data.

Range: Real Number

Default: 0.0

igds_xref_camera_pos_y

The position in the y dimension for the camera used for the view of the external reference file data.

Range: Real Number

Default: 0.0

igds_xref_camera_pos_z

The position in the z dimension for the camera used for the view of the external reference file data.

Range: Real Number

Default: 0.0

igds_xref_desc

The description of the external reference file.

Range: String

Default: No default

igds_xref_file_build_opts

The file builder option mask for the external reference file.

Range: Integer

Default: 15

igds_xref_file_disp_opts

The file displayer option mask for the external reference file.

Range: Integer

Default: 73858

igds_xref_file_name

The filename of the external reference file. This is a basename and extension, not a path.

This attribute is also added to elements read from external reference files, to identify their source file.

Range: String

Default: No default

igds_xref_file_num

The file number for the external reference file.

Range: Integer

Default: 1

igds_xref_group_id

The number of the group to which this external reference file belongs.

Range: Integer

Default: 0

igds_xref_master_origin_x

The x dimension value for the origin of the external reference file position in master file UORs.

Range: Real Number

Default: 0.0

igds_xref_master_origin_y

The y dimension value for the origin of the external reference file position in master file UORs.

Range: Real Number

Default: 0.0

igds_xref_master_origin_z

The z dimension value for the origin of the external reference file position in master file UORs.

Range: Real Number

Default: 0.0

igds_xref_model_name

The name of the model of the external reference file. This value may be empty for the default model.

Range: String

Default: No default

igds_xref_name

The logical name of the external reference file. This value may distinguish between multiple references to the same reference file.

Range: String

Default: No default

igds_xref_nest_depth

The depth of nested reference of the external reference file.

Range: 0..65536

Default: 0

igds_xref_parent_attach_id

The id of the parent attachment of the external reference file.

Range: Numeric string

Default: “0”

igds_xref_file_path

The file path of the external reference file.

This attribute is also added to elements read from external reference files, to identify their source file.

Range: String

Default: No default

igds_xref_reference_origin_x

The x dimension value for the origin of the external reference file position in reference UORs.

Range: Real Number

Default: 0.0

igds_xref_reference_origin_y

The y dimension value for the origin of the external reference file position in reference UORs.

Range: Real Number

Default: 0.0

igds_xref_reference_origin_z

The z dimension value for the origin of the external reference file position in reference UORs.

Range: Real Number

Default: 0.0

igds_xref_rotation

The rotation value for the external reference file.

Range: Real Number

Default: 0.0

igds_xref_scale

The conversion factor value for the external reference file.

Range: Real Number

Default: 1.0

igds_xref_version

The version number value for the external reference file.

Range: Integer

Default: 1

igds_xref_z_back

The back z clip value for the external reference file.

Range: Real Number

Default: 0.0

igds_xref_z_front

The front z clip value for the external reference file.

Range: Real Number

Default: 0.0