home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2003 November / PCWK1103B.iso / DesignCAD 3D Max PLUS trial 30 / DATA1.CAB / Example_Files / Sample_Macros / 600_5_AskData.d3m < prev    next >
Encoding:
Text File  |  2003-09-29  |  1.7 KB  |  56 lines

  1. ' This is the fifth macro in the 600 series, 
  2. '
  3. ' It prompts users for the data, and saves the results to the
  4. ' data file, and the other programs use these values as defaults.
  5. ' This macro changes user defaults for the area boxes.
  6. '
  7.         ' Prompt user for Additional Length 
  8.             Sys$(41) = "Add to Length Meters? . . ."
  9.             Input "How Much Additional Length? . . . (Enter for None)", AddLen
  10.             '
  11.         ' Check for Exit Condition on Input box
  12.             if Sys(999) = 1 then 
  13.                 Message "Program Stopped by User."
  14.                 End
  15.              endif
  16.         ' Prompt user for text height
  17.             Sys$(41) = "Text Height . . ."
  18.             Input "Enter the Text Height for the Info Box . . . (Enter = 1)", TH
  19.         ' Check for Exit Condition on Input box
  20.             if Sys(999) = 1 then 
  21.                 Message "Program Stopped by User."
  22.                 End
  23.             endif
  24.         ' Check for valid entries
  25.             if TH = 0 then TH = 1
  26.  
  27.         ' Prompt user for Panel Reduction
  28.             Sys$(41) = "Panel Subtraction . . ."
  29.             Input "Subtract how many Panels?, (Press Enter for None)", PanNum2
  30.         ' Check for Exit Condition on Input box
  31.             if Sys(999) = 1 then 
  32.                 Message "Program Stopped by User."
  33.             End
  34.             endif
  35.         ' # of Panels per Carton based on Room Type
  36.             Sys$(41) = "Panels per Carton. . ."
  37.             Input "Panels per Carton?, (Press Enter = 10)", PanNum4
  38.         ' Check for Exit Condition on Input box
  39.             if Sys(999) = 1 then 
  40.                 Message "Program Stopped by User."
  41.             End
  42.             endif
  43.             Precision 0
  44.             if PanNum4 = 0 then PanNum4 = 10
  45.             Close #1
  46.             open "o", 1, "*\sample macros\600.txt"
  47.             ' Write Values from ABOVE to file
  48.                 Print #1, AddLen
  49.                 Print #1, TH
  50.                 Print #1, PanNum2
  51.                 Print #1, PanNum4
  52.             ' Close ASCII text file
  53.                 Close #1
  54.             '
  55.