home *** CD-ROM | disk | FTP | other *** search
- ' This macro lets users set 2 points for a rubber-band box shaped area
- ' then prompts them to choose one of the 3 following options:
- '
- ' Section Cut Off
- ' Section Copy
- ' Section Delete
- '
- ' This macro also lets users set 2 points directly horizontal or
- ' vertical to each other with the Line Snap command and offsets
- ' the numbers slightly so either of the 3 commands still work.
- '
- ' Set Rubber band type to 2D Box for user
- Sys(41) = 2
- '
- ' Prompt User for 2 points for boundary of the area
- setpoint "Set two points for the section . . . " 2
- ' If user set only 1 points, there can be no area
- if sys(1) < 2 then
- Message "Please run the program again and set more than 1 point for the section."
- End
- endif
- '
- ' Create an Array for the points the user sets
- Dim X(2), Y(2), Z(2)
- '
- ' Store points the user just set into the Array
- for a = 1 to Sys(1)
- PointVal X(a), Y(a), Z(a) a
- next a
- '
- ' Test for lined up data points
- if Y(2) = Y(1) then
- Y(2) = Y(2) + 1
- endif
- if X(2) = X(1) then
- X(2) = X(2) + 1
- endif
- ' Ask User what they would like to do with the points.
- Window 5,15
- Print "1) Section Cut Off"
- Print "2) Section Copy"
- Print "3) Section Delete"
- AnyKey a$
- WClose
- if a$ = "1" then goto One
- if a$ = "2" then goto Two
- if a$ = "3" then goto Three
- End
- ' Section Cuttoff
- One:
- >SectionCut
- {
- for a = 1 to Sys(1)
- <Pointxyz [X(a), Y(a), Z(a)]
- next a
- }
- End
- ' Section Copy
- Two:
- >SectionCopy
- {
- for a = 1 to Sys(1)
- <Pointxyz [X(a), Y(a), Z(a)]
- next a
- }
- End
- ' Section Delete
- Three:
- >SectionDeleteCut
- {
- for a = 1 to Sys(1)
- <Pointxyz [X(a), Y(a), Z(a)]
- next a
- }
- End
-