Difference between revisions of "KeepHighestLevel"
From scripting
(Created page with " Sub KeepHighestLevel(LevelPlane As HybridShapePlaneOffset, TestPtObj As Variant) If IsUpdatable(LevelPlane) And IsUpdatable(TestPtObj) Then Dim OrigOri As Integer...") |
(No difference)
|
Latest revision as of 07:06, 22 April 2017
Sub KeepHighestLevel(LevelPlane As HybridShapePlaneOffset, TestPtObj As Variant) If IsUpdatable(LevelPlane) And IsUpdatable(TestPtObj) Then Dim OrigOri As Integer OrigOri = LevelPlane.Orientation Dim OppOri As Integer OppOri = (-1) * OrigOri Dim TMeas Set TMeas = TheSPAWorkbench.GetMeasurable(TestPtObj) Dim OrigPt Coords(2) TMeas.GetPoint OrigPtCoords LevelPlane.Orientation = OppOri IsUpdatable TestPtObj Dim TMeas2 Set TMeas2 = TheSPAWorkbench.GetMeasurable(TestPtObj) Dim OppPtCoords(2) TMeas2.GetPoint OppPtCoords If OppPtCoords(2) < OrigPtCoords(2) Then LevelPlane.Orientation = OrigOri IsUpdatable TestPtObj End If End If End Sub