The XML format

The XML format supports point, line, polyline and 3dface entities, each with color index and layer name. Developer can download a .NET class with XML serializer / deserializer for this format at www.computational-cad.com.

Example input and output

The XML scheme for point, line, polyline and 3dface entities is given below. Coordinates refer to UCS. The polyline export supports 2d and 3d polylines. Imported polylines are always generated as 3d polyline entities.

 

<?xml version="1.0" encoding="utf-8"?>

<EntityList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 

  <Points>

    <Point>

      <LayerName></LayerName>

      <ColorIndex></ColorIndex>

      <X></X>

      <Y></Y>

      <Z></Z>

    </Point>

  </Points>

  <Lines>

    <Line>

      <LayerName></LayerName>

      <ColorIndex></ColorIndex>

      <StartVertex>

        <X></X>

        <Y></Y>

        <Z></Z>

      </StartVertex>

      <EndVertex>

        <X></X>

        <Y></Y>

        <Z></Z>

      </EndVertex>

    </Line>

  </Lines>

  <Polylines>

    <PolyLine>

      <LayerName></LayerName>

      <ColorIndex></ColorIndex>

      <Vertices>

        <Vertex>

          <X></X>

          <Y></Y>

          <Z></Z>

        </Vertex>

        <Vertex>

          <X></X>

          <Y></Y>

          <Z></Z>

        </Vertex>

        <Vertex>

          <X></X>

          <Y></Y>

          <Z></Z>

        </Vertex>

      </Vertices>

    </PolyLine>

  </Polylines>

  <Faces>

    <Face>

      <LayerName></LayerName>

      <ColorIndex></ColorIndex>

      <Vertex1>

        <X></X>

        <Y></Y>

        <Z></Z>

      </Vertex1>

      <Vertex2>

        <X></X>

        <Y></Y>

        <Z></Z>

      </Vertex2>

      <Vertex3>

        <X></X>

        <Y></Y>

        <Z></Z>

      </Vertex3>

      <Vertex4>

        <X></X>

        <Y></Y>

        <Z></Z>

      </Vertex4>

    </Face>

  </Faces>

</EntityList>

 

More:

Import a XML entity format file

Export to a XML entity format file