You can do a search in the Solidworks API help for "ForceRebuild()" or "Rebuild()" methods of the DrawingDoc object.
ForceRebuild will rebuild the drawing even if there are errors in it, whereas Rebuild will stop the rebuild if there are errors. To use Rebuild, you have to put some error-handling in to your code to tell it what to do when there are errors, which you may or may not want.