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 / WMFScale.d3m < prev    next >
Encoding:
Text File  |  2003-09-29  |  938 b   |  31 lines

  1. ' Use WMF Export to get better detail in your metatiles. 
  2. ' You can control the scale of your WMF export using Sys(25) as this
  3. ' program illustrates.  Sys(25) roughly determines how many metafile 
  4. ' units (I'll call them "mfu") per drawing unit to place in the exported 
  5. ' WMF file. 
  6. '
  7. ' One mfu is about 1/6 of a pixel, so at 96dpi (typical for most 
  8. ' screen resolutions), 1 mfu is 1/576 of a screen "inch".
  9. ' Run this macro before exporting to WMF.
  10. '
  11. pix = sys(25)
  12. if pix = 0.0 then pix = 67
  13. Message "Current drawing units per inch: ", 576/pix
  14.  
  15. Input "Desired drawing units per inch: ", scale
  16. if (sys(999)) then End
  17.  
  18. if scale <= 0.0 then
  19.     sys(25) = 0
  20.     scale = 576/67
  21. else
  22.     sys(25) = 576/scale
  23. end if
  24.  
  25. m$ = "Scale is now ", 576/sys(25), ". A 10-unit line will be ", 10/scale, "inches long."
  26. Message m$
  27. ' "Scale is now ", 576/sys(25), ". A 10 unit line will be ", 10/scale, " inches long."
  28. End
  29.  
  30.