Lines
You can't just draw a line. Instead you have to create a line in memory and then write it to the DGN file. So in a subroutine, first you set up a variable that will hold an element.
Then you use a very long command to make a line (see below for more info):
Then you write the line to the DGN file:
But to create the line you need a start and end point. So you have to set up variables that can hold those points. A point consists of three pieces of data for the X, Y, and Z coordinates. So once the point is set up, you have to store X and Y values in there and set Z to 0 (I'm always doing 2D, but it seems to work better with 3D points):
Dim ptStart, ptEnd as point3d ptStart.X = 10 ptStart.Y = 10 ptStart.Z = 0 ptEnd.X = 10 ptEnd.Y = 20 ptEnd.Z = 0