automatically create dxf

Hi Everyone,
I was wondering if anyone could suggest an automated method of creating an environment from two dxf files and then exporting the
combined environment as another dxf file using autocad from an external program written in VB or using VBA.
Many thanks,
John.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

If you have AutoCAD, why would you want an external program to combine files?
Bob
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Because the process has to be fully automated as I have two constantly changing input dxf files which have to be combined and fed into another program (not AutoCad) which cannot do the combining...
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload


The basic thing you need then is a full understanding of the dxf format for whatever program created the dxf file, and have your program modify, if necessary and insert the appropriate data in the correct section of the dxf file.
Bob
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Hi Bob
Many thanks for the suggestion. I am totally new to AutoCAD and the dxf file format. I had a look at the dxf files created by the other software and they seems really complex. I am hoping that AutoCAD will do the work for me by performing the following simple tasks using VB6: Open AutoCAD -> Import the two dxf files -> export the combined plot into another dxf file. Using VB I have managed to open an a new .dwt file. When I try using the following code to load a .dxf file nothing happens:
Private Sub Command1_Click() Dim AcadDoc As AcadDocument Dim acadApp As AcadApplication
Set acadApp = GetObject(, "AutoCAD.Application") Set AcadDoc = Application.Documents.Add("acad.dwt") acadApp.Visible = True
Dim insPnt(0 To 2) As Double
insPnt(0) = 2 insPnt(1) = 2 insPnt(2) = 2
Set AcadDoc = acadApp.ActiveDocument.Import("c:\Drawing1.dxf", insPnt, 1)
End Sub
There are no error messages and AutoCAD opens fine, its just the content of the drawing is not displayed. Can't figure out what is going on.
John.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

If it is of any value if I double click on a dxf file it starts Autocad and loads the dxf and opens it.
Bob
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

This entered as a command line does what you seem to want to do.
C:SimpleBalancedReceiver.dwg C:\Program Files\AutoCAD 2005\acad.exe
Bob
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.