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
Solved! Go to Solution.
Solved by Buzz12345. Go to Solution.
Solved by Jeff_M. Go to Solution.
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.
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.
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)
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
Excellent - Superhero Jeff_M to the rescue again.......
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.
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
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.
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.....
@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. 🙂
It is easy to setup in your template if thats what you want to do:
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.
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 ?
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 !