Tracking down the WorkManager/ModelManager to Modeling Load Process
      -------------------------------------------------------------------

      When a 3D model cannot be loaded from WorkManager and/or ModelManager
      to Modeling (SolidDesigner), this can have several reasons.
      The procedure described here helps to track down the problem. 

      By using this procedure you can identify if the 
      problem is caused by:
      - WorkManager Database
      - SolidDesigner 
      - DDM and/or MM integration 

      The procedure is:

      1) Load the tools:

      (load "sd_tools.lsp")

      Download sd_tools.lsp

      2) Activate the Tools (tmp directory is *not* deleted)

      RMTMPDIR :status :keep complete

      3) Load 3D model from WM to SD
         In the display box of SolidDesigner
         you should see two messages like:

      NOTE: not removed /usr/tmp/sdgwWDFgJQXgX_
      NOTE: not removed /usr/tmp/sd491086.aip

      4) At this point, the data files (and more data)
         extracted from WorkManager are located in
         the two directories. (By default, these
         directories are automatically removed when
         a model is loaded from WM to SD. The removal
         is disabled by the tool RMTMPDIR)

         The contents of such a directory looks like:

         hpbmdd21 /usr/tmp/sd491086.aip>> ll
         total 58
         -rw-r--r--   1 maku hercules 19417 Jun 21  2000 B1.SD
         -rw-rw-r--   1 maku hercules  2370 Feb 16 11:48 DESCFILE.DSC
         -rw-rw-r--   1 maku hercules     7 Feb 16 11:48 FLIST
         -rw-rw-r--   1 maku hercules  2589 Feb 16 11:48 dsc2lsp.lsp
         -rw-rw-r--   1 maku hercules   513 Feb 16 11:48 sd491979.csl
         -rw-rw-r--   1 maku hercules   487 Feb 16 11:48 sd492127.csl
         -rw-rw-r--   1 maku hercules   781 Feb 16 11:48 sd492142.csl

      4a) Description of files in the '*.aip' directory:

          - The file 'FLIST' contains a list of all model files
            needed to load the model into SolidDesigner.
          - Files named 'B.SD' or 'sd.3d'
            are the 3D model files. In standard SolidDesigner
            these files would have names '*.sd*', e.g
            'p1.sdpc', 'a1.sda' etc.
          - For a 'full' load operation, only files from
            the '*.aip' directory (the directory containing
            the FLIST file) will be needed to load the
            model into SolidDesigner.
          - For a 'partial load' operation, the second directory,
            e.g '/usr/tmp/sdgwWDFgJQXgX_' will contain a file
            "dummy_parts.sd". This file is gerated by SolidDesigner.
            (note: this file has *not* been loaded from the WorkManager
             database). 
          - Files named '*.csl' contain meta-data
            from the WorkManager database (classes, structure,
            attributes etc.) related to the 3D model.
            These files have been created by Macros running
            in WorkManager (client).
          - The file 'dsc2lsp.lsp' has been generated by the
            WM integration part inside SolidDesigner and 
            contains generated LISP-code which is executed 
            inside SolidDesigner.

      5) Load the model from the '*.aip' directory.

         The 3D model can be loaded from the file in the
         temporary directory. This is exactly what happens
         when a model is loaded from WM to SD.

      5a)When only a single SolidDesigner part is loaded,
         FLIST will contain only a single file, e.g. B1.SD

         This file can be loaded directly into SolidDesigner:

         CD "/usr/tmp/sd491086.aip"
         LOAD_SD "B1.SD"

         or:

         LOAD_SD "/usr/tmp/sd491086.aip/B1.SD"


      5b)An assembly consists of several files which 
         must be loaded in a special way.
         On UNIX, the following will load the assembly:

         CD "/usr/tmp/sd491086.aip"
         LOAD_SD "| xargs cat < FLIST"

         The last command concatenates all files listed in the
         file FLIST and directly 'pipes' the result into
         SolidDesigner.

         On the NT platform, concatenation of all files 
         is done in a separate step before the LOAD_SD
         command is started. The load statement will
         be:

         LOAD_SD "nt_cat.out"
   

      5c)Alternatively, from a UNIX terminal window,
         you can create the concatenated files as
         follows:
          
         cd /usr/tmp/sd491086.aip
         xargs cat < FLIST > /tmp/sd.sda

         Now file "/tmp/sd.sda" contains the complete
         contents needed to load the 3D model.
         
         You can load this into SolidDesigner as follows:

         LOAD_SD "/tmp/sd.sda"

     With 5a) to 5c) any 3D model from WorkManager
     can be loaded into SolidDesigner without interaction
     with WorkManager. Therefore the root cause of a 
     WM to SD load problem can be located.

     6) Check load operation in SolidDesigner

     Provided that the WM to SD load failed, you should
     see an error message in SolidDesigner when you load the
     model with the regular LOAD_SD command.
     A few cases which could happen:

     - Errors about missing files:
       This indicates a problem in WorkManager.
       At least one file was missing (or did not contain
       what was expected by Modeling)

       At this point you can try the (unsupported) switch:
       (CLUSTER-MANAGER-CONTROL :ALLOW-MISSING-FILES T)

       and try again to load the model.

     - NOTE: Starting with Release 17, the switch (CLUSTER-MANAGER-CONTROL :ALLOW-MISSING-FILES T)
       has been protected by a license because it was used as "default" by many users.
       The switch should only be used in the rare case of a load failure (Error 337)

     - Errors like 'Segmentation Violation'.
       Problem is located in Modeling.
       Modeling fails to load.

       Actions:
       Submit a high priority defect.
       Problem needs to be investigated by Modeling R&D

     - Errors like 'file contains corrupt data'.
       Could happen in a mixed environment, when 
       the user attempts to load a file written 
       by a higher version of SD (e.g. 8.05) into
       an older version of SD (e.g. 7.50)
       However, could also mean that a file is
       really corrupt.

       Actions:  
       Analyze the file with the pb_pub.exe tool.
       pb_pub.exe is part of each Modeling and/or ModelManager release.
       With some practice you can tell if the file is really corrupt (in this
       case you need to find out *why* the file got 
       corrupted; this is a complex task) or it looks like 
       SolidDesigner has a bug (failure in load code).

     - For all kinds of errors, more details can be 
       inquired by the following call:

       (display (cluster-manager-errors))

       This will give you a more detailed list of
       error codes which occurred during the last
       load operation. Note: This function is not
       part of the official SD Intergration Kit,
       therefore no official documentation of it

     7)Send Files to PTC/CoCreate

       For all kinds of errors, the contents of the
       temporary directories should be sufficient
       to reproduce the load failure in SolidDesigner.
       Therefore you can create a TAR or ZIP file
       containing the contents of the directories 
       and send this to PTC/CoCreate Support for analysis.

       To create a TAR file, proceed as follows:

       cd /usr/tmp
       tar -cvf sd-xxx.tar /usr/tmp/sdgwWDFgJQXgX_ /usr/tmp/sd491086.aip
        
       NOTE: 'sd-xxx.tar' is the filename of TAR file to create,

       On NT, create a ZIP file containing the directories.

       Finally, send the TAR or ZIP to PTC/CoCreate Support
       for inspection. 


       Max Kublin, Technical Leader - ModelManager Support  13-Feb-2012


$Header: /cvs/mk/products/sd-tools/load_wm2sd/wm_sd_load.html,v 1.2 2012/02/13 18:51:00 maku Exp $ Contact:mkublin@ptc.com