# quantities

I have contacted the OP and asked that the post be made in English.

## Recommended Posts

Herkese merhaba ; her şeyden önce çeviri ile yazıyorum. Tüm polilleri farklı katmanlar halinde çiziyorum. Bana ne istediğimi söyle. Diğerlerini kapatmak istediğim katmanı seçiyorum ve sonra toplam uzunluğu ölçeceğim, sonra bana yüksekliği soracağım, örneğin 55 cm diyorum, sonra 55 cm yazdığım katmanın toplam uzunluğu ve çarpımın sonucunu bu iki tablonun örnek dosyasını göndermek istiyorum ekli göndereceğim.
lispi ekinde buldum .

Edited by hamit

##### Share on other sites
6 hours ago, hamit said:

Hello everyone. First of all, I write in translation. I draw all the polylines in different layers. Then, by closing the ones outside the layer where these are located, I find the fields and size totals with the help of area and height lisps. I'm putting this data in the painting I've already prepared. Here's how I want lisp. He'll pick the heights on the layer and ask me about the height, like 55 cm, and then he's going to autocade it in a table. The painting will write the total height-height-result on that layer.and I'm sorry my English is bad.

##### Share on other sites

The word your looking for is length not height in English.

##### Share on other sites

I didn't have English, so I couldn't do it.
The total length I found with uo lisp will multiply with the height I will determine and give it in a table.
total height-will-determine height-total area in the table
I hope I can explain my problem...

##### Share on other sites

I will try to explain a problem the layer name is causing problem in this code. "- DÖSEME TABAN MINHA"

(setq ss (ssget  (list (cons 0 "Lwpolyline")(cons 8 layer)))) it is I think as non English in Autocad.

Please test this sample code, you can copy paste it all to Autocad command line this should appear.

```
(defun ahtest ( / lay ss area len)
(setq obj (vlax-ename->vla-object (car (entsel "pick pline object"))))
(setq lay (vla-get-layer obj))
(setq ss (ssget (list (cons 0 "Lwpolyline")(cons 8 lay))))
(setq area  0.0)
(setq len 0.0)
(repeat (setq x (sslength ss))
(setq obj (vlax-ename->vla-object (ssname ss (setq x (1- x)))))
(setq area  (+ (vla-get-area obj)area))
(setq len (+ (vla-get-length obj) len))
)
(setq area (/ area 10000.0))
(setq len (/ len 1000.0))
(alert (strcat "area = " (rtos area 2 2 ) "\n \nLength = "(rtos len 2 2 )))
)
(ahtest)

```

##### Share on other sites

From what I understand of the problem:

The OP has a drawing with closed polylines each representing a concrete floor area with a certain construction height. The smaller polylines have to be subtracted from the polyline that encloses them, resulting in the area of the beams that have the largest construction height. The construction heights can be derived from the layer names. The result should be a table listing the total area for each floor/beam layer ("Layer", "Construction height", "Total area").

##### Share on other sites

First of all, thank you for your interest. I live in Turkey. We need to calculate the mold area and the total concrete in the constructions we build.
I draw all the productions in a separate layer and find the total size with uo lispi. Bur should ask me the height and give me the result after finding the total length I want.
The ranking will be as follows:
total length*h=result
it should also throw it as an autocate table.
In the concrete calculation, I use forehead lispin. Here, I accept the entire flooring 70 cm and minha the height of the floor from the inside.
After finding the total area in the aln lispin, he should ask me the height and give me the result in a table
The ranking will be as follows:
total space in that layer*H=result
Roy_043 is close to understanding me.

after performing the process in both lisps will ask the high and give the result in the form of a table

##### Share on other sites

Another way is using solids extrude outside and insides to thickness. Then subtract insides and use massprops to get volume.

Or just take what I did add pick outside 1st separately then subtract inside total area * thickness is volume.

Note I could not ssget the layer via name.

##### Share on other sites

Hi
Mr. Bigal, thank you for your interest. I found a lisp. This solves the area*h=volume portion of my lisp problem. I'm sending lispi in attachment. Can we arrange this lispi to find the total polyline length, not the total area?
In other words, the attached lisp will find the total length, not the total area. The rest of it stays the same.
Regards..

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

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.