Questions similar to this appear on the Be Communities. This question appeared in the MicroStation Forum.

Q

A A CAD tool, such as MicroStation, lets a user draw simple lines and line-strings, sometimes known as polylines. Lines and and line-strings are defined by points in 3D space. The points are termed vertices. Each pair of vertices is joined by a line segment.

Introduction to Line Geometry

Line

A simple line has a start point and end point: the vertices of the line. Those points are usually a 3D point that has X, Y and Z components. The start and end points are joined by a single segment. Here's an example of a simple line having a single segment …

A line is a line-string having only two vertices: the start and end points.

Simple Line and Vertices

The line has two vertices and one segment.

Line-String

A line-string has a start point and end point and several intermediate vertices. Those points are usually a 3D point that has X, Y and Z components. Each pair of vertices is joined by a single segment. Here's an example of a line-string having several segments …

line-string and Vertices

The line-string has four vertices and three segments.

Programming Lines with VBA

MicroStation VBA provides the LineElement object. A LineElement has the usual MicroStation element characteristics, plus features relevant to a line or line-string. For example, here's an abbreviated list of the methods and properties of a LineElement …

Methods and Properties of a LineElement
Method Comment
LineElement.StartPoint A Point3d
LineElement.EndPoint A Point3d
LineElement.VerticesCount Informs how many vertices make up this line or line-string. The number of segments is one less that the number of vertices
LineElement.GetVertices Returns the list of vertices. Each vertex is a Point3d

To create a LineElement use application method CreateLineElement1 or CreateLineElement2.

For a full list of LineElement methods and properties, refer to MicroStation VBA help.


Domain-Specific Terminology

Some technology domains, such as a Geographic Information System (GIS), call a vertex a node and a segment an edge.


Glossary

Vertex (plural Vertices)

A point at the start and end of a simple line or line-string, joined by one or more segments. A line-string will have multiple vertices: each pair of vertices is joined by a segment.

Segment

The part of a line that we see. It joins two vertices. A simple line has one segment. A line-string has multiple segments. The number of segments is one less than the number of vertices.


Questions

Post questions about MicroStation programming to the MicroStation Programming Forum.