Salut @gmassart
Voici un premier essai rapide, il me manque des info pour ton épaisseur, mais tu verras déjà la base pour ton export 
Pour l'export IGES, j'ai trouvé l'extrait de code sur le forum customisation, j'avais jamais utilisé avant...mais je pense que toutes les options de configuration sont là !
Le petit bonus, soit tu sélectionnes la vue et tu lances le code, soit tu sélectionnes pendant le code...j'adore 
Ou est renseigné ton épaisseur ? Paramètre ? iPropriété ? iPropriété personnalisée ?
Si il s'agit uniquement de pièces de tolerie, c'est un paramètre, mais il faudra gérer les exceptions ?
If ThisApplication.ActiveDocument.DocumentType <> kDrawingDocumentObject Then
MessageBox.Show("This is not a drawing" & vbNewLine & "End of rule...", "iLogic",MessageBoxButtons.OK,MessageBoxIcon.Error)
Return
End If
If ThisApplication.ActiveDocument.SelectSet.Count = 0 Then
oView = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kDrawingViewFilter,"Select a view:")
Else
oView = ThisApplication.ActiveDocument.SelectSet(1)
End If
'Full path of referenced model
oModelFullFileName = oView.ReferencedDocumentDescriptor.ReferencedDocument.FullFileName
'Referenced model name
oModelName = oView.ReferencedDocumentDescriptor.ReferencedDocument.DisplayName
'Referenced model name without extension
oModelNameWE = Left(oModelName, Len(oModelName) - 4)
Dim Epaisseur As String
Epaisseur = iProperties.Value(oModelName, "Summary", "Title")
'Define document to open
oModelDoc = ThisApplication.Documents.Open(oModelFullFileName, True)
'set translator options
Dim oIGESTranslator As TranslatorAddIn
oIGESTranslator = ThisApplication.ApplicationAddIns.ItemById("{90AF7F44-0C01-11D5-8E83-0010B541CD80}")
Dim oContext As TranslationContext = ThisApplication.TransientObjects.CreateTranslationContext
oContext.Type = kFileBrowseIOMechanism
Dim oOptions As NameValueMap = ThisApplication.TransientObjects.CreateNameValueMap
Dim oDataMedium As DataMedium = ThisApplication.TransientObjects.CreateDataMedium
'Set export path
Dim IGESDir = "C:\Temp\"
oDataMedium.MediumType = kFileNameMedium
'Set export file name
oDataMedium.FileName = IGESDir & oModelNameWE & " " & oView.Name & " " & Epaisseur & ".igs"
If oIGESTranslator.HasSaveCopyAsOptions(oModelDoc, oContext, oOptions) Then
' Set geometry type for wireframe.
' 0 = Surfaces, 1 = Solids, 2 = Wireframe
oOptions.Value("GeometryType") = 1
' To set other translator values:
' oOptions.Value("SolidFaceType") = n
' 0 = NURBS, 1 = Analytic
' oOptions.Value("SurfaceType") = n
' 0 = 143(Bounded), 1 = 144(Trimmed)
'Use Export To IGES to save drawing configuration and set here
'Dim strIniFile As String = "C:\IGES\ConfigurationFile.ini"
' Create the name-value that specifies the ini file to use.
'oOptions.Value("Export_Acad_IniFile") = strIniFile
'Save File
Call oIGESTranslator.SaveCopyAs(oModelDoc, oContext, oOptions, oDataMedium)
End If
'Close referenced model
oModelDoc.Close
Thomas
Mechanical Designer / Inventor Professional 2025
