home *** CD-ROM | disk | FTP | other *** search
- ' This macro prompts users to select an item, then get's the item's
- ' bounding box, It then goes into Point Select Mode and selects all the
- ' points within that boundary.
- '
- ' Default Program Values for Drawing Mode
- SGrid = 0
- PSMode = 0
- ' Check to see if we're in Point Select Mode,
- ' if we are, take us out of it for now.
- If sys(345) = 1 Then
- PSMode = 1
- >PointSelectMode
- {
- }
- endif
- ' Check to see if the Snap Grid is on,
- ' if it is, turn it off for easy item selection
- if Sys(17) = 1 then
- SGrid = 1
- Sys(17) = 0
- endif
- ' Spot to return to after user failed to select an item
- Start:
- ' Prompt user to select an item
- SetPoint "Set a Point on an item to select it . . ." 1
- ' Select item where they clicked
- POINTVAL xval yval zval 1
- >PointSelect
- {
- <Type 0
- <pointxyz [xval, yval, zval]
- }
- ' If they failed to click on an item send them back to start
- if Sys(34) = 0 then
- Message "Please click on an object to select it"
- goto Start
- endif
- ' Get Boundary of Selected object
- MinX = Sys(196)
- MinY = Sys(197)
- MaxX = Sys(198)
- MaxY = Sys(199)
- MinX = MinX - .05
- MinY = MinY - .05
- MaxX = MaxX + .05
- MaxY = MaxY + .05
- ' Select Points of Item
- >DragSelect
- {
- <Type 2
- <pointxyz [MinX, MinY, 0]
- <pointxyz [MaxX, MaxY, 0]
- }
- ' Check to see if we're in Point Select Mode,
- ' if not, put us there.
- If NOT(sys(345)) Then
- >PointSelectMode
- {
- }
- End If
- ' Select points of Item for moving or dragging
- >DragSelect
- {
- <Type 3
- <pointxyz [MinX], [MinY], 0
- <pointxyz [MaxX], [MaxY], 0
- }
- ' Move the Box
- >Pointmove
- {
- <pointxyz 10, 10, 0
- '[xval, yval, zval]
- ' <incomplete
- ' <pointxyz 5, 5, 0
- }
- ' Turn Point Select Mode back on
- if PSMode = 0 then
- >PointSelectMode
- {
- }
- endif
- ' Turn Snap Grid Back on
- if SGrid = 1 then
- Sys(17) = 1
- endif
- ' End of Program
- end
-
-