Scott B Posted July 31, 2015 Share Posted July 31, 2015 I use the are of different floors of a building to determine accessory quantities for concrete placing. I calculate using: ((sqrt(area))-4')/4'*sqrt(area). this lets me know linear feet of material at 4' spacing the full length of a (square) room. i use a similar formula for differing accessories. I'd like a tool that can get the info in as few clicks as possible. I experimented with a table that works... ok. A1 -lable A2 -field=get area (sqr inches) A3 -convert to feet =A2/144 A4 -=sqrt(A3) (qet the length of 1 side of a square) A5 -=(A4-4)/4 (to divide the length by spacing of 4') A6 -=A4*A5 (total length of runs at 4') this will work as a block, just have to explode & update the area field for every area it is used on. My IT will have to evaluate any lisp as our AutoCad 2012 is piggybacked by RebarCAD, and lisp files can cause problems. (simplest is best) let me know if there is a better way. Thank you very much!!! Quote Link to comment Share on other sites More sharing options...
Commandobill Posted July 31, 2015 Share Posted July 31, 2015 This should probably be moved to the lisp section Quote Link to comment Share on other sites More sharing options...
Commandobill Posted July 31, 2015 Share Posted July 31, 2015 Are you looking for a lisp where you can type in the area and it does the math? What exactly are you looking to do? Quote Link to comment Share on other sites More sharing options...
zaphod Posted July 31, 2015 Share Posted July 31, 2015 Welcom to cadtutor. here is a drawing that uses dynamic dimensions and fields, just change the red dimension and type in the command "regen" I'm not 100% on your formulas but this should get you started. Dynamic Area.dwg Quote Link to comment Share on other sites More sharing options...
Scott B Posted July 31, 2015 Author Share Posted July 31, 2015 I would like to have a lisp or macro that gets the area of a selected object. i am calculating supports for mesh in a slab with an irregular outline. how do i move this to the lisp section? Quote Link to comment Share on other sites More sharing options...
Commandobill Posted July 31, 2015 Share Posted July 31, 2015 how do i move this to the lisp section? Don't worry, a mod will come around and move it soon. Next time start it in that section if you are requesting a lisp. Quote Link to comment Share on other sites More sharing options...
Commandobill Posted July 31, 2015 Share Posted July 31, 2015 Not sure what you plan with the data is, but here's the math (defun c:areaequation ( / ONEWALL ROOMAREA ROOMENT ROOMSS SPACINGBY4FEET TOTALLENGTHAT4FEET) (if (setq roomSS (ssget "_+.:E:S" (list (cons 0 "LWPOLYLINE")))) (progn (setq roomEnt (vlax-ename->vla-object (cadar (ssnamex roomSS)))) (setq roomArea (/ (vla-get-area roomEnt) 144)) (setq oneWall (sqrt roomArea)) (setq spacingBy4Feet (/ (- oneWall 4) 4)) (setq totalLengthat4Feet (* oneWall spacingBy4Feet)))) ) Quote Link to comment Share on other sites More sharing options...
Scott B Posted July 31, 2015 Author Share Posted July 31, 2015 Thank you Commandobill! I will use it to figure accessories used in placing reinforcing in irregular slabs and walls. Quote Link to comment Share on other sites More sharing options...
Commandobill Posted August 1, 2015 Share Posted August 1, 2015 I could have the data be printed to your command line or put as MTEXT. Just let me know and I'll finish the code for you. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 2, 2015 Share Posted August 2, 2015 (edited) You can attach a FIELD to a mtext that is area it took me about 1 minute to do including scale factor, your conversion factor. Pretty sure Lee-mac has a lisp to do this. If you change shape just regen to update. Only setback is it does not take into account your 4' strip. Not sure if this can be added to field calc distance between two points. A dynamic block can not be used as you implied irregular shape. Edited August 2, 2015 by BIGAL Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.