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: 

How to create points with the help of sample lines?

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
mughaladeel9
765 Views, 8 Replies

How to create points with the help of sample lines?

How can i create/export points using sample lines.

Labels (2)
8 REPLIES 8
Message 2 of 9
ecfernandez
in reply to: mughaladeel9

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
Message 3 of 9
tcorey
in reply to: mughaladeel9

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
Message 4 of 9
mughaladeel9
in reply to: ecfernandez

.

Message 5 of 9
mughaladeel9
in reply to: ecfernandez

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

Message 6 of 9
Joe-Bouza
in reply to: mughaladeel9

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

Message 7 of 9
TerryDotson
in reply to: mughaladeel9

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.

Message 8 of 9
ecfernandez
in reply to: mughaladeel9

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
Message 9 of 9
Joe-Bouza
in reply to: mughaladeel9

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

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

Post to forums  

Rail Community


Autodesk Design & Make Report