
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I'm new in this forum and I just trying to find the way to make a program to import iges file in Autocad 2017. The next program is what I have until now, this program look in to all folders seeking for any iges file, but I'm no able to import the file in to Autocad. If anyone could help me I'll appreciate it. Thanks
Sub DoFolder(Folder)
Dim SubFolder
Dim Cadena
Dim Coordenate(0 To 2) As Double
Dim myScale As Double
Dim sFileName As String
For Each SubFolder In Folder.SubFolders
DoFolder SubFolder
Next
Dim File
For Each File In Folder.Files
sFileName = Right(File, 3)
If sFileName = "dwg" Then
Do Until sFileName = ""
'Create a Document
Dim docObj As AcadDocument
Set docObj = ThisDrawing.Application.Documents.Add
'Open File
Coordenate(0) = 0#: Coordenate(1) = 0#: Coordenate(2) = 0#
myScale = 1#
ThisDrawing.Import File, Coordenate, myScale
'Save the document
File = Left(File, Len(File) - 3)
ThisDrawing.SaveAs File & "dwg"
sFileName = ""
Loop
End If
Next
End Sub
Solved! Go to Solution.