Jump to content

TotalArea, TotalPerim Lisp Error


asami586

Recommended Posts

I got these LISP file at http://gile.pagesperso-orange.fr/LISP.html

(Always Thanks Mr. GileCAD)

But these Lisp don't work for me.

When I command, I got the following messages.

 

 

 

-----------------------------------------------------------------------------------------------------------

 

Command: perimbox

Param?res courants : PERIMCONV = 1 PERIMPREC = 4

Erreur: too many arguments

 

-----------------------------------------------------------------------------------------------------------

 

Command: totalarea Unknown command "TOTALAREA". Press F1 for help.

Command: areabox ; error: no function definition: C:TOTALAREA

 

-----------------------------------------------------------------------------------------------------------

 

 

 

What's the problem?

Please Help me!

TotalArea.zip

TotalPerim.zip

Link to comment
Share on other sites

Another one with combination of both :

 

(DEFUN C:CAREA (/ A B C O P)
 (IF (SETQ A (SSGET '((0 . "*LINE,CIRCLE,ELLIPSE,HATCH"))))
   (PROGN
     (SETQ B 0.
    P 0.
     )
     (REPEAT (SETQ I (SSLENGTH A))
(SETQ O (VLAX-ENAME->VLA-OBJECT (SSNAME A (SETQ I (1- I)))))
(SETQ B (+ B (VLA-GET-AREA O)))
(SETQ P (+ P (VLA-GET-LENGTH O)))
     )
     (SETQ C (STRCAT "\nTotal Area :- \n\n\tIn Meters = "
	      (RTOS B 2 4)
	      " Sq.Mtr\n\n\tIn Acre = "
	      (RTOS (* B 0.000247104393) 2 4)
	      " Acre\n\nTotal Perimeter :- \n\n\tIn Meters = "
	      (RTOS P 2 4)
	      "m"
      )
     )
     (PROMPT C)
     (ALERT C)
   )
 )
 (PRINC)
)

Link to comment
Share on other sites

These LISP routines do work (and are daily used by many people), but if you're using AutoCAD LT (as shown in your profile) you cannot use any LISP.

 

PS: I also tried to reply you in your double post at TheSwamp.

PPS: to Lee and Satishrajdev, just have a look at theses codes, you'll see these routines does much more than printing values in the command line...

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...