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: 

Renumber points

15 REPLIES 15
SOLVED
Reply
Message 1 of 16
Pollmuller
7733 Views, 15 Replies

Renumber points

 

Morning,

 

Is there a way to renumber all the points in a point group? Right now I am doing each point individually but I have many points and it would be wonderful to learn how to do that automatically. Suggestions?

 

Thanks

 

Erika

AUTOCAD Civil 3D 2013
Windows 7
Processor: Intel (R) Xeon (R) CPU W3565 @ 3.20GHz
Installed Memory (RAM): 12.0GB
System Type: 64-bit

Thanks

Erika
15 REPLIES 15
Message 2 of 16
Jeff_M
in reply to: Pollmuller

In the Propsector right click the PointGRoup, choose Select, the Contextual Ribbon will change to CogoPoints, select Renumber Points. This will let you use an additive factor, so a factor of 1000 will change points 1-20 to 1001-1020.

Jeff_M, also a frequent Swamper
EESignature
Message 3 of 16
Pollmuller
in reply to: Jeff_M

HOW AMAZINGLY SIMPLE!

 

Thank you.

AUTOCAD Civil 3D 2013
Windows 7
Processor: Intel (R) Xeon (R) CPU W3565 @ 3.20GHz
Installed Memory (RAM): 12.0GB
System Type: 64-bit

Thanks

Erika
Message 4 of 16
Jeff_M
in reply to: Pollmuller

You're welcome. I should also point out, for those who don't like the Ribbon, that the Renumber option is also available on the right-click context menu when points have been selected.

Jeff_M, also a frequent Swamper
EESignature
Message 5 of 16
rhino80
in reply to: Pollmuller

If you want to remove any gaps where numbers have been missed in the selected data I like to export my points to excel and renumber thru excel.

Message 6 of 16
bcsurvey
in reply to: rhino80

Thanks Rhino.  I think the excel method works primarily if there are gaps in point list, not so much if points need to be inserted between 2 consecutive existing points.  I presume your solution is processed as a final step?

 

Mishler,

I was going try my hand at either creating a lisp routine or recording a macro for doing what I describe above (adding small offset to a large point group, where the "overwrite" warning pops up).  My approach for adding a 3 point "gap" would be as follows, with user input underlined:

1 - Begin with Renumber command and prompt for the point range

2 - Add a default 100,000 (plus a user input value of 3 in this example) to point numbers in this range

3 - Run the Renumber command again, referencing the point numbers of the original point range PLUS the overall offset added (100,003 in this case)

4 - Set renumber offset value to -100,000

end

 

So there would only be two user inputs:  original point range and the number of extra point number slots needed before lowest number in range.  I don't know that the macro recording can set a variable to the point range in step 3, but if I'm wrong, I'd rather go that route.

 

Am I on the right track?

 

Thanks!

 

Civil 3D 2019 (6.1)
Windows 10 Pro (21H2)
(i7-11850H @ 2.50 GHz)
32GB RAM
NVIDIA RTX A2000
Message 7 of 16
Jeff_M
in reply to: bcsurvey

I've never used the Macro recording, so don't know if that approach would work or not. A lisp could be written to sort the selected points by number, verify there are no existing points using the additive factor to the highest pt #, then edit the point number for each of the points from highest to lowest.
Jeff_M, also a frequent Swamper
EESignature
Message 8 of 16
bcsurvey
in reply to: Jeff_M

Thanks for the quick reply.

I'm surprised that something like this doesn't already exist.  The fact that you didn't mention one tells me that it hasn't.  If the way you describe would be easier or advantageous over just outright renumbering all points the way I described, then I'll take your word for it - not that I'm about to just type out the code to do this.  Maybe Sincpac has something like this.

 

Can lisp extract available points from ListAvailablePointNumbers?  That might introduce a whole new ball of wax.

 

Civil 3D 2019 (6.1)
Windows 10 Pro (21H2)
(i7-11850H @ 2.50 GHz)
32GB RAM
NVIDIA RTX A2000
Message 9 of 16
Jeff_M
in reply to: bcsurvey

Here is a VERY quickly thrown together lisp that will bump the point numbers of a range of points. Little, to no, error checking included! To be truly useful it would need to verify that the desired bump in numbers won't be affected by existing points, as well as verify valid input was given...but I do give a method for the user to visually see which points ARE available. Use as you like....

 

Example usage:

Command: BUMPPOINTNUMS
Current Free point numbers: 1231,2400-2402,2423-12341,12343+
Range of points to bump (xxx-xxx): 2403-2422
Amount to change point number by (make sure new numbers are available!): 5
Free point numbers now: 1231,2400-2407,2428-12341,12343+

Jeff_M, also a frequent Swamper
EESignature
Message 10 of 16
bcsurvey
in reply to: Jeff_M

Jeff,

     Thanks man!  So, if my intention will always be to bump a range of point numbers which start somewhere in the middle and go up to the last point, the verification really wouldn't be necessary.  I've been defining point groups by point ranges which are far more than I'll need, so there is very little chance that bumping numbers upward would put points in different groups.  But that is pretty slick that you show the user the available points mid-stream.

 

I'd be willing to show my appreciation through paypal if you wanna give me an e-mail address, especially considering this isn't the first time you've done this for me.

Civil 3D 2019 (6.1)
Windows 10 Pro (21H2)
(i7-11850H @ 2.50 GHz)
32GB RAM
NVIDIA RTX A2000
Message 11 of 16
bcsurvey
in reply to: bcsurvey

Hey Jeff,

     What exactly is going on in the code below?  This was found toward the end of the script and the registry and user product key references threw up a red flag for me.

 

  (setq verstr (strcat "HKEY_LOCAL_MACHINE\\"
         (if vlax-user-product-key
    (vlax-user-product-key)
    (vlax-product-key)
         )
        )
 verstr (vl-registry-read verstr "Release")
 verstr (substr verstr
         1
         (vl-string-search
    "."
    verstr
    (+ (vl-string-search "." verstr) 1)
         )
        )
 C3D    (vla-getinterfaceobject
   *acad*
   (strcat "AeccXUiLand.AeccApplication." verstr)
        )
  )

 

Thanks

Civil 3D 2019 (6.1)
Windows 10 Pro (21H2)
(i7-11850H @ 2.50 GHz)
32GB RAM
NVIDIA RTX A2000
Message 12 of 16
Jeff_M
in reply to: bcsurvey

It is getting the values needed for the specific version of Civil 3D. It is not editing the registry at all, just reading.
Jeff_M, also a frequent Swamper
EESignature
Message 13 of 16
bcsurvey
in reply to: Jeff_M

Hey Jeff,

     Finally getting around to testing out the lisp.  It hangs a bit when invoked, but eventually shows available points.  I put in a range of 50 points to be adjusted, then an additive factor of 5, and got this:

; error: Civil 3D API: The parameter is incorrect.

 

Is this something easily fixed? 

 

Oops (I caught this before the forum timed out edits for this post!)

I reran it and it looks like the lisp doesn't account for the overwriting (overlapping) of points between original and adjusted, so renumbeing upward to an entirely vacant range works with the lisp, then renumbering down a smaller or larger number would as well.  I suppose at this point I can just make a macro, calling on the lisp for each adjustment, unless you wanna tweak it a bit more. 😃

 

Civil 3D 2019 (6.1)
Windows 10 Pro (21H2)
(i7-11850H @ 2.50 GHz)
32GB RAM
NVIDIA RTX A2000
Message 14 of 16
Jeff_M
in reply to: bcsurvey


@bcsurvey wrote:

Hey Jeff,

......unless you wanna tweak it a bit more. 😃

 


Not really 🙂 There's another renumber lisp floating around thatis more robust, but involves selecting points to renumber. A similar version of that is also available in the Sincpac-C3D package. Regading the error and numbering....this is waht I included with the post where I attached the lisp "

Little, to no, error checking included! To be truly useful it would need to verify that the desired bump in numbers won't be affected by existing points, as well as verify valid input was given...but I do give a method for the user to visually see which points ARE available. Use as you like....

 

Example usage:

Command: BUMPPOINTNUMS
Current Free point numbers: 1231,2400-2402,2423-12341,12343+
Range of points to bump (xxx-xxx): 2403-2422
Amount to change point number by (make sure new numbers are available!😞 5"

 

because I knew it would error if it hit a duplicate number 🙂 But it's there to edit as you like to remove, or plan for, these issues.

 

 

Jeff_M, also a frequent Swamper
EESignature
Message 15 of 16
bcsurvey
in reply to: Jeff_M

Yes, you did mention that when you posted it.

What you provided is still an improvement over how I was doing it before.  I'll still need to check on the point ranges that define certain point groups, but I keep a text object in model space that reflects the ranges for each group, updating it as needed, so I can have that in view when running your lisp.  No problem.  I'm still a bit surprised that there isn't an OOTB function that can just renumber a range starting with the high number first and work its way down.  We're in the high-speed computing age, so I wouldn't think it would take more than a few seconds to do thousands of points like that, as long as number of vacant spots above or below point range is greater than or equal to the additive factor desired.

 

Can you recommend any tutorials off-hand for Lisp or DIESEL?  I found some here:  http://www.crlf.de/Dokumente/Diesel/DieselReference.html but basic examples from the ground up are what I need, not just the meaning of bits and pieces.  I can't have my son one-upping me by the time he's in 6th grade!

 

Thanks

(sorry for the rant!)

Civil 3D 2019 (6.1)
Windows 10 Pro (21H2)
(i7-11850H @ 2.50 GHz)
32GB RAM
NVIDIA RTX A2000
Message 16 of 16
Jeff_M
in reply to: bcsurvey

Afralisp.com has some good lisp tutorials, lee-mac.com has a lot of good examples of how to do common tasks, theSwamp.org has a lot of bits of info as well. I would steer clear of Diesel, as it is not typically good for what we need. BTW, you mentioned it was slow to startup. This is likely due to the gathering of the free points, which is using a clunky, albeit accurate, method to get and list the points. Remover that part of the code and it's actually quite quick.
Jeff_M, also a frequent Swamper
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