Please provide more information about what you have already done. That will make it much easier to point you in the right direction. Also indicate what scripting environment you are using - vbscript, EFM, or .net.
Thanks for your response.
I am trying to generate dxf file from fablink using MGCPEngines.The code is developed in vb 6.0.
Set pathapp = GetObject(, "MGCPCB.FablinkXEApplication")
Set pathdoc = pathapp.ActiveDocument
Set dxfexp = CreateObject("MGCPCBEngines.DXFExport")
dxfexp.DesignFileName = pathdoc.FullName
dxfexp.DXFUnits = 4
dxfexp.FillPads = True
dxfexp.MirrorOutput = False
dxfexp.OutputFileName = "C:\Test35671911.dxf"
Call dxfexp.PutElementExport(eengElementTypeAssemblyOutlineTop, "", "Assembly Outlines Top", True)
Set dxfexp = Nothing
But the generating .dxf contains all the layers information,but my requirement is to generate only for below attached screenshot items.
Thanks & Regards,
fablink_engine.jpg 21.0 KB
You are on the right track. Here is an example subroutine that is working:
Public Sub create_dxf_file(file As String)
Dim dxfeng As MGCPCBEngines.DXFExport
dxfeng = CreateObject("MGCPCBEngines.DXFExport")
If dxfeng Is Nothing Then
MsgBox("Unable to export DXF file " & file & ". The DXF Export Engine failed to start." )
dxfeng.DesignFileName = pcbdoc.FullName
dxfeng.FillPads = False
dxfeng.MirrorOutput = False
dxfeng.PutElementExport(150, "0", "ARX_HOT_NET_DATA", True)
dxfeng.OutputFileName = file
dxfeng = Nothing
There are a couple of things you can look at:
1. Take note of the PutElementExport line in my example. 150 is for eengElementTypeUserElements, 0 is for DXF layer 0, then I have the specific user layer from my design, and the True statement. If I were you, I'd try this with some userlayer from your design, and be sure to specify a DXF output layer with the second argument in the function. I think this is the problem. Doing it in a simple way like this would establish that there are no other problems. I can't see anything else in your example code which might be an issue.
2. But there is one other thing to make sure of. What version of Expedition are you using? If any flavor of VX, you need to start your VB6 application with mglaunch. If 7.9.5 or earlier, this is not necessary. There is a lot of information in this forum on how to implement mglaunch.