Home Search

DriveWorks Pro 22
How to: Create and Install a Project Template

Send Feedback

How to: Create and Install a Project Template

This topic shows how to create a Project Template and install it to be used for other Projects and users.

A Project Template has the file extension of .driveprot

Create a Project Template

  1. Using Windows Explorer browse to the Source Root Folder of the Project to be used as the template.

    Ensure the Source Root Folder is high enough in the folder structure that it encompasses all relevant files and folders.

    This will ensure that all necessary files with their correct references will be included in the template.

    For example the image below shows Project A as the Project to be used as a template.

    This is located as a sub folder of a Projects folder, which is a sub folder of the Source Root Folder.

    This Source Root Folder is high enough in the folder structure to encompass all required folders.

    Image showing Source Root Folder

  2. In the Source Root Folder create a new file and name it template.xml

    Copy the XML below into this file.

    Change the text Project Template to be the name required to be displayed in the template chooser.

    Save and close.

    <?xml version="1.0" encoding="UTF-8"?>
    <template DisplayName="Project Template" />
  3. In the Source Root Folder create a new folder and name it Description.
  4. In the Description folder create a new file and name it index.html

    Copy the html below into this file.

    Change the text Project Template and Project Template Description to be the text required to be displayed when the template is selected in the template chooser.

    Save and close.

    <!DOCTYPE html>
    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <meta charset="utf-8" />
                <title>Project Template Title</title>
                <style type="text/css">
                    html {
                        font-family: 'Segoe UI', Verdana, Arial;
                        font-size: 12px;
                        }
                        h1 {
                            color: #3f5f7f;
                            font-size: 12px;
                        }
                </style>
        </head>
        <body>
            <h1>Project Template</h1>
            <p>Project Template Description</p>
        </body>
    </html>
  5. Optionally an image can be shown for the template. Follow the steps below (Add an Image to the Index File) and return here when done.
  6. Launch DriveWorks Data Management and follow the steps in the How To Pack And Go Your Group and Project section.
    • Ensure only a single Project is selected in the Select Projects step.
    • Ensure the folder described in Step 1 above is selected as the Source Root Folder in the Additional Options step.
    • Ensure the template.xml and index.html are included in the File Selection step.
  7. Once the Drive Package has been created, rename the .drivepkg file extension to .driveprot.

Add an Image to the Index File

Images can be included in the index.html file by encoding them to base64.

Use a Web Service such as Base64 Image to convert an image to base64.

Once you have the base64 code of the image:

  1. Open the index.html file in an editor (Notepad for example).
  2. Insert the line <img src="INSERT BASE64 HERE" />, as below and replace the text INSERT BASE64 HERE below with the base64 code, obtained from the Base64 Image Encoder service used:
        <body>
            <h1>Project Template</h1>
            <p>Project Template Description</p>       
    
            <img src="INSERT BASE64 HERE" />
    
        </body>

    Ensure the quotes around the base64 code are included.

  3. Continue with the steps for creating the template from above.

Installing a Project Template

If a template is not displaying in DriveWorks after being installed check that the installer or version of DriveWorks is the one you are currently using as templates are version specific.

If there is an error in the templates data it will not display.

  1. Double click on the new .driveprot file and the DriveWorks Install Template wizard will automatically launch.
  2. Choose whether this template should be made available to either the Current User or for Everyone (who has access).

  3. The DriveWorks Install Template wizard will then launch and complete the task to install the template for the users selected.

Uninstall a Project Template

To uninstall a Project Template please follow the steps below:

  1. Open Windows Explorer and navigate to the folder where "Templates" are stored in DriveWorks.

    See Project Template File Location

  2. From the "Projects" folder, select the template you want to uninstall.
  3. Right-click and select "Delete" or press the "Delete" key on your keyboard.

The deleted Project Template will be removed.