home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 2: PC / frozenfish_august_1995.bin / bbs / d09xx / d0925.lha / DonsGenies / DonsGenies.lha / Don'sGenies / GridIsometric30.pprx < prev    next >
Text File  |  1993-05-25  |  923b  |  46 lines

  1. /* This Genie sets up an isometric grid and enables snap.
  2. Written by Don Cox ⌐ Feb 93 Not public domain. All rights reserved.  */
  3.  
  4.  
  5. signal on error
  6. signal on syntax
  7. address command
  8. call SafeEndEdit.rexx()
  9. call ppm_AutoUpdate(0)
  10. cr="0a"x
  11.  
  12. gsize = ppm_GetGridSize()
  13. gwidth = word(gsize,1)
  14. gheight = word(gsize,2)
  15. call ppm_SaveText("ram:gridsize",gsize)
  16.  
  17. currentunits = ppm_GetUnits()
  18. call ppm_SetGrid(1)
  19. select
  20.     when currentunits = 1 then call ppm_SetGridSize(0.2165,0.125)
  21.     when currentunits = 2 then call ppm_SetGridSize(.433,.25)
  22.     otherwise call ppm_SetGridSize(1.9,1)  /* not so accurate in picas  */
  23.     end
  24. call ppm_SetGridSnap(1)
  25.  
  26. call exit_msg()
  27.  
  28. end
  29.  
  30. error:
  31. syntax:
  32.     do
  33.     exit_msg("Genie failed due to error: "errortext(rc))
  34.     end
  35.  
  36. exit_msg:
  37.     do
  38.     parse arg message
  39.     if message ~= "" then
  40.     call ppm_Inform(1,message)
  41.     call ppm_ClearStatus()
  42.     call ppm_AutoUpdate(1)
  43.     exit
  44.     end
  45.  
  46.