![]() It will tell you the area of an object in square units and will also tell you the perimeter of that area. ![]() If you have ever used the AREA command, you know how cool of a tool it is. (COMMAND "STYLE" "NOTES" "ROMANS.SHX" "9.0" "0.Not every room that you draw is going to be free from obstructions like columns or partial walls. (setq oldstyle (getvar "textstyle")) RETRIEVES OLD TEXT STYLE change it then set it back to the old style to make it more user friendly. i added some coding to retrieve the old text style. RE: AREA CALCULATION LISP CarlAK (TechnicalUser) 31 Aug 05 18:22īelow is the final code. (setq #TXT (strcat (rtos (/ #AA 144) 2 0) " SF")) ADDED- ALWAYS SQ FT I CAN'T SEEM TO FIND A REASON WHY IT WILL NOT RETRIEVE THIS PART OF THE STYLE. THE ONLY PROBLEM IS NOW THE TEXT IS DISPLAYED WITH THE PROPER TEXTSTYLE BUT THE OBLIQUE ANGLE OF THE TEXT IS ZERO AND NOT TEN. I ADDED A DIVISION FACTOR OF 144 SO THE TEXT WOULD BE IN TRUE SQ FT. (princ) RE: AREA CALCULATION LISP vbcad (TechnicalUser) (cons 7 (getvar "TEXTSTYLE")) ADDED-CURR STYLE (setq #TXT (strcat (rtos #AA 2 2) " SQ FT")) ADDED- ALWAYS SQ FT (setq #TXT (strcat (rtos (* #AA #CV)) " " #UN)) #UN (getstring T "\nEnter the type of units: ") DELETED #CV (getreal "\nEnter a conversion factor: ") DELETED-NOT NEEDED (defun C:AC (/ #ENT #AA #CV #UN #PT #TXT #ECHO #OLDERR "-units" "2" "0" "1" "0" "0" "y")::DEL UNITS RESET, AREA DECIMALS SET BY RTOS ![]() You could delete the "commented out" lines: Here's my shot at your requested revisions. RE: AREA CALCULATION LISP CarlAK (TechnicalUser) 19 Aug 05 16:26 THIS ALWAYS PUTS THE TEXT AS THE "STANDARD" TEXT STYLE. I ALSO WOULD LIKE TO USE A DEFAULT TEXT STYLE AND SIZE. I DO NOT NEED TO KNOW CONVERSION FACTOR OR TYPE OF UNITS ETC AS EVERYTHING IS IN SQUARE FEET. THERE IS A LOT OF STUFF IN THE CODE THAT I WOULD LIKE TO TAKE OUT. (princ) RE: AREA CALCULATION LISP kpetursson (Programmer) 18 Aug 05 16:28 #PT (getpoint "\nSpecify start point of text: ")) #UN (getstring T "\nEnter the type of units: ") #CV (getreal "\nEnter a conversion factor: ") (list "ELLIPSE" "CIRCLE" "LWPOLYLINE" "POLYLINE" "REGION")) (if (member (cdr (assoc 0 (entget #ENT))) (setq #ENT (car (entsel "\nPick an object for an area: "))) (defun C:AC (/ #ENT #AA #CV #UN #PT #TXT #ECHO #OLDERR (%A) IT WILL DO THIS IF I ENTER IT AT THE PROMPT "ENTER THE TYPE OF UNITS. THE ROUTINE RETRIEVES THE SQUARE FOOTAGE A THE PRINTS IT ON THE SCREEN AT A USER PICKED POINT. ![]() I HAVE A LISP(NOT MY CODE I DO NOT KNOW WHERE IT CAME FROM) THAT I WOULD LIKE TO USE FOR SQUARE FOOTAGE CALCULATIONS. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |