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: 

Rebuild All?

28 REPLIES 28
SOLVED
Reply
Message 1 of 29
ksorsby
6570 Views, 28 Replies

Rebuild All?

Hi all,

 

There isn't a command, that I know of, which will rebuild all surfaces or corridors, or am I wrong?

 

I know you can have them individually set to Rebuild Automatically but I have upwards of 40 surfaces and corridors, all linked in someway, and I have to have this switch turned off otherwise a small minor edit to a surface at one part of the site triggers 2 minutes of rebuilding at the other end of the site.

Rather than then having to sit later on and select, rebuild each surface one by one, there must surely be a way to globally rebuild all surfaces and/or corridors.

 

There is a vba routine from Civil 3D Reminders which is supposed to do this from 3 years ago but I just cannot get it to work.

 

Any ideas?

 

Cheers!

 

Kevin

28 REPLIES 28
Message 2 of 29
BrianHailey
in reply to: ksorsby

Perhaps you could set just your surfaces to rebuild automatically and then use the rebuild all corridors command. Grab one of your corridors, on the corridor ribbon tab, expand out the rebuild corridor command and you'll see rebuild all corridors.

Brian J. Hailey, P.E.



GEI Consultants
My Civil 3D Blog

Message 3 of 29
neilyj666
in reply to: ksorsby

REBUILDALLCORRIDORS on the command line too (at least in 2012)

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 4 of 29
ksorsby
in reply to: neilyj666

That's an unknown command here, on 2012. However, I've found that I can right click on the Corridors tree on the prospector and get Rebuildall from there. This is useful but....it beggars belief that there isn't a surfaces one! For example, I still have at least 20 non-corridor surfaces that I have to select one by one to rebuild!

 

Or is it just me! ;o)

Message 5 of 29
Jeff_M
in reply to: ksorsby

Here's a quickie lisp that will rebuild all surfaces:

(defun rebuild_all_surfaces ()
  (if (or (ssget "I" '((0 . "AECC_*SURFACE")))
	  (ssget "x" '((0 . "AECC_*SURFACE")))
	  )
    (vlax-for ent (vla-get-activeselectionset
		    (vla-get-activedocument
		      (vlax-get-acad-object)))
      (vlax-invoke ent 'rebuild)
      )
    )
  )

(defun c:RAS () (rebuild_all_surfaces) (princ))

 You could do the same for corridors, just replace where it says *SURFACE with CORRIDOR

Jeff_M, also a frequent Swamper
EESignature
Message 6 of 29
neilyj666
in reply to: Jeff_M

Excellent - Superhero Jeff_M to the rescue again.......Smiley Happy

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 7 of 29
ksorsby
in reply to: Jeff_M

Thanks Jeff this looks awesome...but I get an error:

Command: RAS
; error: no function definition: VLAX-GET-ACAD-OBJECT

 

Sorry, I'm no expert on lisps - does this make sense?

 

Cheers,

 

KEvin

 

Message 8 of 29
neilyj666
in reply to: ksorsby

It worked fine for me - presumably you APPLOADed it??

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 9 of 29
Jeff_M
in reply to: ksorsby

Oops, add (vl-load-com) as the first line, then reload it.

Jeff_M, also a frequent Swamper
EESignature
Message 10 of 29
ksorsby
in reply to: Jeff_M

That solved it. Jeff, you are a star!

Although why this isn't an inbuilt function I don't know!

 

Cheers,

 

Kevin

 

Message 11 of 29
Jeff_M
in reply to: ksorsby

Glad I could help. One reason it may not be built in....you will likely notice, at some point, that the rebuild order isn't quite what it should be. So you will end up with surfaces marked out of date due to surfaces they rely on being rebuilt after they were.

 

But for these should be just a few that you could then rebuild manually.

 

I'm not sure how, or if, a routine could be written to determine the order of rebuilds so each one is built before it is is used in another. Something for me to consider on a rainy day I reckon.....

Jeff_M, also a frequent Swamper
EESignature
Message 12 of 29
Cadguru42
in reply to: ksorsby


@ksorsby wrote:

 

Although why this isn't an inbuilt function I don't know!

 



Autodesk needs us to purchase the newest version, so they leave out small, useful commands like that to try and get us to upgrade to the newest version when that feature is added. 🙂

C3D 2022-2024
Windows 10 Pro
32GB RAM
Message 13 of 29
Jay_B
in reply to: ksorsby

_AeccUpdateAllCorridors works @ command line for this.

C3D 2018.1
C3D 2016 SP4

Win 7 Professional 64 Bit
Message 14 of 29
ksorsby
in reply to: Jay_B

Only works for corridor surfaces, not surfaces as a whole.

 

Kevin

Message 15 of 29
denismaher
in reply to: Jeff_M

It's possible to make all surface in rebuilt automatic??

Message 16 of 29
SkipBurns
in reply to: denismaher

It is easy to setup in your template if thats what you want to do:

 

Capture.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I would be hesitant to do this only because it could be easy to get stuck in a Loop depending on how the surfaces are made.

 

Message 17 of 29
ksorsby
in reply to: denismaher

As SkipBurns says below. Note that this only makes each new surface rebuild automatically by default. There is no command or button (that I know of) which you can invoke to rebuild all available surfaces, like there is for corridors.
So if you have 20 surfaces already needing rebuilding, you'll have to do them one by one.
Message 18 of 29
cyberflow
in reply to: Jeff_M

Hi @Jeff_M , 

I tryed making a combined code with you lisp for surfaces that rebuilds all the surfaces.

 

I want it to rebuild the corridors first then all the surfaces.

Here's what it looks like : 

(vl-load-com) (defun rebuild_all_corridor ()
  (if (or (ssget "I" '((0 . "AECC_*CORRIDOR")))
	  (ssget "x" '((0 . "AECC_*CORRIDOR")))
	  )
    (vlax-for ent (vla-get-activeselectionset
		    (vla-get-activedocument
		      (vlax-get-acad-object)))
      (vlax-invoke ent 'rebuild)
      )
    )
  )

(vl-load-com)(defun rebuild_all_surfaces ()
  (if (or (ssget "I" '((0 . "AECC_*SURFACE")))
	  (ssget "x" '((0 . "AECC_*SURFACE")))
	  )
    (vlax-for ent (vla-get-activeselectionset
		    (vla-get-activedocument
		      (vlax-get-acad-object)))
      (vlax-invoke ent 'rebuild)
      )
    )
  )

(defun c:RACS () (rebuild_all_corridor) (rebuild_all_surfaces) (princ))

Unfortunatly i've got an error message : 

; error: ActiveX Server returned the error: unknown name: "REBUILD"
Command:

Any idea what i've done wrong here ?

--------------------------------------------
Using : Autodesk Civil 3D 2022& 2023
AKA Frank Freitas, Senior Roadway Designer @ Kiewit
Message 19 of 29
cyberflow
in reply to: cyberflow

I used the update all corridor command instead : 

 

(vl-load-com)(defun rebuild_all ()
  (command "_AECCUPDATEALLCORRIDORS")
  (if (or (ssget "I" '((0 . "AECC_*SURFACE")))
      (ssget "x" '((0 . "AECC_*SURFACE")))
      )
    (vlax-for ent (vla-get-activeselectionset
            (vla-get-activedocument
              (vlax-get-acad-object)))
      (vlax-invoke ent 'rebuild)
      )
    )
  )
 
(defun c:RACS () (rebuild_all) (princ))

Works like a charm ! Thank you all !

--------------------------------------------
Using : Autodesk Civil 3D 2022& 2023
AKA Frank Freitas, Senior Roadway Designer @ Kiewit
Message 20 of 29
Shaun-CityofKelso
in reply to: Jeff_M

Great for my workflow. Thanks Jeff!!!

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report