AutoCAD Civil 3D General Discussion

AutoCAD Civil 3D General Discussion

Reply
Active Contributor
torner
Posts: 45
Registered: ‎02-02-2007
Message 1 of 11 (241 Views)
Accepted Solution

Export points - order

241 Views, 10 Replies
08-06-2013 08:05 AM

I have a PNEZD .txt file that was used to bring into C3D using Points From a File.

After this, figures were brought in using Import Survey Data with the option Process Linework Sequence= By Import Order.

Some Raw Description edits were then made within the dwg file.

Finally, an Export Points (back to a PNEZD txt file) was made.This file has the Points listed numerically 1-10000.

If a user wanted to Import this file, it wouldn't come in correctly because it has lost the "Import Order".

 

Is there any way that this "order" could be preserved? Is there a different process that could be used?

Kinda learning this on my own, so bear with me.

Tom
C3D 2012 sp4\C3D 2014 sp2
W7Pro 64bit
HP Z400 Workstation
16 GB RAM
Intel Xeon CPU W3565@3.20GHz
NVIDIA Quadro 4000

Hello Tom,

 

Copy the code I posted. Paste into a Notepad document. Save the file as ExportPointsinCreationOrder.lsp. 

 

When in AutoCAD Civil 3D, use the Appload command to find and load ExportPointsinCreationOrder.lsp. Once it has been loaded, type Go and it will run.

 

I didn't take the time to make dialog calls so it just creates a file called ExportedPoints.txt in C:\. The format is P,N,E,Z,D.

 

Tim

Valued Mentor
dmartin
Posts: 406
Registered: ‎04-09-2013
Message 2 of 11 (223 Views)

Re: Export points - order

08-06-2013 09:26 AM in reply to: torner

I have never heard of a way, but you might be able to get creative with excel?

Thanks,
Dave

Civil 3D 2013
HP Z400 Workstation
6GB of RAM
296GB HDD
ATI FirePro V5700(FireGL)
Win 7 Home Professional
Please use Kudos Where Deserved



*Expert Elite*
tcorey
Posts: 2,699
Registered: ‎12-18-2002
Message 3 of 11 (210 Views)

Re: Export points - order

08-06-2013 11:05 AM in reply to: torner

Post your original import file for us to play with.

Tim Corey, Owner
Delta Engineering Systems
Redding, CA
Autodesk Authorized Value-Added Reseller
Active Contributor
torner
Posts: 45
Registered: ‎02-02-2007
Message 4 of 11 (207 Views)

Re: Export points - order

08-06-2013 11:40 AM in reply to: tcorey

The points in particular are the centerline of road points (CLN). It seems that some CLN was picked up by survey (1000 point #'s) and then some was picked up again later (23000 point #'s). Example: 1338 and 23170 area is "filling in" the CLN line.

 

 

Tom
C3D 2012 sp4\C3D 2014 sp2
W7Pro 64bit
HP Z400 Workstation
16 GB RAM
Intel Xeon CPU W3565@3.20GHz
NVIDIA Quadro 4000
Valued Mentor
ericcollins6932
Posts: 334
Registered: ‎05-13-2010
Message 5 of 11 (196 Views)

Re: Export points - order

08-06-2013 12:57 PM in reply to: torner

I would suggest creating a point group with the points you want, assuming pt numbers are incrementally correct. Then you can either export the group, or renumber the points and then export.

Eric Collins, P.Tech.(Eng.)

Win 7 Enterprise SP1 64 bit
Intel i7 3770 @ 3.40 GHz
16 GB RAM
Civil 3D 2012 SP2
Mentor
cbaildon001
Posts: 165
Registered: ‎06-28-2008
Message 6 of 11 (187 Views)

Re: Export points - order

08-06-2013 01:20 PM in reply to: torner

Another option would be to ignore/remove the points you have and use Create Points>Polyline Vertices - Automatic. This will create points with sequential point numbers.

Caleb Baildon
Surveyor
Opus International Consultants Ltd
Greymouth, New Zealand
Civil3D 2015 - Windows7 64bit
*Expert Elite*
tcorey
Posts: 2,699
Registered: ‎12-18-2002
Message 7 of 11 (174 Views)

Re: Export points - order

08-06-2013 02:40 PM in reply to: torner

The following code will export your points in the order of creation, without regard to point number.

 

;routine exports points in order of creation, not point number order
;|Copyright (c) Timothy K. Corey
Delta Engineering Systems
Redding, CA
for use by Autodesk AutoCAD Civil 3D discussion group participants.
You may distribute the code as-is but you may not sell it for any reason|;

(defun c:go (/ fl ls len ctr p pvl info)

  (vl-load-com)

  (setq fl (open "c:\\ExportedPoints.txt" "w"))

  (setq ls (ssget "x" (list (cons 0 "AECC_COGO_POINT")))
	len (sslength ls)
	ctr (- len 1)
	)


   (while (>= ctr 0)

    (setq p (ssname ls ctr)
	  pvl (vlax-ename->vla-object p)
	  )
     (ptInfo)
     (write-line Info fl)
     (setq ctr (- ctr 1))
     )
  (close fl)
  (princ)

);end defun


(defun ptInfo(/ nor eas z no desc)
  (setq Nor (vlax-get-property pvl 'Northing)
	  Eas (vlax-get-property pvl 'Easting)
	  Z (vlax-get-property pvl 'Elevation)
	  No (vlax-get-property pvl 'Number)
	  Desc (vlax-get-property pvl 'Description)
	Info (strcat (itoa no) "," (rtos Nor) "," (rtos Eas) "," (rtos Z) "," Desc)
	  )
  (princ)
  );end PtInfo

Best regards,

 

Tim

 

Tim Corey, Owner
Delta Engineering Systems
Redding, CA
Autodesk Authorized Value-Added Reseller
Active Contributor
torner
Posts: 45
Registered: ‎02-02-2007
Message 8 of 11 (158 Views)

Re: Export points - order

08-07-2013 06:16 AM in reply to: tcorey

Thanks Tim. I'd like to try this but have no idea how to run this or any code. If it is something easy I'd give it a try, but if it's going down another track I would rather not. I think I have some more learning and testing to do in C3D survey area. Thanks.

Tom
C3D 2012 sp4\C3D 2014 sp2
W7Pro 64bit
HP Z400 Workstation
16 GB RAM
Intel Xeon CPU W3565@3.20GHz
NVIDIA Quadro 4000
Valued Mentor
IanMcClain
Posts: 460
Registered: ‎09-29-2008
Message 9 of 11 (152 Views)

Re: Export points - order

08-07-2013 07:11 AM in reply to: torner

I would edit the input file with necesary edits. I do this commonly do this for survey data so as to preserve and document any edits made to the data. Typically I comment out the original line, copy and past it to the next line and make an edit there.

-Ian McClain
(running C3D 2012 sp4, Win7 64bit, 8GB)
*Expert Elite*
tcorey
Posts: 2,699
Registered: ‎12-18-2002
Message 10 of 11 (145 Views)

Re: Export points - order

08-07-2013 08:35 AM in reply to: torner

Hello Tom,

 

Copy the code I posted. Paste into a Notepad document. Save the file as ExportPointsinCreationOrder.lsp. 

 

When in AutoCAD Civil 3D, use the Appload command to find and load ExportPointsinCreationOrder.lsp. Once it has been loaded, type Go and it will run.

 

I didn't take the time to make dialog calls so it just creates a file called ExportedPoints.txt in C:\. The format is P,N,E,Z,D.

 

Tim

Tim Corey, Owner
Delta Engineering Systems
Redding, CA
Autodesk Authorized Value-Added Reseller
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!