Set Options when Exporting idw to dwg

Set Options when Exporting idw to dwg

Anonymous
Not applicable
284 Views
3 Replies
Message 1 of 4

Set Options when Exporting idw to dwg

Anonymous
Not applicable
How do I set the Export Options for the dwg file when using a vb-application for the export to dwg?
0 Likes
285 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
I dont know about export but if you are trying to save to a different format, here is how I did a save to dwf file: oDwg.SaveAs strDirectory & objFile.Strip_extension(oDwg.DisplayName) & ".dwf", True
0 Likes
Message 3 of 4

Anonymous
Not applicable
if you notice, the options dialog, through the user interface, gives the ability save and import a file. The last file used is set to the defualt the next time you export. This setting is stored in the registry and can be changed there. The file is also a text file that can be changed through code.

Mike Martin
INCAT
0 Likes
Message 4 of 4

Anonymous
Not applicable
try this

For Each oAddIn In App.ApplicationAddIns()
If oAddIn.DisplayName = "Autodesk DWG Translator" Then Set oDWGTranslator = oAddIn
Next
If oDWGTranslator Is Nothing Then
ReportStatus.Caption = "Failed to activate DWG translator"
Exit Function
End If
Set oTransObjs = App.TransientObjects
Set oContext = oTransObjs.CreateTranslationContext
oContext.Type = kFileBrowseIOMechanism
Set oOptions = oTransObjs.CreateNameValueMap
Set oTargetData = oTransObjs.CreateDataMedium

'retrieve the default options
bHasSaveCopyAs = oDWGTranslator.HasSaveCopyAsOptions(oDoc, oContext, oOptions)
If iniFile <> "" Then
sOptName = oOptions.Name(1)
oOptions.Value(sOptName) = iniFile
End If

Anton
0 Likes