Background Information
When importing coordinates, they can often be represented by points. The problem with this is that they can be hard to see in the drawing because they are so small.
Therefore, it would be desireable to have an alternate representation of points in a drawing.
Steps
I will show a small routine here that replaces all of the points with circles. The size of the circle is defined in the program and can easily be adapted to your own needs. The points are displayed in MicroStation by lines of longitude 0. Therefore, the routine will search through the drawing to find all lines of length 0 and replace them with circles.
Here is the example:
Sub line2circle() Dim Ee As ElementEnumerator Dim Sc As New ElementScanCriteria Dim Anzahl As Long ' Counter for the deleted items Dim oCirc As EllipseElement ' Ellipse (A circle is a special case of an ellipse) to exchange the points: Dim oElli As Ellipse3d oElli.Vector0 = Point3dFromXYZ(0, 0.5, 0) oElli.Vector90 = Point3dFromXYZ(0.5, 0, 0) oElli.Start = 0 oElli.Sweep = 2 * Pi ' If the line length is 0 it will be changed: Sc.ExcludeAllTypes Sc.IncludeType msdElementTypeLine Set Ee = ActiveModelReference.Scan(Sc) Do While Ee.MoveNext If Ee.Current.AsLineElement.Length = 0 Then oElli.Center = Ee.Current.AsLineElement.startPoint Set oCirc = CreateEllipticalElement1(Nothing, oElli, msdFillModeNotFilled) ActiveModelReference.AddElement oCirc ActiveModelReference.RemoveElement Ee.Current End If Loop MessageCenter.AddMessage "There were " + str(Anzahl) + " lines replaced by circles.", , msdMessageCenterPriorityInfo End Sub
After the points are changed, the number of points that were replaced will be output in a short message in the message center.
See Also
Deleting Lines of Length 0 Using VBA