1 Reply Latest reply on Aug 20, 2009 3:23 PM by yu.yanfeng

    EDIF2CCZ

    chris_czernel

      Customer inquired about how to automate the conversion of EDIF to CCZ files using CAMCAD.

       

      Here is a very simple example:

      * it launches CAMCAD

      * loads the EDIF file using the OpenCADFile API

      * saves a CCZ file using SaveCompressedDataFileAs

      * closes the project window

      * closes CAMCAD

       

      Short and sweet. Code below, vb6 project and video attached.

      Thanks

      Chris

       


      Option Explicit
      Public objCAMCAD As CAMCAD.Application

       

       

       

      Private Sub Command1_Click()
      Dim path As String
      Dim lngPID As Long

       

      ' put your camcad path and executable name here
      lngPID = Shell("C:\Program Files\Router Solutions\CAMCAD\camcad4.7.559.exe /nosplash", vbNormalFocus)
      Set objCAMCAD = New CAMCAD.Application

       

      ' path to file to convert
      path = "c:\temp\EDIF2CCZ\"

       

      objCAMCAD.OpenCadFile path & "schematic1.edf"
      objCAMCAD.SaveCompressedDataFileAs path & "test_schematic.ccz"
      objCAMCAD.CloseActiveDocument
      objCAMCAD.Exit

       


      End Sub