Message 1 of 1
Ilogic dxf code - Drawing to dxf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello everyone,
I need a help with the below ilogic code, I copied from this forum, its working well. At the moment this generate dxf from the current sheet, but I want to update the code to automate the following tasks
1. Create new sheet (empty sheet)
2. Add front view of the part in 1:1
3. then adding a Sketch symbol through Insert Sketch Symbol ---> to add the symbol named ''PROFILE / DXF INFO NOTE''.
4. then to export as DXF.
Please find below the code I am using now and also snips of the symbol example how I placed on the view in the drawing.
'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.PathAndFileName(False) 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 = "C:\Users\Farr\Documents\Inventor\DXF_EXPORT_INI\DXF_EXPORT.ini" oOptions.Value("Export_Acad_IniFile") = strIniFile End If oDataMedium.FileName = path_and_nameDXF & ".dxf" Call DXFAddIn.SaveCopyAs(oDocument, oContext, oOptions, oDataMedium) End If