Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
in reply to: MechMachineMan

Sorry 3 of them don't make any difference and ThisApplication.ActiveDocument.Rebuild gives me the following error:

 

Error in rule: Hinge Side, in document: A01906.iam

Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))

 

I don't mind having to click Rebuild All manually but this will cause confusion amongst other users as it throws up some constraint errors after the rule runs, then once Rebuild All is clicked it all falls into place nicely. It seems odd as this piece of code should do the same manual process that I'm doing but automatically. Why would it give an error doing it through code and not manually?

 

Some additional info - My rule is within the same assembly my constraints are in & I'm not in any part editing mode when running it, so the Rebuild All function is available at the time the rule runs.