Community
Civil 3D Forum
Welcome to Autodesk’s Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multiple 3d area

23 REPLIES 23
SOLVED
Reply
Message 1 of 24
Danny.Gaudet
890 Views, 23 Replies

Multiple 3d area

Hi, so here's my problem, i have lots of points taken on the field that represent portions of lands where we had to fill with top soil. I need the area of those portions in square meters. My problem is that i can't use survey figure or parcels because it gives me a 2d surface area... and i need the 3d surface area.. there's not a lot of difference between one protion... but i have like over a hundred little patches.

 

Is there a way to get those area quick and easy without having to build one surface for each of them and going to the stats screen ?

 

Thank you

Danny Gaudet
Surveyor
Construction G-nesis, Qc, Canada
Using Civil 3d 2024
23 REPLIES 23
Message 21 of 24
tcorey
in reply to: Danny.Gaudet

Hello Danny,

 

If you insert the attached .dwg into your drawing as a block, the following code will call that block and insert the 3darea with the the selected polyline as the lone attribute. The routine will ask you where to place it. Also, I removed the pop-up dialog that shows the answer and replaced it with a command line prompt.

 

The text will be 0.25 x the current annotation scale. You probably use metric, so we might have to tweek the program to get the size to work for you. Everyone says metric is easy, but it's beyond what my brain can comprehend. 😉

 

Tim

 

;copyright (c)2014 by Timothy Corey
;Delta Engineering Systems, Redding, CA
;Autodesk Authorized Value-Added Reseller
;permission is hereby granted for free use of this program as-is
;This program or any portion may not be sold or combined with any
;for-sale software.
;It is the responsibility of the user to debug the software
;to determine its usability and accuracy.

(defun c:go (/	     cosn    surf    vsurf   bdy vbdy what surf2 bdys answer ar
	    )
  (vl-load-com)
  
  
  (setq cosn (getvar "OSMODE"))
  (setq annosc (/ 1 (getvar "CANNOSCALEVALUE")))

					;get surface object
  (setq	surf  (car (entsel "\nSelect surface: "))
	vsurf (vlax-ename->vla-object surf)
  )
 (setq bdy (car (entsel "\nSelect sub-boundary polyline for 3d surface area calculation: ")))
  (setq vbdy (vlax-ename->vla-object bdy))
  

  (while (and bdy)
    (if (or (= (cdr (assoc 0 (entget bdy))) "LWPOLYLINE")(= (cdr (assoc 0 (entget bdy))) "POLYLINE"))
      (progn
	(get3darea)
	(addnotelabel)
	)
      (setq what (getstring "\nBoundary object must be polyline, press any key to continue: "))
      )
     (setq bdy (car (entsel "\nSelect sub-boundary polyline for 3d surface area calculation: ")))
     (setq vbdy (vlax-ename->vla-object bdy))
    )
  (setvar "OSMODE" cosn)
  (princ)

)					;end defun go


(defun get3darea()
  (setq Surf2 (vlax-invoke-method vsurf 'copy ))
  (setq bdys (vlax-get-property surf2 'boundaries))
  (vlax-invoke-method bdys 'add vbdy "NewBdy" 4 T 1.0)
  (vlax-invoke-method surf2 'rebuild)
  (setq	stats (vlax-get-property Surf2 'Statistics))
  (setq Answer (strcat "\n3d surface area inside this polyline is: " (rtos (vlax-get-property stats 'area3d) 2 2)))
  (setq Ar (rtos (vlax-get-property stats 'area3d) 2 2))
  (vlax-invoke-method Surf2 'delete)
  (prompt answer)
  (princ)
  )


;add note label function
(defun AddNoteLabel()
  (setq p1 (getpoint "\nPick label insertion point: "))
  (vl-cmdf "Insert" "Surf3DArea" p1 annosc annosc 0 ar)
  
  (princ)
  )

  






  

 

 

 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 22 of 24
drenaud
in reply to: Danny.Gaudet

C3D 2018 Win7

 

I am doing the same thing, computing 3D areas for paying the contractor. The work was done on the side of a hill, so 2D won't do.

 

The lisp works well, but ...

 

It has been a long time, but didn't LDT do this with parcels? Is there a way to create parcels and have a report for 3D areas within a surface? It isn't practical to create a separate surface for each parcel.

 

thanks

Message 23 of 24
tcorey
in reply to: drenaud

That could be done, but would take a couple of hours of programming.



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 24 of 24
tcorey
in reply to: drenaud

Here's a quick way to make those polylines around the parcels, then you can use the lisp routine to create the labels.

 

https://www.youtube.com/watch?v=l7Wim5CWIAo

 

 

 

 



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Gold Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report