Jump to content
hamit

quantities

CADTutor

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

Message added by CADTutor

Recommended Posts

hamit


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 .

B 6 BLOK 0,00 ATAŞMAN.dwg

uo.lsp

Edited by hamit

Share this post


Link to post
Share on other sites
hamit
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.

B 6 BLOK 0,00 ATAŞMAN.dwg

uo.lsp

 

Share this post


Link to post
Share on other sites
BIGAL

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

 

Share this post


Link to post
Share on other sites
hamit

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...
Thank you for your interest.

Share this post


Link to post
Share on other sites
BIGAL

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.

 

image.png.e3053a0a7d6a7a50f371c1ed591bb17f.png


(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 this post


Link to post
Share on other sites
Roy_043

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 this post


Link to post
Share on other sites
hamit

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
Thank you for your attention.ALn.Lspuo.lsp

Share this post


Link to post
Share on other sites
BIGAL

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 this post


Link to post
Share on other sites
hamit

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

ar.LSP

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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