powered by CADENAS

Manual

Manual

1.2.3.  Set-up PLM Synchro via plmsynchro.cfg

[Note] Note
  • Use a PARTsolutions installation version 9.08 SP2 or higher as base for PLM Synchro If you have any questions please contact a CADENAS Consultant.

  • If PLM Synchroenvironment is copied to a clean CAD snapshot please regard that registering interfaces won't work until CADENAS system variables are set.

  • The following guideline is based on PARTsolutions 9.08 SP2 or higher and serves to the installation of a functional PLM Synchro environment. Details are found in the following sections.

  • Inventor is exemplarily assumed as CAD system, PdmProxyFSOPdmIfaceC as PDM proxy, meaning the native files are stored in a specified directory.

  • The configuration file for PLM Synchro (plm_synchro.cfgis not part of a standard installation.

    Create the file with the console via plm_synchro.vbb.

    cscripthost.exe plm_synchro.vbb -? cfg >C:/plmsynchro/plm_synchro.cfg

In the following the most important settings are explained, which are required for a first successful test run. The parts to be imported may be stored in a directory of your choice. From these files a company parts catalog with flat structure is created.

  1. PLM Synchro working directory

    Exemplary structure

    Exemplary structure

    At any location, create a PLM Synchro working directory.

    Example:

    C:\PLM_Synchro\workingdir

    Under "workingdir", create one directory for the files to be imported and another to store the process data.

    • C:\PLM_Synchro\workingdir\cad_parts

    • C:\PLM_Synchro\workingdir\backup

  2. plm_synchro.cfg (most important settings)

    • [PLMSynchronization]

      Example:

      [PLMSynchronization]
      JobBackupDirectory=E:\PLM_Synchro\workingdir\backup

    • [JOB]

      Example:

      IFace=PdmProxyFSOPdmIfaceC
      #conversionPath=iface.inventor>partjava
      OutputFormat=PARTJAVA 
      ToFile=1
      ToFileFail=1

    • [QUERY]

      Example:

      [QUERY]
      documentnamelike0=*.ipt
      documentnamelike1=*.iam
      

    • [CONVERSION]

      Example:

      [CONVERSION]
      inputversion=iface.inventor

    • [IMPORT]

      Example:

      [IMPORT]
      NameErpID=DOCUMENT_NAME
      IFace=ci
      InitMode=1
      ciCfg=E:\V1100SP0\setup\classimport.cfg
      OverwriteMode=0

    • [Download]

      Example:

      [Download]
      Directory=
      

      [Important] Important

      The activation of the key "Directory" is mandatory.

      In the case of FSO (for declaration see ???) the value remains empty!

      Otherwise you can state the target directory for downloaded documents here.

    Details on the configuration of plm_synchro.cfg can be found under ??? (currently only available in German).

  3. Environment variables

    In the course of the PARTsolutions installation all required environment variables have been set. Thus they can be used for launching PLM-Synchro via batch file.

  4. pdmProxies.cfg

    Open the configuration file %CADENAS_SETUP%/pdmProxies.cfg.

    In the used proxy section (here [PdmProxyFSOPdmIfaceC]) enter the path to the parts to be processed.

    [PdmProxiesCommon]
    ...
    [PdmProxyVaultIfaceC]
    ...
    PdmProxySWEnterprisePdmIfaceC]
    ...
    [PdmProxyWindchillIfaceC]
    ...
    [PdmProxyFSOPdmIfaceC]
    ...
    #:HELP;default; The path to the folder to start the search from.
    SearchBasePath=C:\PLM_Synchro\workingdir\cad_parts
    ...
    [PdmProxyTeamcenterIfaceC]
    ...
    [PdmProxyCreoTeamcenterIfaceC]
    ...
    [PdmProxyNxTeamcenterIfaceC]
    ...
    [PdmProxyTranslator]
    
    

    • If neutral formats shall be processed, please activate the following key. For native formats it has to be deactivated.

      [PdmProxyFSOPdmIfaceC]
      ...
      #HELP:default; Unless you want to convert non-cad files (e.g. stp), 
       keep this key commented out.
      conversion_helper_class=pdmProxyConversionHelper_TranslatorLineC
      

    Set ignoreFatalErrors=1 to skip corrupted parts. If the value is not set to 1 the import is cancelled at the first corrupted part.

    ignoreFatalErrors=1

  5. ifacecommon.cfg

    Open the configuration file %CADENAS_SETUP%/ifacecommon.cfg.

    Activate the keys of the chosen proxy (here exemplified iface.inventor)

    Check whether all entries are correct, if not please adjust them.

    [iface.solidworks]
    ...
    [iface.inventor]
    Name_0=batch
    RequestLevel_0=1
    Command_0=C:\Program Files\Autodesk\Inventor 2017\Bin\Inventor.exe
    Parameters_0=
    TimeOut_0=60000
    WorkingDirectory_0=C:\Program Files\Autodesk\Inventor 2017\Bin
    EnhConfiguration_0=
    ...
    [iface.solidedge]
    ...
    [iface.proewildfire]
    ...
    [iface.catia]
    ...
    [iface.osdm]
    ...
    [iface.ugnx]
    ...
    

    [Important] Important

    In the key "WorkingDirectory_0" the path is stated up to the "Bin" directory by default (compare above).

    Exceptions exist for NX and CREO: Here the value "%TEMP%" has to be set.

  6. classimport.cfg

    Open the configuration file %CADENAS_SETUP%/classimport.cfg.

    • Set the CAD identification of the used CAD system and the category name.

      [CLASSIMPORT]
      #:VALS_SE;"STLFILE"
      #:HELP;default;CAD-Identification for the native parts
      #:HELP;german;CAD-Kennung für die zu erzeugenden nativen Teile
      NATIVETYPE=Inventor
      
      #:VALS_S;nat,cat
      #:HELP;default;Name of the category
      #:HELP;german;Name des neuen Kategorie
      CATEGORYNAME=cat
      

    • Set the internal (CLASSNAME) and external (CLASSDESC) catalog name. CLASSDESC is the displayed catalog name in PARTdataManager. Into this catalog the parts are imported.

      CLASSNAME=plmstestcatalog5
      CLASSDESC=plmstestcatalog5
      

    • For a first test run, deactivate the use of the link database.

      #:VALS_N;0,1
      #:HELP;default;0=don't use linkdatabase
      #:HELP;german;sollen Stammdaten in die Linkdatenbank eingetragen werden. Wenn 0, 
       dann ohne Stammdaten arbeiten
      USELINKDB=0
      

      When activating the use of the link database please especially regard the setting under C:\ProgramData\cadenas\partsolutions\setup\classimport.cfg -> [MATNR_FIELDS]

  7. The most important settings in plm_synchro.cfg

    Open the configuration file %CADENAS_SETUP%/plm_synchro.cfg.

    • Set interface name

      Each PDM system has its own interface (PdmProxySWEnterprisePdmIfaceC, PdmProxyWindchillIfaceC, PdmProxyCreoTeamcenterIfaceC or PdmProxyNxTeamcenterIfaceC). When using the interface "PdmProxyFSOPdmIfaceC" the native parts are stored in a specified directory.

      [job]
      #IFace Description: Interface name or identifier. Interface names can be PDM system
       names which are then mapped to interface identifiers. Possible values are stored 
       under $CADENAS_SETUP\pdmProxies.cfg
      #Value: Interface name or identifier. PdmProxySWEnterprisePdmIfaceC,
       PdmProxyWindchillIfaceC, PdmProxyFSOPdmIfaceC, PdmProxyCreoTeamcenterIfaceC,
       PdmProxyNxTeamcenterIfaceC
      IFace=PdmProxyFSOPdmIfaceC
      

    • Determine the backup directory. Here, all process log files are stored, whereby you can analyse the process and possibly occurring errors.

      [job]
      BackupDirectory=C:\PLM_Synchro\workingdir\backup
      

      • Alternatively, you can create a timestamp folder structure for the backup files, so that the backup files won't be overridden and previous stay accessible. In this case deactivate the other key.

        [PLMSynchronization]
        JobBackupDirectory=C:\PLM_Synchro\workingdir\backup

        Result with timestamp folder structure

        Result with timestamp folder structure

    • Set output format

      [job]
      #TODO: Auch in Conversion möglich? Dann ggf. dahin verschieben...
      #OutputFormat Description: Conversion option. Output format identifier.
       The documents will be converted to this format.
      #Value: Format identifier. STL_REDUCED, PARTJAVA_REDUCED 
      #OutputFormat=PARTJAVA_REDUCED
      OutputFormat=PARTJAVA_REDUCED
      

    • Set input format

      A range of filters is available.

      For a first test run it makes sense to filter with the file extension (may be only for single parts).

      [query]
      ...
      documentnamelike0=*.ipt
      documentnamelike1=*.iam
      ...
      #documentnamelike0=*.sldprt
      ...
      #DocumentNameEqual Description: Adds a condition to the query to exactly match
       specific document names.

    • Set exact CAD name

      Thereby the CAD is identified, which is used for the conversion of files.

      With V10, inputversion value is linked to block name in ifacecommon.cfg.

      So for Inventor, it would have to be set up like this:

      inputversion=iface.inventor

    • Specify document property, which shall be used for the ERP-ID. With the help of the ERP-ID each line is uniquely identified.

      When setting the key NameErpID to "DOCUMENT_NAME" for example, the document name is inserted in the column "ERP_PDM_NUMBER".

      [import]
      #NameErpID Description: Import option. Name a document property of which to take the 
       value to set as the ERP-ID for each document. Document properties: CNSUID, 
       CADIDENT_IDNR, PDM_ID, DOCUMENT_NAME, DOCUMENT_PATH, RELEASE_STATE, PDM_TYPE, 
       PART_TYPE, DATE_CREATED, DATE_MODIFIED, DATE_RELEASED.
      #Value: Document property: CNSUID, CADIDENT_IDNR, PDM_ID, DOCUMENT_NAME, DOCUMENT_PATH,
       RELEASE_STATE, PDM_TYPE, PART_TYPE, DATE_CREATED, DATE_MODIFIED, DATE_RELEASED.
      NameErpID=DOCUMENT_NAME
      

    • Set key "OverwriteMode" to 0

      Once no changes shall be applied anymore to the existing state, use the value 0.

      [import]
      OverwriteMode=0
      

  8. Create batch file

    Create a batch file with the following parameters:

    • Reference to cscripthost.exe (due to performance reasons the 64bit variant should be used)

      cscripthost calls up the respective vbb file plm_synchro.vbb.

    • Reference to plm_synchro.vbb

    • Reference to plm_synchro.cfg

      With the parameter "-cfg" the configuration file plm_synchro.cfg is determined.

    Example:

    "%cadenas%\bin\x86\64\cscripthost.exe" 
     "%cadenas_setup%\scripts\common\plm_synchro.vbb" 
     -cfg "%cadenas_setup%\plm_synchro.cfg"
    
    Pause

When all settings are made execute the batch file.

-> The CAD system is automatically started, the native parts from the directory C:\PLM_Synchro\workingdir\cad_parts are sequentially processed, finally the CAD system is automatically closed again.

-> In PARTdataManager, a company parts catalog is created, named as defined in the configuration file classimport.cfg, in the key CLASSDESC.

PARTdataManager with company parts catalog

PARTdataManager with company parts catalog

If you would like to execute further test runs and keep the catalog just created, change the catalog name under %cadenas_setup%/classimport.cfg.

[CLASSIMPORT]
CLASSNAME=plmstestcatalog7
CLASSDESC=plmstestcatalog7

All process files have been stored under C:\PLM_Synchro\workingdir\backup.

At a faultless process the entries in the log file classimport.log should be similar like this:

17.12.2014 14:46:21 Lock file was opened
17.12.2014 14:46:21 Import class structure
17.12.2014 14:46:21 Import Attributes
17.12.2014 14:46:21 Add attributes for 2-001730_0_2.ipt in class 2-001730_0_2.ipt
17.12.2014 14:46:21 Import images and 3d files
17.12.2014 14:46:21 Update STL file C:/cadenas/partsolutions/data/pool/insertpool/...
17.12.2014 14:46:22 Update preview file C:\cadenas\partsolutions\data\pool\insertpool\...
17.12.2014 14:46:22 Update STL file 2-001730_0_2.ipt.stl
17.12.2014 14:46:22 Activate attributes
17.12.2014 14:46:22 Activate class structure
17.12.2014 14:46:22 Generate index
17.12.2014 14:46:22 Index has been generated
17.12.2014 14:46:22 Generate geometrical index
17.12.2014 14:46:24 Geometrical index has been generated
17.12.2014 14:46:24 Generate configuration files for search
17.12.2014 14:46:24 Generate lucene index for search
17.12.2014 14:46:26 Search index has been generated
17.12.2014 14:46:26 Lock file was unlinked
17.12.2014 14:46:26 update finished
17.12.2014 14:46:26 Status: OK