Adding Support for Custom Derived Output

Custom derived outputs are user-defined or third party output files. Connector for AutoCAD supports the checkin of these types of derived outputs.


Before you begin:

To add a support for custom cerived output,

  • You must save third party files or user-defined custom files in the local working directory.
  • You must save an original file and its derived file with the same name.

Example: For a TestPart.sldprt, if the custom derived output has a .zip format, the file name should be TestPart.zip.

  1. Represent the custom derived output type using the userfile_extension convention.

    In a case where the file has a .zip extension, this type should be userfile_zip.

    1. Update the MCADInteg-BusTypeMapping attribute in GCO as follows:

      userfile_zip|Derived Output
      
      Important: You must follow the convention userfile_extension for representing the custom derived output type. During checkin operation, the App checks for the prefix userfile_ to identify user-defined or third party derived output types. In such a case, the App searches for the files with the extension as defined using the userfile_extension convention, in the same folder as the model file.

    2. Update the GCO attribute MCADInteg-TypeClassMapping as follows:

      TYPE_DERIVEDOUTPUT_LIKE|userfile_zip
      
      Important: Within the GCO you should define the types using the postfix (Example: gli, .zip) so that such files are considered as custom derived output.

  2. Categorize this derived output type depending on the CAD type and update the GCO attribute MCADInteg-TypeDerivedOutputMapping.

    In this case if .zip files are used for all types parts, assemblies and drawings, then the following mappings must be added:

    • assembly|userfile_zip 
      
    • component|userfile_zip
      
    • drawing|userfile_zip
      

  3. Add the format for the derived output type in the MQL.

    To list the available GCOs with their Bus ID and revision, run the following command

    MQL>temp query bus *Global* * * select id;

    To modify a GCO attribute from a GCO, run the following command

    MQL>modify bus <busname> <attributename> "<attribute value>";

    For example, to modify GCO attributes for Connector for AutoCAD GCO with Bus ID 12345,

    MQL>modify bus 12345 MCADInteg-RenameFilesInServer True;

    Tip: For modifying attributes with multiline values, use Notepad++ or any text editor to specify the command with multi-line values on multiple lines with each value in double quotes. Copy paste the entire command to MQL command line to run the command.
    Note: In this case, you can add the format ZIP.

    1. Search for the Attribute with name CAD Type using MQL.
    2. Open this attribute for editing and go to the Ranges tab.
    3. Add to the range of the values the type representation userfile_extension for this custom derived output type.

      In this case, it would be userfile_zip

    4. Add this newly added format to the allowed formats of the following policies:

      • Derived Output Policy
      • Design Policy
      • Versioned Design Policy

    5. Update the GCO attribute MCADInteg-TypeFormatMapping as follows:

      userfile_zip|Derived Output, ZIP
      

All the derived outputs will be checked in with separate formats of the same derived output object or the CAD Type Object depending on the user setting as follows:

  • If the MCADInteg-CreateDerivedOutoutObj flag in the GCO is set to TRUE, the derived outputs will be checked in the corresponding formats of the same Derived Output object linked to the CAD Model.
  • If the MCADInteg-CreateDerivedOutoutObj flag in the GCO is set to FALSE, the derived outputs will be checked in the corresponding formats of the same CAD Model object.
Note: If you select Delete Files on checkin, Connector for AutoCAD will delete these derived output files after checkin.