Creating a LISP to cube concrete for foundations basic formula help

Creating a LISP to cube concrete for foundations basic formula help

Anonymous
Not applicable
1,420 Views
3 Replies
Message 1 of 4

Creating a LISP to cube concrete for foundations basic formula help

Anonymous
Not applicable

Hi,

 

I have been using the TLEN lisp to help speed up working out how much concrete I need for footings.

I have been looking into writing my own LISP to save myself even more time but am finding the whole thing very confusing so wondered if anyone was able to lend a hand.

Basically I want the total length outcome to then be used in helping whilst I am still in ACAD, perhaps in a dialogue box, I.E:

 

DEPTH = 1.500

WIDTH = 0.600 

TLEN = 50.500

(DxWxT= Ym2)

 

Depth and width would have to be manually entered to work out Ym2 each time as it does vary.

 

Any help is much appreciated!

 

Thanks,

M

0 Likes
Accepted solutions (1)
1,421 Views
3 Replies
Replies (3)
Message 2 of 4

Kent1Cooper
Consultant
Consultant
Accepted solution

I assume you mean Ym3....

 

Not in dialog-box form, but a very basic start:

(defun C:CU (/ dep wid len)
  (setq
    dep (getdist "\nDepth: ")
    wid (getdist "\nWidth: ")
    len (getdist "\nLength: ")
    u3 (rtos (* dep wid len) 2 2)
  )
  (strcat "Total volume = " u3 " cubic units.")
)

Change the word "units" to "meters" if you like, and change the precision in the (rtos) function if you need a different number of decimal places.

 

 

It leaves the calculated volume in the u3 variable [not localized] for use in something further if needed

Kent Cooper, AIA
0 Likes
Message 3 of 4

Anonymous
Not applicable

Sorry, yes I mean Ym3. Thanks for getting back to me, I'll give this a go.

0 Likes
Message 4 of 4

Anonymous
Not applicable

This is great, managed to insert it into a current LISP and it serves well. Thanks so much.

Its now moved me onto trying to understand DCL writing. Although the LISP works fine and does what I want it to do I would like to make it into a dialogue box. Can anyone recommend any websites for me to browse? Or able to have a quick look at writing a brief bit for me to dissect and understand.

Thanks again.

M

0 Likes