My English is very poor. needs help in improving macra. Action macra is that the 3D drawing when you click on
two adjacent points of known height (Z) are inserted at the point of full meters
(eg. Between points from the 200.48 m - 210.51 m insert points to 200.5 m, 201 m 201.5 m, etc)
everything works well only is one of the fundamental problems that can not help themselves. when you click in a place
where the mute point with a known height Z closes Microstation. Macro version of Microstation V7 SE modified to select V8i series 3 please help
Sub main ()
dim A as mbepoint
dim B as mbepoint
dim C as mbepoint
Dim view as Integer
dim Cięcie as Double
dim kom$ as String
kol%=MbeSettings.color
Początek:
kom = "NULL"
MbeSendCommand "active level 1 "
MbeSendCommand "NULL"
MbeSendCommand "Place Line"
MbeGetInput MBE_DataPointInput, MBE_CommandInput, MBE_ResetInput
Select Case MbeState.inputType
Case MBE_DataPointInput
If MbeState.getInputDataPoint (A, view) = MBE_Success Then
MbeSendDataPoint A
End If
Case MBE_CommandInput
If MbeState.getInputCommand (kom$) = MBE_Success Then
GoSub Koniec
End If
Case MBE_ResetInput
GoSub Początek
End Select
MbeGetInput MBE_DataPointInput, MBE_CommandInput, MBE_ResetInput
Select Case MbeState.inputType
Case MBE_DataPointInput
If MbeState.getInputDataPoint (B, view) = MBE_Success Then
End If
Case MBE_CommandInput
If MbeState.getInputCommand (kom$) = MBE_Success Then
GoSub Koniec
End If
Case MBE_ResetInput
GoSub Początek
End Select
Cięcie = 0.5
If A.z > B.z Then
C=A
A=B
B=C
End If
MbeSendCommand "Active Angle Pt2"
MbeSendDataPoint A
MbeSendDataPoint B
MbeSettings.Angle = MbeSettings.Angle - PI/2
If (B.z-A.z)< 50 then
Dx# = (B.x-A.x)/(B.z-A.z)*Cięcie
Dy# = (B.y-A.y)/(B.z-A.z)*Cięcie
Pz# = Cięcie - (A.z - Fix(A.z))
While Pz <= 0
Pz = Pz + Cięcie
Wend
C.z = A.z + Pz
C.x = A.x + Pz*Dx/Cięcie
C.y = A.y + Pz*Dy/Cięcie
While C.z < B.z
color# = (C.z/10 - Int(C.z/10))*10/Cięcie
MbeSettings.color = val(Format$(color,"0,0"))
MbeSendCommand "PLACE TEXT"
Z$ = Format$(C.z,"0,0.0")
Z$ = Mid$(Z,Len(Z$)-2,Len(Z$))
' MbeSendKeyin Format$(C.z,"0,0.0")
MbeSendKeyin Z$
MbeSendDataPoint C
C.z = C.z + Cięcie
C.x = C.x + Dx
C.y = C.y + Dy
Wend
End If
MbeSendCommand "NULL"
Gosub Początek
Koniec:
MbeSettings.color = kol
MbeSendCommand kom
'MbeMessageBox format$("Pz,"0,0.00"")
End Sub
↧
Macro help
↧