3 Replies Latest reply on Oct 19, 2016 7:58 AM by Patrick.Cashman

    unable to Export .Dxf file from Fablink XE  using  'MGCPCBEngines.DXFExport'

    nagavasanthi.p

      Hello all,

       

      I am trying to generate the .Dxf file from Fablink XE using MGCPCBEngines through automation but unable to generate the file. Kindly help me in this regard.

       

      Thanks & Regards,

      Sampath

        • 1. Re: unable to Export .Dxf file from Fablink XE  using  'MGCPCBEngines.DXFExport'
          Patrick.Cashman

          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.

          • 2. Re: unable to Export .Dxf file from Fablink XE  using  'MGCPCBEngines.DXFExport'
            nagavasanthi.p

            Hi Patrick,

            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)

                  dxfexp.Go

             

                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,

            Sampath

            • 3. Re: unable to Export .Dxf file from Fablink XE  using  'MGCPCBEngines.DXFExport'
              Patrick.Cashman

              Hi Sampath,

               

              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." )

                           Exit Sub

                       End If

                      

                       dxfeng.DesignFileName = pcbdoc.FullName

                       dxfeng.FillPads = False

                       dxfeng.MirrorOutput = False

                       dxfeng.PutElementExport(150, "0", "ARX_HOT_NET_DATA", True)

                       dxfeng.OutputFileName = file

                      

                       dxfeng.Go

                      

                       dxfeng = Nothing

              End Sub

              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.