Ellipses

From Microstation VBA Wiki
Jump to: navigation, search

An ellipse element is needed to draw a circle, which is just a special case of an ellipse. The function takes the center point as well as the radius along the X- and Y-axes and allows you to rotate it using a rotation matrix.

Dim ptA as Point3d
Dim oMatrix As Matrix3d
Dim oCircle As EllipseElement


Set oCircle = CreateEllipseElement2(Nothing, ptB, 2 * pica, 2 * pica, Matrix3dIdentity)
ActiveModelReference.AddElement oCircle