07-03-2020
06:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-03-2020
06:16 AM
Make DXF and place in compressed file Ilogic
Hey,
I was using inventor 2012, recently we upgraded to 2020.
In inventor 2012 i was using the following ilogic to create from one idw-file the dxf-files and place them into an compressed file.
Whit upgrading to inventor 2020 the rule makes the dxf-files but does not place them into an compressed file.
Can anyone maybe help me with my problem?
Also the compressed file had in inventor 2012 no name assigned.
This would be great to if i could add this, the name should be the same as the idx-file.
'query user question = MessageBox.Show("is a .DXF Export Required", "iLogic Question",MessageBoxButtons.YesNo,MessageBoxIcon.Question) 'set condition based on answer If question = vbYes Then ' Get the DXF translator Add-In. path_and_nameDXF = ThisDoc.Path & "\" Dim DXFAddIn As TranslatorAddIn DXFAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}") 'Set a reference to the active document (the document to be published). Dim oDocument As Document oDocument = ThisApplication.ActiveDocument Dim oContext As TranslationContext oContext = ThisApplication.TransientObjects.CreateTranslationContext oContext.Type = IOMechanismEnum.kFileBrowseIOMechanism ' Create a NameValueMap object Dim oOptions As NameValueMap oOptions = ThisApplication.TransientObjects.CreateNameValueMap ' Create a DataMedium object Dim oDataMedium As DataMedium oDataMedium = ThisApplication.TransientObjects.CreateDataMedium If DXFAddIn.HasSaveCopyAsOptions(oDocument, oContext, oOptions) Then Dim strIniFile As String strIniFile = "Q:\Projecten\Projecten algemeen\DXF Instellingen(2)\DXF-instellingen.ini" oOptions.Value("Export_Acad_IniFile") = strIniFile End If oDataMedium.FileName = path_and_nameDXF & ".dxf" Call DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium) End If