I've nearly finished creating my iLogic configurator,but have reached one last stumbling block during the save out process. As some brief background, the configurator was designed to do the following:
1) Use an iLogic form and rules to configure skeletal models as desired. This includes altering geometry AND suppressing unneeded subassemblies and components.
2) After the model is configured, the user can click a button to "finalize" the design. This includes deleting all suppressed components, and saving-as the skeletal components, subassemblies, and top-level assembly. The copy rule will also save out copies of some template drawings and replace the internal references to see the new models.
3) Finally (this is the step that is "causing" the issue), the template drawings must have rules that automatically run when the drawing is opened. These rules are necessary to rescale the drawing views, suppress views, etc.
After intoducing rules to the template drawings, I started to get a "Microsoft .NET Framework..... unhandled exception" error after the copy rule has finished running. It doesnt even matter what it actually contained within the rules; even a blank rule triggered by "After open" will trigger this vague error.
Since my actual configurator is too large to share, I created an example assembly that duplicates the problem. Please see the attached zip file (containing the models and top-level drawing) and the subassembly drawing. After saving/extracting the files to your harddrive, do the following to encounter the error:
1) Open "Top Level Assembly" and click "Copy Rule" on the form to begin the save-out process.
2) After choosing a filename and location, you'll notice that the new files are copied out without any errors, all suppressed components (the 3rd and 4th Block Subassmeblies at the top level, various Pins at the subassembly level) have been deleted, and the LOD has been changed back to "Master".
3) Now open up the original "Subassembly Drawing.idw" and unsuppress the Rule.
4) Repeat Step 1, and you'll get the "Unhandled exception" error at the end of the save-out process. You'll also notice that the suppressed components weren't deleted properly.
I'm hoping that somebody can suggest a fix or workaround, or at least some insight as to why this is happening.