structo Posted December 13, 2016 Share Posted December 13, 2016 Hi All Friends, i need one lisp for auto room dimensions by following rules: 1)select first top left corner point of the room 2)select bottom right corner point of the room 3)choose room description text from list a) choose different options from predefined options. if choose "1" option then text as "C.BOX Room" b)if choose "2", then room Name placed as "Gen.Room" c) if Choose "3", then room name as "Waiting.Room" d)if choose "4", then room name as "Conference.Hall" e)if Choose "5", then Room name as "Kitchen.Room" 4) then develop room Dimension as (for Example, i choose "4"th option from command prompt), Conference.Hall 28'0"x25'4½" please see sample drawing. Thanks. Room dimension.dwg Quote Link to comment Share on other sites More sharing options...
ReMark Posted December 13, 2016 Share Posted December 13, 2016 Looks like you have some redundancy in the above image. You have the dimensions themselves and you call them out under the room name. Wouldn't one or the other suffice? Quote Link to comment Share on other sites More sharing options...
structo Posted December 13, 2016 Author Share Posted December 13, 2016 Looks like you have some redundancy in the above image. You have the dimensions themselves and you call them out under the room name. Wouldn't one or the other suffice? thank you friend for responding, yes i need suffice of predefined room names by code. i need to automate several blocks or rooms by selecting two corners of the room or block. Thank you. Quote Link to comment Share on other sites More sharing options...
hanhphuc Posted December 13, 2016 Share Posted December 13, 2016 thank you friend for responding, yes i need suffice of predefined room names by code. i need to automate several blocks or rooms by selecting two corners of the room or block. Thank you. almost similar old thread you can tweak it yourself, many active members here will guide you Quote Link to comment Share on other sites More sharing options...
Grrr Posted December 13, 2016 Share Posted December 13, 2016 My shot at this: (defun C:test ;| credits to: Lee Mac |; ( / Lst p1 p2 choice ) (setq Lst '( ("1" . "C.BOX Room") ("2" . "Gen.Room") ("3" . "Waiting.Room") ("4" . "Conference.Hall") ("5" . "Kitchen.Room") ) ); setq (if (and (setq p1 (getpoint "\nSpecify first point: ")) (setq p2 (getcorner p1 "\nSpecify second point: ")) (not (initget 1 (apply 'strcat (mapcar '(lambda (x) (strcat x " ")) (mapcar 'car Lst))))) (setq choice (getkword (strcat "\nSpecify option [" (vl-string-right-trim "/" (apply 'strcat (mapcar '(lambda (x) (strcat x "/")) (mapcar 'car Lst)))) "]: "))) (setq p1 (trans p1 1 0) p2 (trans p2 1 0) ) ) (entmakex (list (cons 0 "MTEXT") (cons 100 "AcDbEntity") (cons 100 "AcDbMText") (cons 10 (apply 'mapcar (cons '(lambda (a b) (/ (+ a b) 2.)) (list p1 p2)))) (cons 1 (strcat (cdr (assoc choice Lst)) "\\P" (rtos (abs (apply '- (mapcar 'car (list p1 p2)))) 2 2) "x" (rtos (abs (apply '- (mapcar 'cadr (list p1 p2)))) 2 2) ) ) (cons 71 5) ) ) ) (princ) ) Sorry we don't use imperial units, so someone else will have to fix that for you. Quote Link to comment Share on other sites More sharing options...
structo Posted December 13, 2016 Author Share Posted December 13, 2016 almost similar old threadyou can tweak it yourself, many active members here will guide you Thank you Han for responding, i will see your link. Thanks. Quote Link to comment Share on other sites More sharing options...
structo Posted December 13, 2016 Author Share Posted December 13, 2016 My shot at this: Sorry we don't use imperial units, so someone else will have to fix that for you. wow, good shot Grr friend and Lee Mac friend, i will wait for Feet and inches units ( imperial units) which is mentioned in sample drawing format. Thank you. Quote Link to comment Share on other sites More sharing options...
structo Posted December 14, 2016 Author Share Posted December 14, 2016 almost similar old threadyou can tweak it yourself, many active members here will guide you hi hanh, i saw your link. i need some tweaks from that thread. 1)please add room name description option. 2)text was developed as (For example) 12', instead of 12'-0" Thank you. Quote Link to comment Share on other sites More sharing options...
structo Posted December 16, 2016 Author Share Posted December 16, 2016 Hi friends, please modify for Feet and inches units ( imperial units) Grr's code (Post#5). i would appreciates for help. Thank you all. Quote Link to comment Share on other sites More sharing options...
maratovich Posted December 16, 2016 Share Posted December 16, 2016 Use this macro: RoomDim.zip Quote Link to comment Share on other sites More sharing options...
structo Posted December 17, 2016 Author Share Posted December 17, 2016 (edited) Use this macro: Dear Marat friend, your macro is great working. especially GUI is awesome. my final request is if any possibilities, please tweak half inch display text format as shown in image. Thank you for helping. Edited December 17, 2016 by structo Quote Link to comment Share on other sites More sharing options...
maratovich Posted December 17, 2016 Share Posted December 17, 2016 New version: Excuse me, but did not immediately understand. replace the 1 \ 2 on the vertical division - it is long and difficult. possible to do, but ... I have a lot of work. RoomDim 2.zip Quote Link to comment Share on other sites More sharing options...
structo Posted December 17, 2016 Author Share Posted December 17, 2016 New version: Excuse me, but did not immediately understand. replace the 1 \ 2 on the vertical division - it is long and difficult. possible to do, but ... I have a lot of work. hi friend, thank you for valuable reply. i apologies for inconvenience caused. here i have attached sample out put format. your previous version is enough (post#10). i have requested only vertical format (stacked format, it is showing option at medit window, by manual editing). please tweak when you have free time only. Thank you for support. Quote Link to comment Share on other sites More sharing options...
maratovich Posted December 17, 2016 Share Posted December 17, 2016 See version 3 RoomDim 3.zip Quote Link to comment Share on other sites More sharing options...
structo Posted December 17, 2016 Author Share Posted December 17, 2016 See version 3 Thank you for yours valuable modification. some gap is formed as mentioned in picture. please modify. sorry for asking modifications. thank you. Quote Link to comment Share on other sites More sharing options...
maratovich Posted December 17, 2016 Share Posted December 17, 2016 See version 4 RoomDim 4.zip Quote Link to comment Share on other sites More sharing options...
structo Posted December 17, 2016 Author Share Posted December 17, 2016 Again sincere thanks to you friend, still facing space issue by out put text, minor error. here i have attached image. please have a look. Thank you for great contribution. Quote Link to comment Share on other sites More sharing options...
maratovich Posted December 17, 2016 Share Posted December 17, 2016 Thanks not bubbling...:D:D Quote Link to comment Share on other sites More sharing options...
maratovich Posted December 17, 2016 Share Posted December 17, 2016 See version 5 RoomDim 5.zip Quote Link to comment Share on other sites More sharing options...
structo Posted December 17, 2016 Author Share Posted December 17, 2016 Thank you my dear friend, now its perfectly working. 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.