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

Open DrawingDocument with break reference

gustavo.cassel
Advocate

Open DrawingDocument with break reference

gustavo.cassel
Advocate
Advocate

Hello!!

I'm trying to build a system to open and test some properties and references of drawings in a entire assembly.

What i'm searching for is broken references, wrong properties, missing drawings and so on.

But i'm having an issue when I try to open a drawing that was copied from another and the old one do not exists anymore.

When I open it, Inventor start to search for the reference in the project folder ( which is giant ) and take a lot of time to finally open the file browser.

 

I've tryied to use the OpenWithOptions method, like below:

 

 

NameValueMap map = Global.InventorApplication.TransientObjects.CreateNameValueMap();
map.Add("SkipAllUnresolvedFiles", true);
map.Add("DeferUpdates", false);

DrawingDocument drawingDocument = Global.InventorApplication.Documents.OpenWithOptions("the path here", map, true) as DrawingDocument;

 

 

But it not works. The inventor try anyway look the entire project folder and it takes like 2-3 minutes.

I want a way to force open without look for the reference, like in the assemblies when an icon of a folder with a question mark inside. 

0 Likes
Reply
436 Views
7 Replies
Replies (7)

WCrihfield
Mentor
Mentor

Hi @gustavo.cassel.  Unfortunately, I do not think there is a good answer for that one.  Even when opening a file like that manually, and using the Options button in the file explorer dialog to set it to open 'Express' (instead of Full), and checking the checkbox for 'Skip all unresolved files', it still takes a long time just to figure out 'if' there are any 'unresolved' files that it would need to skip.  I would assume that something like Vault would help with those types of situations, but I do not have Vault yet, so I could not confirm that.

Edit:  I did notice however, that when opening a drawing manually, using Inventor's Open dialog, you can either choose 'Full' and 'Skip all unresolved files' or you can choose 'Defer', but you can not use 'Defer' and 'Skip all unresolved files' together.  Maybe that is a hint to how you should set those settings when opening by code using OpenWithOptions.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes

WCrihfield
Mentor
Mentor

I was just looking into another related topic, and came across something that I had forgotten about, that may be helpful in your situation.  I don't know if you are familiar with creating your own custom event handler codes or not, but there is an event (FileUIEvents.OnFileOpenDialog) for when you use the Open Dialog to open an Inventor document, which appears to have an additional property ("FastOpen") related to drawings specifically, that is not mentioned in the OpenWithOptions method.  Since the other options involved include the ones we are already familiar with from the other method, this 'FastOpen' property sure sounds like something you could look into for speeding up this process.  However, since this only seems to apply to when you are using the Open Dialog to open a file, I don't know if this will help in your situation or not.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes

gustavo.cassel
Advocate
Advocate

Hi @WCrihfield , i've tested your methods and none worked out.

I guess it can't be solved.

Even if I open the drawing with the DeferUpdates, or the SkipAllUnresolvedFiles, the Inventor tryies to search ALL the project folder to find the missing reference.

I've tryied the SilentOperation property too, no sucess.

Guess we'll have to wait some fixes from the autodesk developers team.

0 Likes

bradeneuropeArthur
Mentor
Mentor

Use deferupdates = true

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

0 Likes

gustavo.cassel
Advocate
Advocate

Have you read my answer above?

I've actually tested all this methods, but the problem is that the Inventor ALWAYS try to find the rtight reference. It tooks me like 3 minutes to search all my project folder.

Even if I set the DeferUpdates to true inside a NameValueMap and pass it as parameter in the OpenWithOptions method. The same with the SkipAllUnresolvedFiles.

WCrihfield
Mentor
Mentor

Hi @gustavo.cassel.  This most likely will not help this situation any further, but I thought that this would be a good place for such information, just in case.  To set the 'defaults' for some of those settings related to performance when opening Inventor documents, there are a few places you can look, and a few settings that may be of interest.

  • Application Options > File dab > click the [File Open...] button at the bottom.
    •  Within that little pop-up dialog, you can set 'default' values for several related settings.
  • Application Options > Assembly tab are a couple settings of interest.
    • Defer Updates - Nice to have On/checked in some situations, but I usually leave it Off, when not needed
      • This setting is within the Document Settings of drawings, instead of in the Application Options
    • Express Mode Settings - setting the number lower helps induce Express Mode sooner
    • Enable relationship redundancy analysis
      • This setting may also cause a bit of slowness sometimes, but I like it On most of the time.
  • Application Options > Drawing > Enable background updates - is obviously a 'performance' related setting
  • When a Drawing is open/active > Tools tab > Document Settings > Drawing tab > Defer Updates setting
    • This could be set in the Template file to perpetuate it into all new documents
    • But I generally leave this Off/unchecked most of the time

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes

bradeneuropeArthur
Mentor
Mentor

If possible you can open the dwg file in Autocad.

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background
Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !

0 Likes