Import Autocad 3d models

Import Autocad 3d models

kschmidt5YQJS
Participant Participant
1,147 Views
8 Replies
Message 1 of 9

Import Autocad 3d models

kschmidt5YQJS
Participant
Participant

is there a way to import an Autocad 3D model into an inventor assembly file using ilogic, similar to to the Import DWG Command?

0 Likes
Accepted solutions (1)
1,148 Views
8 Replies
Replies (8)
Message 2 of 9

bradeneuropeArthur
Mentor
Mentor
Via export to .sat or .step in Autocad.
Then import in inventor.

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature

0 Likes
Message 3 of 9

kschmidt5YQJS
Participant
Participant

do can files have to be a step file to import the models by ilogic? Inventor has the Import DWG command that can import the 3d models into an assembly model without the dwg file being exported to a step file

0 Likes
Message 4 of 9

YuhanZhang
Autodesk
Autodesk

To import AutoCAD into Inventor with 3D settings, you can try below steps:
1. Firstly In UI you can import an AutoCAD with 3D component into Inventor, and on the import options dialog change the settings and (on Import Destination Options page)you can save the configuration file to somewhere(e.g. ImportDWGConfig.ini).

2. In your iLogic rule you can make use of Inventor translator API to import your AutoCAD file with the configuration file.

 

Below is a VBA code sample, you can convert it to iLogic rule(usually you just need to remove the "Set" keyword):

 

Public Sub ImportDWG()
    ' Get the DWG translator Add-In.
    Dim DWGAddIn As TranslatorAddIn
    Set DWGAddIn = ThisApplication.ApplicationAddIns.ItemById("{C24E3AC2-122E-11D5-8E91-0010B541CD80}")
 
    Dim oContext As TranslationContext
    Set oContext = ThisApplication.TransientObjects.CreateTranslationContext
    oContext.Type = kFileBrowseIOMechanism

    ' Create a NameValueMap object
    Dim oOptions As NameValueMap
    Set oOptions = ThisApplication.TransientObjects.CreateNameValueMap
    oOptions.Value("Import_Acad_IniFile") = "C:\Temp\ImportDWGConfig.ini"

    ' Create a DataMedium object
    Dim oDataMedium As DataMedium
    Set oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
    oDataMedium.MediumType = kFileNameMedium
    oDataMedium.FileName = "C:\Temp\MyDWG.dwg"
    
    Dim oDoc As Document
    'import file.
    Call DWGAddIn.Open(oDataMedium, oContext, oOptions, oDoc)
End Sub

 

Please let me if any more questions.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 5 of 9

kschmidt5YQJS
Participant
Participant

@YuhanZhang 

Your codding work fantastic, however, how can i get it to allow me to change to location where the files would get saved? i've create the template ini file, however i will need to be able to change the destination folder

0 Likes
Message 6 of 9

YuhanZhang
Autodesk
Autodesk

If you mean to save the imported document, after the Open method, you need to use ThisApplication.ActiveDocument.SaveAs(DestinationLocation, False) method to save the active document to the location you specify.



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 7 of 9

kschmidt5YQJS
Participant
Participant

no, what i mean is during the import (see image).  When it's being imported the parts already get save location, so i'd rather get it changed right away if possible, rather than cycling through all the imported part files and the assembly file.  so i need to be able to adjust the value of the destination folder if possible

kschmidt5YQJS_0-1677248018942.png

 

0 Likes
Message 8 of 9

YuhanZhang
Autodesk
Autodesk
Accepted solution

Before you specify the .ini file for import process, you can edit it and change the "DESTINATION DIRECTORY" value to any value you want:

YuhanZhang_0-1677300972831.png

 



If this solves the problem please click ACCEPT SOLUTION so other people can find it easily.



Rocky Zhang
Inventor API PD
Manufacturing Solutions
Autodesk, Inc.

0 Likes
Message 9 of 9

kschmidt5YQJS
Participant
Participant

thank you, that will work 

0 Likes