Bill of quanntity

Bill of quanntity

Anonymous
Not applicable
1,467 Views
4 Replies
Message 1 of 5

Bill of quanntity

Anonymous
Not applicable

Hi,

 

I'm not new in using ACad and I'm familiar with lisp routin. I work on main project for buildings residential houses etc. For making BoQ I need a lisp routin to made the "proofs quantity", something to connect length and area of polylines (of one layer) with excel sheet. 

 

For example a quantity of concret walls, on one floor - length of every wall on the floor no mather if thay are draw with one or few polylines, but they are in a same layer. 

 

So fare, for my work I use ZONE lisp for total length and area of polylines in one layer and than calculate total quantity, but now I have new demand of architect I need proof for every individual part of polyline. Something like estimte takeoff but for the main architectural project.

 

Thank you for answer.

 

 

0 Likes
1,468 Views
4 Replies
Replies (4)
Message 2 of 5

Sea-Haven
Mentor
Mentor

A 1st step would be to make csv file of your lengths & Areas  by layer. A sum by layer is pretty straight forward, you need to make a list of layer names to be exported. You may need a couple of programs but joined into 1, make layer list or read pre-saved,  total area-lengths and write csv. 

 

A direct to excel adds a level of complexity. Call that version 2.

 

Now for some time.

 

Thinking a bit more does Dataextraction do what you want ?

0 Likes
Message 3 of 5

Sea-Haven
Mentor
Mentor

If you can provide more detail about what you want exported then it can be done this is an example of using layer filters, to make selections. You can use the normal windows selections on the list like hold shift or use ctrl to pick 1 at a time, thanks to lee-mac.

;; Dump objects by layers
;; By Alan H July 2019

;; thanks to 
;; List Box  -  Lee Mac
;; Displays a DCL list box allowing the user to make a selection from the supplied data.
(defun test (/ prefix p)
(if (not LM:listbox)(load "ListBoxV1-2.lsp"))
(setq  doc (vla-get-activedocument (vlax-get-acad-object)))
(setq laynames '())
(vlax-for lay (vla-get-Layers doc) 
(setq laynames (cons  (vla-get-name lay) laynames))
)
(setq laynames (LM:listbox "Choose layers" laynames 1))
(repeat (setq x (length  laynames))
(setq lname (nth (setq x (- x 1)) laynames))
(setq totlen 0.0)
(setq ss (ssget  "X" (list (cons 0  "LINE,arc,*polyline")(cons 8 lname))))
(if (/= ss nil)
(repeat (setq y (sslength ss))
(setq obj (ssname ss (setq y (- y 1))))
(setq len  (vla-get-length (vlax-ename->vla-object obj)))
(princ (strcat "\nLength is " (rtos len 2 2 )))
(setq totlen (+ totlen len))
)
(princ "no objects")
)
(princ (strcat "\nTot length " (rtos totlen 2 2 )))
)

)
0 Likes
Message 4 of 5

Anonymous
Not applicable

I can't load lisp routin you send me. 

I'll attach example of what I nead. AutoCad drawing (ACad 15) and excel file. I dont need all work done with lisp routin in excel Smiley Happy I'll will add everything I need to calculate final quantity (like thickness and high of walls, beams ...). 

Thank you for your answer.

0 Likes
Message 5 of 5

Sea-Haven
Mentor
Mentor

I would look at dataextraction this may be the simplest way to do what you want. 

0 Likes