+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 28
  1. #1
    Full Member
    Using
    AutoCAD 2010
    Join Date
    Oct 2016
    Posts
    75

    Default Room Dimensioning Lisp requesting

    Registered forum members do not see this ad.

    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.
    Attached Images
    Attached Files

  2. #2
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro K4200, 4GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2018
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    46,109

    Default

    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?
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

    I'm now a full member of the Society for the Promotion of Mediocrity in CAD. Standards? We don't need no stinkin' standards! Take whatever advice I offer and do the opposite.

  3. #3
    Full Member
    Using
    AutoCAD 2010
    Join Date
    Oct 2016
    Posts
    75

    Default

    Quote Originally Posted by ReMark View Post
    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.

  4. #4
    Super Member hanhphuc's Avatar
    Using
    AutoCAD 2007
    Join Date
    Apr 2013
    Location
    Happy Garden
    Posts
    520

    Default

    Quote Originally Posted by structo View Post
    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
    lambda not optimized.. ( apply '= "hp" "happy" "hạnh phúc" "ハッピー" "幸福" "행복" ) ; error: too many arguments

  5. #5
    Super Member
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2015
    Join Date
    Nov 2013
    Posts
    981

    Default

    My shot at this:
    Code:
    (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.

  6. #6
    Full Member
    Using
    AutoCAD 2010
    Join Date
    Oct 2016
    Posts
    75

    Default

    Quote Originally Posted by hanhphuc View Post
    almost similar old thread
    you can tweak it yourself, many active members here will guide you
    Thank you Han for responding,

    i will see your link.

    Thanks.

  7. #7
    Full Member
    Using
    AutoCAD 2010
    Join Date
    Oct 2016
    Posts
    75

    Default

    Quote Originally Posted by Grrr View Post
    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.

  8. #8
    Full Member
    Using
    AutoCAD 2010
    Join Date
    Oct 2016
    Posts
    75

    Default

    Quote Originally Posted by hanhphuc View Post
    almost similar old thread
    you 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.

  9. #9
    Full Member
    Using
    AutoCAD 2010
    Join Date
    Oct 2016
    Posts
    75

    Default

    Hi friends,

    please modify for Feet and inches units ( imperial units) Grr's code (Post#5). i would appreciates for help.

    Thank you all.

  10. #10
    Senior Member
    Using
    AutoCAD 2009
    Join Date
    Oct 2012
    Posts
    256

    Default

    Registered forum members do not see this ad.

    Use this macro:
    Attached Files

Similar Threads

  1. Room Tag LISP Routine
    By rmjcorp in forum AutoLISP, Visual LISP & DCL
    Replies: 34
    Last Post: 10th Oct 2011, 06:25 am
  2. Replies: 1
    Last Post: 30th Aug 2010, 06:00 pm
  3. Requesting help on modifying a LISP routine...
    By Heesh in forum AutoLISP, Visual LISP & DCL
    Replies: 26
    Last Post: 1st Jan 2009, 03:01 pm
  4. Requesting Information
    By Scummy007 in forum AutoCAD Beginners' Area
    Replies: 21
    Last Post: 3rd Mar 2008, 04:05 pm
  5. LISP requesting user input
    By cim123 in forum AutoLISP, Visual LISP & DCL
    Replies: 3
    Last Post: 28th Sep 2007, 04:21 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts