Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Make DXF and place in compressed file Ilogic

thomas.vanhaecke
Contributor

Make DXF and place in compressed file Ilogic

thomas.vanhaecke
Contributor
Contributor

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
0 Likes
Reply
516 Views
4 Replies
Replies (4)

ckeveryga
Advocate
Advocate

In order to have the DXF export to a zip file, the .ini file needs to have the line, "USE TRANSMITTAL = Yes". 

 

To fix your naming issue, change the line:

 

path_and_nameDXF = ThisDoc.Path & "\"

to instead:

 

path_and_nameDXF = ThisDoc.PathAndFileName

 

0 Likes

thomas.vanhaecke
Contributor
Contributor

Can you maybe show me where i have to enter "USE TRANSMITTAL = Yes"?

I'm not so familiar with the iLogoc code.

 

Thanks in advance!

0 Likes

ckeveryga
Advocate
Advocate

You need to open this file, 

Q:\Projecten\Projecten algemeen\DXF Instellingen(2)\DXF-instellingen.ini

 using notepad (or some text document editor) and change the use transmittal property to yes. 

 

If this works for you, please accept as solution. 

0 Likes

thomas.vanhaecke
Contributor
Contributor

The iLogic does not make a Zip-file.

It still makes the DXF-files, but does not place them into a Zip-file.

 

For the name issue, I would like to have that the Zip-file has the name of the idw-file.

Now the DXF-files get the name of the idw-file.

 

Bellow you can find the text, should i change anything else maybe?

Q:\Projecten\Projecten algemeen\DXF Instellingen(2)\DXF-instellingen.ini

 

[EXPORT SELECT OPTIONS]
AUTOCAD VERSION=AutoCAD 2010
CREATE AUTOCAD MECHANICAL=No
USE TRANSMITTAL=Yes
USE CUSTOMIZE=No
CUSTOMIZE FILE=C:\Users\Public\Documents\Autodesk\Inventor 2020\Design Data\DWG-DXF\FlatPattern.xml
CREATE LAYER GROUP=No
PARTS ONLY=Yes
[EXPORT PROPERTIES]
SELECTED PROPERTIES=
[EXPORT DESTINATION]
SPACE=Model
SCALING=Full
ALL SHEETS=Yes
MAPPING=MapsBest
MODEL GEOMETRY ONLY=Yes
EXPLODE DIMENSIONS=No
SYMBOLS ARE BLOCKED=Yes
AUTOCAD TEMPLATE=
DESTINATION DXF=Yes
USE ACI FOR ENTITIES AND LAYERS=No
[EXPORT LINE TYPE & LINE SCALE]
LINE TYPE FILE=C:\Users\Public\Documents\Autodesk\Inventor 2020\COMPATIBILITY\Support\invDIN.lin
Continuous=Continuous;0,
Dashed=DASHED;0,
Dashed Space=DASHED_SPACE;0,
Long Dash Dotted=LONG_DASH_DOTTED;0,
Long Dash Double Dot=LONG_DASH_DOUBLE_DOT;0,
Long Dash Triple Dot=LONG_DASH_TRIPLE_DOT;0,
Dotted=DOTTED;0,
Chain=CHAIN;0,
Double Dash Chain=DOUBLE_DASH_CHAIN;0,
Dash Double Dot=DASH_DOUBLE_DOT;0,
Dash Dot=DASH_DOT;0,
Double Dash Dot=DOUBLE_DASH_DOT;0,
Double Dash Double Dot=DOUBLE_DASH_DOUBLE_DOT;0,
Dash Triple Dot=DASH_TRIPLE_DOT;0,
Double Dash Triple Dot=DOUBLE_DASH_TRIPLE_DOT;0,

 

0 Likes