TheSwamp
Code Red => VB(A) => Topic started by: Matersammichman on August 08, 2006, 03:21:23 PM
-
Okay, I know how to open dwgs from VB6, but how do I open DXF's?
-
.....It is recommended that you save the current drawing before calling this method.
This method opens AutoCAD drawing files (DWG) only. Use the Import method to open SAT, EPS, DXF, WMF, or BMP format files.
.....
-
Jeff, yes, I've tried the Import code such as is suggested in VBA, but without success.
Ideas?
-
Hmmm, I just tested and the Open method works with DXF files.....
Sub Open_Test()
Dim dwg As AcadDocument
Set dwg = Application.Documents.Open("C:\Jeffs Test Files\junk\dxftest.dxf")
End Sub
-
Thanks for the help Jeff.
I've got that working thanks to you.
Now, what I want to do is batch convert my dxf's into dwg's (big surprise, huh? Probably not). So, how do I populate a list or combo box with a folder full of dxf's? I know there are plenty of these out there that I could buy, but in my case, poor and broke is the mother of necessity.
-
This is for Word but it's easy to modify to suit
http://www.vba-programmer.com/Snippets/Code_Word/Building_Filename_Array.html
then you just use
mylistbox.list()=myarray
to populate your listbox