Ilogic publish rule, save as AutoCAD .dwg error

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
' Get the DWG translator Add-In. strDWGAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}") strContext = ThisApplication.TransientObjects.CreateTranslationContext strContext.Type = IOMechanismEnum.kFileBrowseIOMechanism strOptions = ThisApplication.TransientObjects.CreateNameValueMap strDataMedium = ThisApplication.TransientObjects.CreateDataMedium ' Check whether the translator has 'SaveCopyAs' options If strDWGAddIn.HasSaveCopyAsOptions(strDocument, strContext, strOptions) Then ' DWG version. ' 23 = ACAD 2000 ' 25 = ACAD 2004 ' 27 = ACAD 2007 ' 29 = ACAD 2010 strOptions.Value("DwgVersion") = 27 Dim strIniFile As String strIniFile = "D:\Local Server\Data\Heaslip Autodesk Customization\Templates\DWGSubmittalConfig.ini" ' Create the name-value that specifies the ini file to use. strOptions.Value("Export_Acad_IniFile") = strIniFile End If 'Set the DWG target file name strDataMedium.FileName = strFullFileName 'Publish the active sheet as DWG 2007 strDWGAddIn.SaveCopyAs(strDocument, strContext, strOptions, strDataMedium)
The above is part of a longer rule that steps through a multi-sheet .idw file and publishes to .pdf and .dwg format. At one time it worked, probably with IV 2012, but since then the .dwg portion shown above throws errors (now running IV 2014 and soon 2016).
I am by no means a programmer but have just assembled the rule with the help of lots of different people here over time...any help would be greatly appreciated. Below is the error description:
System.Runtime.InteropServices.COMException (0x80004005): Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))
at Microsoft.VisualBasic.CompilerServices.LateBinding.InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateCall(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean IgnoreReturn)
at LmiRuleScript.Main()
at Autodesk.iLogic.Exec.AppDomExec.ExecRuleInAssembly(Assembly assem)
at iLogic.RuleEvalContainer.ExecRuleEval(String execRule)
Any ideas?
This is what
Any ideas what is wrong