As a continuation to my previous post Total Length Calculation Macro for AutoCAD LT, here is another one to calculate total area and perimeter of selected objects. This macro has a few limitations.
1. You need to end the macro with a cancel (Esc) action.
2. The macro will be terminated upon picking up an object which doesn't have area.
3. Calculates area only by object method. Area calculation by continous picking of points are not supported.
Even after all these limitations, if you are interested, here goes the macro.
*^C^C_Area;O;\setvar;USERR1;$M=$(+,$(getvar,USERR1),$(getvar,AREA));setvar;USERR2;$M=$(+,$(getvar,USERR2),$(getvar,PERIMETER));_modemacro;"Total Area :"$(+,$(getvar,USERR1),$(getvar,AREA))", Total Perimeter :"$(+,$(getvar,USERR2),$(getvar,PERIMETER));
As in the case of length calculation macro, you need to use another macro for clearing the status bar and system variables.
^c^c_modemacro;.;setvar;USERR1;0;;USERR2;0;
Thursday, September 20, 2007
Total Area and Perimeter Calculation Macro
Labels:
DIESEL,
Tips 'n' Tricks
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment