Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple VB6 question

Status
Not open for further replies.

DHALE1

Mechanical
Jan 8, 2003
61
I have a vb program to fill custom props, and I would like it to regen the drawing. What is the vb6 statement for that?

Thanks
 
Replies continue below

Recommended for you

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.
 
swRebuildAll
All
Rebuilds geometry that has not been regenerated.

swForceRebuildAll
All
Forces a rebuild of all geometry.

swUpdateMates
Assembly
Only rebuilds mates, which is much faster than rebuilding the geometry. Especially useful for Component2::Transform.



Syntax (OLE Automation)

retval = ModelDoc2.ForceRebuild3 ( topOnly )

Input:
(VARIANT_BOOL) topOnly
TRUE rebuilds the top level of assembly only; FALSE rebuilds the top level assembly and all subassemblies

Output:
(VARIANT_BOOL) retval
TRUE if the rebuild is successful, FALSE if not

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor