WORK AROUND SOLUTION FOR CONCENTRIC WAVE WITH ATENUATION

The execution of this surface procedure calculuates z values in a precision range currently unable to be handled by the given DrawPoly procedure. The given procedure uses direct calls to CreateComplexShapeElement1. A work around is to replace this procedure with one that uses embedded CAD commands invoked with a CadInputQueue.SendCommand statement to perform the same tasks. This is likely to be a temporary problem that will be fixed in an update of Microstation. First, the current DrawPoly procedure is given below. Next, the temporary substitute DrawPoly procedure is given. Note that concepts related to the substitute procedure is covered at the beginning of chapter 5. This later code needs to used in conjunction with main procedure poly_surf.

1. CURRENT PROCEDURE

''' D R A W    A    P O L Y G O N    O F    F O U R    P O I N T S
Sub DrawPoly(Point1 As Point3d, Point2 As Point3d, Point3 As Point3d, Point4 As Point3d)
' Draw polygon of four points
Dim Points(3) As Point3d
Dim oStringElements(0) As ChainableElement
Dim oNewPline As element
Dim oComplexShape As ComplexShapeElement

Points(0) = Point1
Points(1) = Point2
Points(2) = Point3
Points(3) = Point4

' Create the polygon line and add it to the model database
Set oNewPline = CreateLineElement1(Nothing, Points)
ActiveModelReference.AddElement oNewPline

' Add the polygon line to the array of pending shape elements
Set oStringElements(0) = oNewPline

' Add the complex shape to the model data base
Set oComplexShape = CreateComplexShapeElement1(oStringElements, msdFillModeNotFilled)
ActiveModelReference.AddElement oComplexShape

' Display the complex shape to the screen
oComplexShape.Redraw

End Sub

2. TEMPORARY SUBSTITUTION PROCEDURE

Sub DrawPoly(Point1 As Point3d, Point2 As Point3d, Point3 As Point3d, Point4 As Point3d)
Dim index As Integer, numpts As Integer

numpts = 4
CadInputQueue.SendCommand "PLACE SMARTLINE"
CadInputQueue.SendDataPoint Point1
CadInputQueue.SendDataPoint Point2
CadInputQueue.SendDataPoint Point3
CadInputQueue.SendDataPoint Point4
CadInputQueue.SendDataPoint Point1

' End Command By Sending Reset to Mouse
CadInputQueue.SendReset
CommandState.StartDefaultCommand

End Sub