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 / Change Line Width and Fill Wide Line.d3m < prev    next >
Encoding:
Text File  |  2003-09-29  |  1.0 KB  |  35 lines

  1. ' This BasicCAD macro cycles through the entire drawing, 
  2. ' and selects all objects on layer 2 then changes their
  3. ' thickness and sets them to be filled wide lines
  4. '
  5. ' Make sure you're in 2D Mode, or this will not appear to work
  6. '
  7. ' Use PointSelect to deselect the layers once they are converted
  8. '
  9. ' Loop through every object in the drawing
  10. ' sys(9) is the number of entities in the drawing
  11.     for j = 1 to sys(9) 
  12. ' Get the Attributes of the current item
  13.     getattr j, type, select, laynum, group, red, green, blue
  14. ' if the Item is on Layer 2 then . . .
  15.     if laynum = 2 then 
  16.         select = 1
  17.     ' Select that Item
  18.         putattr j, type, select, laynum, group, red, green, blue
  19.     endif
  20. ' Done with that object, loop back to select the next one
  21.     next
  22. ' finished with every object in drawing, end program
  23. ' all entities on layer 2 are selected
  24. ' Set Current Line Thickness and Fill Options
  25.     Sys(6) = .5
  26.     Sys(24) = 1
  27. ' Apply those Options to the selected Entities
  28.     >ApplyLineWidth
  29.     {
  30.     }
  31.     >ApplyLineFill
  32.     {
  33.     }        
  34. End
  35.