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: 

Renumbering Points

82 REPLIES 82
SOLVED
Reply
Message 1 of 83
kevinsbane
12026 Views, 82 Replies

Renumbering Points

What I wish to do is to assign a set of points a sequence of point numbers (or custom properties) of my choosing. For example, I have the following points:

 

100

102

104

105

107

I wish to assign point 100 -> 1000, 105 to 1001, 107 to 1002, 104 -> 1003, and 102 ->1004. Basically, I am looking for a command or utility that implements the "TCOUNT" (using select-order) command, but for Cogo points instead of text. The renumber points command appears to only work with offsets, and does not eliminate gaps. I can sequence the points if I select the points I want, then copy them -> set duplicate points to sequence from the range I choose, but this does not allow for reordering of point numbers. I tried individually selecting them in the order I wanted, but didn't change the order in which they were numbered.

 

Alternatively, I can leave the point numbers the same, and assign a user defined property that I can use to sequence the points in the order of my choosing. However, I'm not sure how to go about assigning the sequence I wish short of typing in each value individually; obviously non-ideal.

 

A third possibility that presented itself to me was to create new, correctly sequenced points that overlap exactly with the old ones, and then somehow merge the two sets together. Would there be a way to merge the old points and the new ones based on the fact that the two points have the same X-Y coordinates? Preferably done in CAD itself; the last resort would be to export both sets of points out to excel, then do some fancy manipulation in excel, then reimport into CAD.

82 REPLIES 82
Message 2 of 83
bozoli
in reply to: kevinsbane

Hi Kevin,

 

I had struggled for quite some time with Renumbering Points till i got it right. Here is what i think might help your hustle. Select the disired point that you wish to renumber, then right-click and choose renumbering option, at the command line it will promp you to "Enter an additive factor for point number:", then if the Original point number is 100 and you wish to change it to 1000 then you enter "900" as an additive number..

 

for instance 100 to 1000 you enter "900"

                    105 to 1001 you enter "896"

                    107 to 1002 you enter "895"...etc

 

Hope you find this helpfull

Message 3 of 83
kevinsbane
in reply to: bozoli

I could do that, but I could then just renumber the points using the properties palette, and would be tedious to do with hundreds of points. What I am trying to figure out is some way to do this without individually entering in a new point number for every single point. Thus, a command or method that basically allows me to:

Select a bunch of points in a particular order
Renumber those points sequentially in that order, starting at a given point number.

 

Basically the same as the express tools TCOUNT command does for text, but working for COGO points.

Message 4 of 83
neilyj666
in reply to: kevinsbane

Export as csv and use Excel??

neilyj (No connection with Autodesk other than using the products in the real world)
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


AEC Collection 2024 UKIE (mainly Civil 3D UKIE and IW)
Win 11 Pro x64, 1Tb Primary SSD, 1Tb Secondary SSD
64Gb RAM Intel(R) Xeon(R) W-11855M CPU @ 3.2GHz
NVIDIA RTX A5000 16Gb, Dual 27" Monitor, Dell Inspiron 7760
Message 5 of 83
kevinsbane
in reply to: neilyj666

I could put down new points with new point numbers in the order I wish to, and export both the old and the new points to excel to combine them and then reimport back into Civil 3d. I am wondering if there is a simpler way though, especially one that stays internal to Civil 3D.

Message 6 of 83
Jeff_M
in reply to: kevinsbane

Attached is a small lisp file that will allow you to do this a bit quicker (I think) by selecting each point in the order you want the new number applied. There's something internal to C3D which keeps the point from updating on the screen until the command ends, so as you select a point the label will disappear...but it will come back with the new number at the conclusion of the command.

 

No selection set option is provided, you must select one at a time...but you would be doing so anyway to get the order you want.

 

Just load the lisp, then the command name is REORDERPOINTS.

 

Hope it helps...

 

Jeff_M, also a frequent Swamper
EESignature
Message 7 of 83
kevinsbane
in reply to: Jeff_M

It looks promising, but I seem to be getting an error.

 

Error: Civil 3D API: Unspecified errorAutoCAD variable setting rejected:  "CMDECHO" nil

 

I don't know what this has to do with anything. My CMDECHO is set to 1 right now, but even if I set it to 0 I still get the same error?

Message 8 of 83
Jeff_M
in reply to: kevinsbane

Interesting...I don't set any system variables in the lisp. What version of C3D are you using? (I see I failed to mention that this only works in 2010 - 2012.) At what point do you get that error? i.e., does it prompt for the next number? ask to select the point to change? nothing? Are you selecting points locked by the Survey databse? 

 

I ask all of these questions because I can run it fine on my own drawings, as well as any of the Points Tutorial drawings. And I tested with both 2010 & 2012. But since I wrote rather quickly I didn't test for all scenarios...

Jeff_M, also a frequent Swamper
EESignature
Message 9 of 83
kevinsbane
in reply to: Jeff_M

I'm running Civil 3D 2012. I can run it, and it asks me for a point number to sequence from, but it will give me the error when I select a COGO point.

 

But now it works. What? I don't get it... In any case, this was exactly what I was looking for! Thank you Jeff!

Message 10 of 83
wfberry
in reply to: Jeff_M

Jeff:

 

I loaded up an old drawing (at least a 2010 file, not sure) with 3D 2012 and no errors and instant number change on screen.

 

Bill

 

Message 11 of 83
Jeff_M
in reply to: kevinsbane

Glad I could help, Kevin.

 

Bill, thanks fot checking it out! So the numbers change on screen as you pick them? I wonder why they go awy and come back afterwards for me. (I would prefer they changed as I went, for sure.)

 

Jeff_M, also a frequent Swamper
EESignature
Message 12 of 83
JeffPaulsen
in reply to: Jeff_M

Jeff,

 

i just tried it here in C3D 2012. It works fine and I can see the point numbers change as I pick them. Thanks. This will be useful.

Jeff Paulsen
Civil 3D 2020.4 | Win 10 Pro N 64-bit
Xeon W-2223 @ 3.60GHz, 32GB Ram | NVidia Quadro P2200
Message 13 of 83
kevinsbane
in reply to: Jeff_M

I think it has to do with point groups. Once you change the point number, since point groups are (generally) defined by point number, it gets put into the default "All Points" point group. I find that if I have my "All Points" group set to a point label, it will show up as changed as soon as I click on the point. Perhaps one of your point groups was based on descriptions?

Message 14 of 83
dibr0804
in reply to: kevinsbane

How do you load the .lsp??

Message 15 of 83
neilyj666
in reply to: Jeff_M

download to a suitable location on your pc, then in C3d type APPLOAD at the command line and browse to the lsp, then hit LOAD (I think), then type the name of the command at the command line.

 

That should do it for you

neilyj (No connection with Autodesk other than using the products in the real world)
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


AEC Collection 2024 UKIE (mainly Civil 3D UKIE and IW)
Win 11 Pro x64, 1Tb Primary SSD, 1Tb Secondary SSD
64Gb RAM Intel(R) Xeon(R) W-11855M CPU @ 3.2GHz
NVIDIA RTX A5000 16Gb, Dual 27" Monitor, Dell Inspiron 7760
Message 16 of 83
dgordon
in reply to: Jeff_M

Jeff,

 

the lisp only works if you want to renumber higher than the highest number already in the drawing.

 

can it be tweaked to be able to use numbers smaller than the smallest number also?

 

Dan

Civil 3D 2013
Win 7 Pro x64
Intel Xeon 2.0GHz
12Gb Ram
ATI Firepro 4800
Dell T5500
www.preinnewhof.com
Message 17 of 83
Jeff_M
in reply to: dgordon

It could, do that, yes. It could be made fancier in a number of ways, but the fancier it gets, the more checks need to be added to prevent errors. That's why I forced it to use only numbers higher than those already in the drawing.....I didn't have a lot of time to write the checks & balances to make it a smooth operation with options. If I get some free time I'll consider adding in some options, but no guaranties as to when that may be. The code is not protected, so if anyone else feels like making revisions, feel free to do so. 

 

Of course, you could always just use this to get the points in the correct order, then use C3D's builtin renumbering to get them to the desired point range(s).

Jeff_M, also a frequent Swamper
EESignature
Message 18 of 83
gjrcmb
in reply to: Jeff_M

Hello all,

For those of you that are still subscribing to this thread, or for those who surf the forum and may be interested.

The attached lisp file is a modified version of Jeff's reorderpoints.lsp application posted earlier in this discussion.  The primary change I made to the application is the addition of a Fence selection mode that allows users to select multiple points through a Fence selection process.  You can use multiple fence lines, where the fence lines are drawn to aid in the point selection process.  Fence lines are drawn on the current layer with bylayer settings, and the user has the option of erasing or retaining the fence lines.  If you run the application and then perform an Undo operation, all of the changes during the last lisp session will be undone.

The application still requires the user to specify a point number that is greater than the highest existing point number.  However, as Jeff indicated you can always use the built-in Renumbering feature (SelectAndEditPointNumbers command) to "Enter an additive factor for point numbers" including entering a negative number to decrement the point numbers.  So if you had existing point numbers that where all under 100 for instance, you could use the lisp application to start the renumbering at 101 and renumber all the points, and then use the built-in renumbering command to decrement all the point numbers by -100 (if you wanted to the points to start at number 1).

 

Please test out the application, and confirm its functionality within its intended use.

 

Thanks to Jeff for putting together the original application, and being open to modifications by others.

Message 19 of 83
gjrcmb
in reply to: gjrcmb

I noticed an issue with the fence selection that I put together in my modified version of reorderpoints.lsp.  If you are in the process of placing a fence and change your view such that all points are not within your view that you have marked with the fence, only the points that are in your view are reordered.  I think this is a limitation of the fence selection process.  I'll see if I can resolve the issue.

Message 20 of 83
gjrcmb
in reply to: gjrcmb

Alright, I resolved the fence selection issue that I mentioned in my last post, although I think the code may be able to be improved upon.  See attached revision to the modified application.

 

As before, please test it out.

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

Post to forums  

Rail Community


Autodesk Design & Make Report