rose sr Posted June 3, 2022 Posted June 3, 2022 Hi All, can anybody convert this lisp to sq.ft. now the area i am getting area in sq m.. looking for polyline area to be placed in sq ft when it selected. thank u. PLA.LSP Quote
SLW210 Posted June 3, 2022 Posted June 3, 2022 I moved your thread to the AutoLISP, Visual LISP & DCL Forum. Please post in the appropriate forum. Quote
exceed Posted June 3, 2022 Posted June 3, 2022 (edited) 4 hours ago, rose sr said: Hi All, can anybody convert this lisp to sq.ft. now the area i am getting area in sq m.. looking for polyline area to be placed in sq ft when it selected. thank u. PLA.LSP 1.64 kB · 3 downloads ; ; Select closed polyline and place mtext with the room name and Area in ft2 ; ; How to use: ; 1. select polyline ; 2. type in room name ; Note: the getstring function does not allow spaces, so use a _ underscore to seperate words ; 3 select insert point ; 4 Something similar to this will be placed with MTEXT ; room_name ; Area: 111.11 ft2 ; 5 MTEXT will be placed with no wrap, to current settings ; ; Created ; 11-June-2003 YZ ; This code was taken from an internet web site. the original author was 'Jos van Doorn'. ; Among other things, I have modified the program to use MTEXT. ; (defun drtxt_ft (/ rn tx ls vl lt ht lb hb nr pt) (setq tx (strcat "Area: " (rtos (* (/ (getvar "area") 1000000) 10.7639) 2 2) " ft\U+00B2" ) rn (getstring "\nRoom Name: ") ) (setq ls (list (cons 1 tx)) vl (textbox ls) vl (cadr vl) lt (car vl) ht (cadr vl) vl (grread T) nr (car vl) pt (cadr vl) ) (princ "\nInsert Point: ") (while (/= nr 3) (command "redraw") (grdraw pt (setq pt (polar pt 0 lt)) 7) (grdraw pt (setq pt (polar pt (* pi 0.5) ht)) 7) (grdraw pt (setq pt (polar pt pi lt)) 7) (grdraw pt (polar pt (* pi 1.5) ht) 7) (setq vl (grread T) nr (car vl) pt (cadr vl) ) ) ;end while function (command "-mtext" pt "w" 0 rn tx "") (redraw) ) ; end drtxt function (defun c:plaft ( / et) (setvar "cmdecho" 0) (while (setq et (car (entsel "\nSelect polyline: ") ) ;end car function ) ;end setq function (command "area" "o" et) (drtxt_ft) ) ; wnd while funtion (setvar "cmdecho" 1) (princ) ) ; end c:plaft function like this? Edited June 3, 2022 by exceed Quote
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.