Jump to content

carpet area & room size


sachindkini

Recommended Posts

DEAR ALL

PLZ HELP ME

CAN U MAKE THIS TYPE OF LSP

ROOM SIZE.LSP

1) ROOM TITLE LAYER & TEXT STYLE

2) ROOM SIZE IN METER & TEXT STYLE

3) ROOM SIZE IN FEET & TEXT STYLE

CARPET AREA.LSP

1) CARPET AREA LAYER & TEXT STYLE

2) CARPET AREA IN SQ. METER & TEXT STYLE

3) CARPET AREA IN SQ. FEET & TEXT STYLE

SORRY FOR BAD ENGLISH

THNX

ROOM SIZE.pdf

CARPET AREA.pdf

Link to comment
Share on other sites

Time to hang out the sign:

 

Custom Lisp Routines Designed While You Wait.

 

No appointment necessary.

 

Haha, so true.

 

So many users think this place is just a LISP supermarket, and don't realise its only really for help and advice.

Link to comment
Share on other sites

It's the mentality of "I'll pay you anything you want as long as you except Monopoly money."

 

In no way is this meant to belittle the talent that you, Lee Mac and others, have for developing Lisp routines. On the contrary, I'm amazed at the speed in which you pull this off, making the task appear to be almost effortless.

 

I'd like to see requests like this be worded a bit more politely. And I'd also like to see the OP show his/her appreciation with a well intentioned and gracious word of thanks. It's the least anyone can do when a custom lisp routine is wonderously conjured out of thin air at a moment's notice.

 

So, on behalf of all the people you and others have helped, I sincerely thank you for the thought you've put into writing these lisp routines, for the effort you have made to help them with their problem, for the educational value of your follow-up posts regarding the formation of a good lisp routine and for the dedication you have shown in doing so without renumeration.

 

Thank you...Thank you...Thank you.

Link to comment
Share on other sites

It's the mentality of "I'll pay you anything you want as long as you except Monopoly money."

 

In no way is this meant to belittle the talent that you, Lee Mac and others, have for developing Lisp routines. On the contrary, I'm amazed at the speed in which you pull this off, making the task appear to be almost effortless.

 

I'd like to see requests like this be worded a bit more politely. And I'd also like to see the OP show his/her appreciation with a well intentioned and gracious word of thanks. It's the least anyone can do when a custom lisp routine is wonderously conjured out of thin air at a moment's notice.

 

So, on behalf of all the people you and others have helped, I sincerely thank you for the thought you've put into writing these lisp routines, for the effort you have made to help them with their problem, for the educational value of your follow-up posts regarding the formation of a good lisp routine and for the dedication you have shown in doing so without renumeration.

 

Thank you...Thank you...Thank you.

 

ReMark, you are too kind :P

Link to comment
Share on other sites

I suppose this is a start:

 

(defun c:roomsize (/ ent vLst xlst ylst xrange yrange)
 (if (and (setq ent (car (entsel "\nSelect Wall...")))
      (eq "LWPOLYLINE" (cdadr (entget ent))))
   (progn
     (setq vLst (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 10)) (entget ent)))
       xlst (mapcar '(lambda (y) (car y)) vLst)
       ylst (mapcar '(lambda (z) (cadr z)) vLst)
       xrange (- (apply 'max xlst) (apply 'min xlst))
       yrange (- (apply 'max ylst) (apply 'min ylst)))
     (alert (strcat (rtos xrange) "x" (rtos yrange)
            "\n" (rtos xrange 3) "x" (rtos yrange 3))))
   (princ "\n<!> No Wall Selected or This isn't an LWPOLYLINE <!>"))
 (princ))

 

I had nothing better to do :)

Link to comment
Share on other sites

Taking it a little further... (slap-dash LISPing, just throwing it together..)

 

(defun c:roomsize (/ ent vLst xlst ylst xrange yrange area)
 (if (and (setq ent (car (entsel "\nSelect Wall...")))
      (eq "LWPOLYLINE" (cdadr (entget ent))))
   (progn
     (setvar "CMDECHO" 0)
     (setq vLst (mapcar 'cdr (vl-remove-if '(lambda (x) (/= (car x) 10)) (entget ent)))
       xlst (mapcar '(lambda (y) (car y)) vLst)
       ylst (mapcar '(lambda (z) (cadr z)) vLst)
       xrange (- (apply 'max xlst) (apply 'min xlst))
       yrange (- (apply 'max ylst) (apply 'min ylst)))
     (command "_area" "_Object" ent) (setq area (getvar "AREA"))
     (alert (strcat (rtos xrange) " x " (rtos yrange)
            "\n" (rtos xrange 3) " x " (rtos yrange 3)
            "\n" (rtos area) " SQ.MT.\n" (rtos area 3) " SQ.FT.")))
   (princ "\n<!> No Wall Selected or This isn't an LWPOLYLINE <!>"))
 (setvar "CMDECHO" 1)
 (princ))

Link to comment
Share on other sites

WILL PROGRAM FOR BEER!

At least they should pretend to want to learn how to program

(defun c:freeProgram ()

;;;I’m stuck here can someone please fill in the rest

);_defun

Link to comment
Share on other sites

WILL PROGRAM FOR BEER!

 

At least they should pretend to want to learn how to program

 

(defun c:freeProgram ()

 

;;;I’m stuck here can someone please fill in the rest

 

);_defun

 

 

Haha John - you sum it up quite nicely. :)

 

I reckon we should have a "rant" forum, where everyone just posts threads about what really gets on their nerves... :P

Link to comment
Share on other sites

WILL PROGRAM FOR BEER!

At least they should pretend to want to learn how to program

(defun c:freeProgram ()

;;;I’m stuck here can someone please fill in the rest

);_defun

 

There's going to be BEER!! I'm there

 

Here is some room names things to play with.

RoomNames.zip

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...