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: 

Compare Points Perpindicular to Surface

54 REPLIES 54
SOLVED
Reply
Message 1 of 55
andrew.normore
5382 Views, 54 Replies

Compare Points Perpindicular to Surface

Hi All,

 

Just wondering if anybody has a solution to my problem. I am working on drawings where we create dtm's from surfaces, use the dtm for layout, shoot the asbuilt of the final surface, and then compare hundreds of shots to the surface to develop an as-build report.

 

I want to be able to select a mass of points, compare the perpindicular difference in elevation to the surface, and have an excel spread sheet generated from the results.

 

My coworkers are able to do this in Terramodel but I am on a mission to eliminate Terramodel from my day to day work.

 

Just hoping somebody may have come across this before and can shed some light as to what commands or add-ons are availbable. I've never worked with a LISP but i am certainly open to suggestions at this point.

 

 

Windows 7 x 64
Dell Precision M6600 Mobile Workstation
16 GB Ram
i7 @ 2.5 ghz
Civil 3D 2012 SP 1
Civil 3D 2011
Autodesk Inventor 2011
AutoCad Map 3D 2011
54 REPLIES 54
Message 41 of 55
tcorey
in reply to: jarnold5BJKD

Use APPLOAD command to load it, then type go at the command prompt to make it run.



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

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 42 of 55

SIR I TRY YOUR LISP BUT NOT GIVE ANSWER IN EXCEL.YOU CAN SEND ME SOME SCREEN SHOTS.OR LISP AGAIN MY MAIL

Message 43 of 55

The LISP writes a file called c:\PointDepth.txt, which can be opened with Excel.



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

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 44 of 55

Dear sir,

                 i attached my points and lisp file please check and send me corrected lisp.i cant get value.

 

Message 45 of 55

Sir please check this lisp. I cannot get answer.
Message 46 of 55

That was meant to report on COGO Points. You have AutoCAD Points.

 

I revised the lisp so that it reports on AutoCAD Points. It will also now write the report file into the same folder as the drawing. The report will be named the same as the drawing name, plus _PointDepth.txt. For example: ELEV. DEFFERENCE STUDY_PointDepth.txt

(defun c:go ( / srf vsrf fl pts len ctr p vp pno x y elv srfz depth elvx srfzx output)

  (setq srf (vlax-ename->vla-object (car (entsel "\nSelect reference surface: "))))
	
  (setq fl (open (strcat (filenamegetter) "_PointDepth.txt")
	     "w"
       )
  )
  (write-line "PointElevation, SurfaceElevation, DistanceToSurface" fl)
  (prompt "\nSelect points to report: ")
  
  
  (setq pts (ssget))
  (setq len (sslength pts)
	    ctr 0)

  (while (< ctr len)

    (setq p (ssname pts ctr))

    (if (= (cdr (assoc 0 (entget p))) "POINT")
      (progn
	(setq vp (vlax-ename->vla-object p)
	      
	      x  (car (vlax-get vp 'Coordinates))
	      y (cadr (vlax-get vp 'Coordinates))
	      elv (caddr (vlax-get vp 'Coordinates))
	      )
	(setq srfz (vlax-invoke-method srf 'FindElevationAtXY x y))
	(setq depth (rtos (- srfz elv) 2 3))
	(setq elvx (rtos elv 2 3)
	      srfzx (rtos srfz 2 3)
	      
	      )
	(setq output (strcat elvx "," srfzx "," depth))
	(write-line output fl)
	
	)
      
      )
    (setq ctr (1+ ctr))
    )
  (close fl)
  (princ)
  )
  
  
  
  (defun filenamegetter ( / )
  (setq pref (getvar "DWGPREFIX")
	dwgnm (substr (getvar "dwgname") 1 (- (strlen (getvar "dwgname")) 4))
	)
  (setq dwgnm (strcat pref dwgnm))
  )


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

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 47 of 55

Thank you very much sir its working in Cogo points and AutoCAD .once again
thanks.
Message 48 of 55
Fantoon
in reply to: tcorey

Dear Timoty,

 

I've stumbled upon this thread and hoping to try this lisp out but I'm getting this error message.


Any chance why this is happening. Civil 3D 2019 64bit.

 

"Select objects: 1 found
Select objects:
20481,78.04,361.31,283.27
; error: bad argument type: streamp nil"

AutoCad 2019 & Civil3D 2019.
Lenovo P52
Intel i7 8850H @ 2.6GHz
32 GB RAM
512 GB SSD
NVIDIA Quadro P2000
Message 49 of 55
tcorey
in reply to: Fantoon

Are you selecting AutoCAD points or Civil 3D COGO Points? It makes a difference.

 

Tim



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

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

Hi,


I'm using cogopoints. Is't possible to get a column for the surface height of that particular point (for validatio purposes) and a column for description?

Kind Regards

Fadi

AutoCad 2019 & Civil3D 2019.
Lenovo P52
Intel i7 8850H @ 2.6GHz
32 GB RAM
512 GB SSD
NVIDIA Quadro P2000
Message 51 of 55
bien.magtuto
in reply to: Jeff_M

Hi

 

The report is not perpendicular instead its vertical.  It wont work in Batter or surface with slope.

 

Is there anyone that solves this issue?

Message 52 of 55
bien.magtuto
in reply to: tcorey

Hello,

 

The lisp is reporting the vertical distance from a surface to a point and not a 3d distance perpendicular to a surface. This will not work in surface like batter and with slope. Please is there anyone who can solve the issue.

 

Thanks.

Message 53 of 55

So did you find a solution for perpendicular ?

Message 54 of 55
TerryDotson
in reply to: bien.magtuto

Please is there anyone who can solve the issue.

Seems to me there are three possible solutions.  The first instance of this distance between problem has been addressed.

 

  1. (One Surface): Obtain the vertical distance from a free point in space vertically to intersect a single surface.
  2. (One Surface): Obtain the tilted distance from a free point in space to intersect a single surface, perpendicular to the target surface.
  3. (Two Surfaces): Obtain the tilted distance from a point lying on a surface, the direction being perpendicular from the surface the point lies on, but not guaranteed to be truly perpendicular to the target surface.  The only way the vector could be truly perpendicular to both surfaces would require a manufactured material (like a thick rubber mat) to be applied.

Detailed reporting would require each vectors azimuth and vertical angle along with the slope distance.

Message 55 of 55
mzygmuntowski
in reply to: tcorey

I'm getting the same error and I am using COGO points for the first lisp and AutoCad points for the second. Any help would be appreciated. 

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report