Auto-link dxf to an idw - Inventor, vault 2019

Hello

Currently I use an ilogic rule (below) to automatically create dxf files when saving the IDW.

Being a Vault user, I would like (if possible) to attach the DXF file to the IDW file automatically during archiving or validation.

The final goal is to extract the dxf and pdf files from the top set from vault in one step.

Thank you for your help.

' Get the DXF translator Add-In.
DimDXFAddInAsTranslatorAddIn
DXFAddInThisApplication.ApplicationAddIns. ItemById("{C24E3AC4-122E-11D5-8E91-0010B541CD80}")
'Set a reference to the active document (the document to be published).
DimoDocumentAsDocument
oDocumentThisApplication.ActiveDocument
DimoContextAsTranslationContext
oContext ThisApplication.TransientObjects. CreateTranslationContext
oContext. TypeIOMechanismEnum. kFileBrowseIOMechanism
' Create a NameValueMap object
DimoOptionsAsNameValueMap
oOptionsThisApplication.TransientObjects. CreateNameValueMap
' Create a DataMedium object
DimoDataMediumAsDataMedium
oDataMediumThisApplication.TransientObjects. CreateDataMedium
' Check whether the translator has 'SaveCopyAs' options
IfDXFAddIn. HasSaveCopyAsOptions(oDocumentoContextoOptionsThen
DimstrIniFileAsString
strIniFile"C:\temp\dxfout.ini"
' Create the name-value that specifies the ini file to use.
oOptions. Value("Export_Acad_IniFile"strIniFile
EndIf
'Set the destination file name
oDataMedium.FileNameThisDoc. PathAndFileName(False".dxf"
'Publish document.
DXFAddIn. SaveCopyAs(oDocumentoContext oOptionsoDataMedium)
'Launch the dxf file in whatever application Windows is set to open this document type with
iMessageBox.Show("Preview the DXF file?""Title",MessageBoxButtons.YesNo,MessageBoxIcon. Question)
IfivbYesThenThisDoc. Launch(oDataMedium.FileName)

 

Hello

To put you on a track, in the MEP, Manage tab, Insert an object, Create from a file. (choose your DXF) and check Link.

the DXF will thus be attached to the IDW and archived at the same time.

The iLogic remains to be created...   

 

Thank you for the food for thought. I'm going to dig into that.