Corrupt dwf when inventor is visible

Corrupt dwf when inventor is visible

Anonymous
Not applicable
399 Views
1 Reply
Message 1 of 2

Corrupt dwf when inventor is visible

Anonymous
Not applicable

I'm creating dwf files using the Inventor API usin C#. 

 

The mode is "custom" since I don't want the model included.

options["Publish_Mode"] = 62723; // custom

 

When I plot the dwf (exactly like the API example) I get a nice dwf. But when I switch Inventor to visible=false, then the multiple sheet dwf becomes corrupt. 

Sometimes it just crashes Design review on open, sometimes the drawing opens, but ADR crashes when using the application button (and keeps crashing this way until the "recent" list is rid of my corrupt file).

 

I've reproduced this error on Inventor 2014 and 2015, on multiple machines (different domains even) and on several different files.

0 Likes
Accepted solutions (1)
400 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution

Solved.
When having Inventor visible, the process had time to start completely. Not visible meant that inventor started to get instructions to plot DWF before it had loaded completely.
My 2014 installation threw an exception and gave an error, others just continued to load and produce a corrupt DWF.

I just added an while (!app.Ready) loop and that fixed it.

0 Likes