Setting new DXF/DWG export option in Inventor 9 API

Setting new DXF/DWG export option in Inventor 9 API

Anonymous
Not applicable
883 Views
0 Replies
Message 1 of 1

Setting new DXF/DWG export option in Inventor 9 API

Anonymous
Not applicable
I had a VB application that was previously working with Inventor 8 to output .ipt and .iam files as .sat and to output .idw files as .dwg or .dxf.

The .sat output works with Inventor 9 but a new “Pack and Go” option has been added for the .dwg and .dxf export that puts the output into a single ZIP, which is not what I want for my application.

How can I turn off “Pack and Go” so as to get .dxf or .dwg files and not a .zip? The following explains how my application was working and what I have tried so far.

The way that my application worked was that if Inventor was installed, a filename with the appropriate .sat, .dwg, or .dxf extension was generated and the file created via:

Call oInvApp.CommandManager.PostPrivateEvent(kFileNameEvent, FileName)
Call oInvApp.CommandManager.StartCommand(kFileSaveCopyAsCommand)

Where oInvApp is an Inventor.Application type object.

If Inventor was not installed, then my application used Apprentice

Call oIADoc.ComponentDefinition.DataIO.WriteDataToFile(strFormat, FileName)

Where oIADoc is an object of type InventorApprentice.ApprenticeServerDocument and strFormat was “ACIS SAT”, “DWG” or “DXF”. I checked and these drawing types are still listed as valid in the ClipboardFormats.h file included with Inventor 9.

I saw another posting regarding these formats where it looked like certain parameters were passed by appending a “?parameter=value” onto the drawing type. I saved the DWG and DWF export options to an .ini file and it appears that Pack and Go is turned off with USE TRANSMITTAL=No so I tried “DWG?USE TRANSMITTAL=No” and “DXF? USE TRANSMITTAL=No” for the format but that caused no file to be output.

Because I have to set the SAT version for the other part of my application via the registry, I also looked there and found that the INI File Name was saved to the "Last Export DWG INI file" and "Last Export DXF INI file" keys under [HKEY_CURRENT_USER\Software\Autodesk\Inventor\RegistryVersion9.0\Translators\DWG\Last INI file]\

So I had my application generation an .ini file with “USE TRANSMITTAL=No” and then I set those registry keys to point to that .ini file prior to the dxf/dwg export, but that had no effect.

Why does Inventor even use this system of .ini files and registry modification to set export parameters? Why aren’t these directly available as properties in the API?

I would appreciate any light that could be shed on this subject. Thank you,

Dennis Martin
D.P. Technology Corp.
0 Likes
884 Views
0 Replies
Replies (0)