home *** CD-ROM | disk | FTP | other *** search
- ' This simple macro adds the length of all the lines on each of
- ' the first five layers up, then allows the user to insert that
- ' information into the drawing as a piece of text.
- '
- ' Change the 5 on the line below to add more layers, (up to 255)
- for a=1 to 5
- '
- ' Set Precision to 1
- Precision 1
- d=a
- L = 0
- ' Loop through all entities in drawing
- For J=1 to SYS(9)
- GetAttr J, Type, Groupp, Layerr
- If Type=1 AND Layerr=d Then L=L+LENGTH(J)
- next
- ' Create Text String
- Text$ = "Length of Lines in Layer ",d, " is ",L
- ' Add text to drawing
- >text
- {
- <text "Lenghth of lines in layer number:"[Text$]
- }
- Next
- End
-
-