I'm working on a script to chug through thousands of drawings and export them as PDF. A previous script updated Properties on the relevant part files, but the drawings need to be re-exported.
I'm noticing that when I open the drawing with OpenDoc6:
_SwModelDoc = swApp.OpenDoc6(FileUpdateInfo.FilePath, CStr(SwConst.swDocumentTypes_e.swDocDRAWING), SwConst.swOpenDocOptions_e.swOpenDocOptions_Silent, "", FileError, FileWarning)
The title-block isn't being updated with the new part model properties that were previously updated.
I tried looping through the sheets and calling EditRebuild3 and ForceRebuild3(False), but that didn't refresh the properties either.
When I open the drawing in SolidWorks manually, outside of the script, the correct new properties are pulled into the title block. It's only programmatically that they're not updating.
What's even more interesting is that I can open the drawing doc manually, and then close it (even without saving!) and then run my script and when the script opens it will have the correct properties.
I'm missing some link where programmatically opening the drawings isn't refreshing the called-out properties right away for the title-block.