Appendix: XML Configuration File Format - Intergraph Smart Isometrics I-View CAD - Help - Hexagon PPM

Smart Isometrics I-View CAD Help

Language
English
Product
Intergraph Smart Isometrics I-View CAD
Search by Category
Help

Working in conjunction with the options on the Drawing tab, the configuration file option enables you to exercise control over the layers, colors, flange thickness, and OD data the software uses for the graphical display of the pipe and components in the output model.

  • Use caution when editing an XML file in a text editor. We recommend that you view the .xml file in Internet Explorer any time you edit the file contents. If the file contains an error, such as a missing angle bracket (< or >), Internet Explorer reports the error.

  • Comments are optional. If you include comments in the XML file, you must type them inside comment tags (for example, <!-- My comment -->.

The configuration file contains blocks of XML statements that provide instructions to I-View CAD for configuring specific parts of the model. In XML terminology, data is organized into a series of elements. An element is a series of text and child statements, with each element delineated by start and end tags enclosed in angle brackets (< ... >). An example of the basic syntax is shown below.

<I-View_CAD_Configuration>
   <Version Major="2" Minor="0" Revision="0"/>
   <Symbols>
      ...
   </Symbols>
   <Graphics>
      ...
   </Graphics>
   <ExternalDimensions>
   </ExternalDimensions>
</I-View_CAD_Configuration>

Using the tagging mechanism

The Graphics and ExternalDimensions sections use a generic tagging mechanism to specify the colors, layers, and levels to use for components and the outside dimensions for component parts. The configuration data describes the object aspect, criteria against which the object is tested, and tags to apply if the criteria are matched. The data is grouped within the following entities:

  • Aspect specifies how to choose components.

  • Lookup specifies which components to choose.

  • Tag sets the colors and levels.

I-View CAD provides the objects (such as, components) for tagging, and then uses the tags in further processing. The overall structure of the Graphics and ExternalDimensions sections is the same. The section entity contains a set of Aspect entities. These entities define the object aspects to use in the matching process. The Aspect entity is followed by a hierarchical structure composed of Lookup and Tag entities that describe how objects are matched and how tags are assigned.

Aspects

An Aspect definition includes the following three attributes:

  • Name is a simple string the software uses to refer to the aspect in lookups.

  • Expression describes how to determine the value of the aspect for a specific object.

  • MatchType specifies how to evaluate the lookup criteria for the aspect. Acceptable values are Variant and RegExp.

    • Variant uses a string or numeric comparison.

    • RegExp treats any comparison string as a regular expression, and tries to match the aspect value against it.

Aspect definition example:

<Aspect Name="Category" MatchType="Variant" Expression ="Attributes. Item(&quot; CATEGORY&quot;).Value"/>

An Aspect expression describes how to calculate the value of the aspect for a specific object. To determine its value, the Aspect expression uses a sequence of property reads and/or method calls (with constant parameter values) on that object. The expression syntax resembles Visual Basic, which provides a simplified form of scripting against the POD object model. The expression that is reasonable for a specific object depends on the type of object: Component for colors/levels or Component Keypoint for external dimensions.

Definitions for common aspects are listed in the Graphics section and ExternalDimensions section. These definitions should be adequate for most uses. Instructions that explain how to define new aspects for component attributes are included at the end of the sample configuration file that is delivered with the software. Because aspect expressions allow arbitrary navigation of the POD object model, there are a range of other possibilities that you can use in specific circumstances. For more information, please contact customer support.

Lookups

A Lookup entity controls the process of determining which (if any) tags the software applies to an object. The attributes of the Lookup entity describe aspect names and define the object against which they should be tested.

The MatchType of the aspect determines how the values are tested.

The software processes Lookup entities in order, with each entity testing the aspect values of the object being processed against the supplied values. If the software matches all the criteria, then the software examines the body of the lookup. Tags are applied for any tag entities, and child lookups are processed recursively.

Lookup definition example:

<Lookup Category="FABRICATION"> ...... </Lookup>

Tags

The Tag entity triggers the addition of tags to the object being processed. Tags are named (string) values. At most, an object can have one value attached to it with a particular name. If a tag name is used twice on the same object, the object retains the last value assigned. Each attribute of the Tag entity specifies a single tag. Although it is possible to add other tags to an object, those tags will be ignored.

Tag definition example:

<Tag Colour="Blue" Level="11"/>

See Also

Graphics section

ExternalDimensions section