
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm having some difficutly figuring out how to handle the following situation. I have a drawing that references an Weldment Assembly that contains multiple Levels of Detail. I'm using C# to modify the base assembly via the API based on a seperate dialog box.
The issue I'm running into is some views are not properly updating. I'm getting partial view updates only whenever I perform either Inventor.DrawingDocument.Update() or Inventor.DrawingDocument.Update2(). I have performed updates on the base referenced assembly via Inventor.AssemblyDocument.Update2(true). Specifically, welds are not updating in the views.
After the program has finished executing Inventor doesn't indicate that any of the sheets in the drawing file need to be updated (clicking on the "Update All Sheets" on the Manage Tool Bar has no effect and the "Update" icon next to it is greyed out indicating everything is fully updated).
This is probably the import part since the system is apparently trying to tell me what's going on, I'm just not smart enough to figure out exactly what it's trying to tell me. If I right click on a view that isn't fully updated (view contains the inccorectly rendered welds) I receive the following message:
- Changes have been made to some assembly components sine this assembly was last saved which may affect component size and position.
If I select "yes" to update the assembly then receive the message:
- Assembly (Level of Detail) cannot be saved because a different Level of Detail representation is being edited. You must save (or close) that one before you can edit this one).
Now, I realize that when I right clicked on the view in the drawing I was attempting to open the assembly at the Level of Detail shown in that view (or I should say I'm basing this on the title of the Inventor window that contains the assembly).
Finally, if I actually Open the assembly in question in Inventor I get the notice about the file being out of date; however, when I select "yes" here everything immediately updates and all is well. So this SHOULD lead me back to how I've opened the assembly for editing via the API as the source of the problem. So, the command I'm issuing to open the assembly is
Drawing=(Inventor.DrawingDocument)OpenInventorFile(PATH + STEELDWG);
AssemblyA=(Inventor.AssemblyDocument)OpenInventorFile(Drawing.ReferencedFiles[2].FullDocumentName);
I've ensured that the ReferencedFiles[2] is pointing to the main assembly (not a Level of Detail). I've guarenteed that I'm opening the correct assembly by utilizing the ReferencedFiles property of the Drawing; however, I suspect this is the wrong approach based on my problems. The only other thing I can think of is to referece the file directly via a string, but wouldn't that should be the exact same as the above since Drawing.ReferencedFiles[2].FullDocumentName resolves to a string.
And at that point I'm stuck. I'm not sure what else to check or try to solve the problem. Any Ideas?
Thanks, Alan
:
Solved! Go to Solution.