How to create points with the help of sample lines?

mughaladeel9
Explorer
Explorer

How to create points with the help of sample lines?

mughaladeel9
Explorer
Explorer

How can i create/export points using sample lines.

0 Likes
Reply
Accepted solutions (1)
767 Views
8 Replies
Replies (8)

ecfernandez
Advisor
Advisor

Hi @mughaladeel9, what would be the output you are looking for?

Camilo Fernández

Civil engineer | Specialist in design, construction, and maintenance of roadways

EESignature

LinkedIn
0 Likes

tcorey
Mentor
Mentor

If you only need the Sample Line endpoints (vertices), with VisualLISP, you can drill down to the Location property for each vertex. It would be easy enough to create a COGO Point or an AutoCAD Point at that location. This code creates AutoCAD Point entities at Sample line vertices. Select a Sample Line, the code will place points for all sample lines in the group.

 

(defun c:go ( / smpl smpgp smplns ctr cnt vtcs vcnt vctr vtx loc)
(vl-load-com)

(setq smpl (vlax-ename->vla-object (car (entsel "\nSelect a Sample Line: "))))
(setq smpgp (vlax-get smpl 'Parent))
(setq smplns (vlax-get smpgp 'SampleLines))
(setq ctr 0
	  cnt (vlax-get smplns 'Count))
	  
	  (while (< ctr cnt)
			  (setq smpl (vlax-invoke smplns 'Item ctr))
			  (setq vtcs (vlax-get smpl 'Vertices)
					vcnt (vlax-get vtcs 'Count)
					vctr 0)
					
					(while (< vctr vcnt)
							(setq vtx (vlax-invoke-method vtcs 'Item vctr))
							(setq loc (vlax-get vtx 'Location))
							(setq vctr (1+ vctr))
							
							(vl-cmdf "Point" loc)
							)
							
			(setq ctr (1+ ctr))
			)
			(princ)
			)

 

 



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

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

mughaladeel9
Explorer
Explorer

.

0 Likes

mughaladeel9
Explorer
Explorer

I'm looking for the points at specific interval and offset with single click.

Joe-Bouza
Mentor
Mentor

What do cross section reports offer?

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

TerryDotson
Mentor
Mentor
Accepted solution

If you were to consider third party add-ons, DotSoft's C3DTools will process an alignment, collecting points (optionally places CogoPoints) along the sample lines.  Exports station, offset, northing, easting and surface elevation at specified intervals (like -10,0,10) or all points where the sample line intersects the triangles of the surface.

ecfernandez
Advisor
Advisor

You can create the points wherever you need them and then use the "Station Offset to Points" report to get the information

ecfernandez_0-1679502825488.png

 

Camilo Fernández

Civil engineer | Specialist in design, construction, and maintenance of roadways

EESignature

LinkedIn
0 Likes

Joe-Bouza
Mentor
Mentor

Set the corridor to the sample line increment and write cog point from corridor >> export

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes