- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I'm looking to open a drawing via the Application.Documents.Open method, or else something effectively the same, that can get me the drawing document from within a different document, only with updates deferred.
I would like to skip resolving files/opening subdocuments for a particular script because it has a huge impact on performance (lots of files, no subdocument information needed).
Is there any way to do this?
Thanks
EDIT: using Application.AssemblyOptions.DeferUpdate seems to help, but there aren't equivalent properties for the DrawingOptions or PartOptions classes, so I'm still curious to know if there's anything else that can be done.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi @meGVGMF . You need to write the path to your file in line 3 - "FullFileName"
Dim oNVM As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap
oNVM.Add("DeferUpdates", True)
Dim oDDoc As DrawingDocument = ThisApplication.Documents.OpenWithOptions("FullFileName", oNVM)
Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor
LinkedIn | My free Inventor Addin | My Repositories
Did you find this reply helpful ? If so please use the Accept as Solution/Like.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Thanks
But what would be the way to turn this off? Do I need to reopen the document with the option unset, or can I do it through the document object somehow?
Would that be through `oDoc.DrawingSettings.DeferUpdates` ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Yes, your guess is correct. In order for the document to be updated again, you need DeferUpdates = False.
oDoc.DrawingSettings.DeferUpdates = False
Andrii Humeniuk - CAD Coordinator, Autodesk Certified Instructor
LinkedIn | My free Inventor Addin | My Repositories
Did you find this reply helpful ? If so please use the Accept as Solution/Like.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report