Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
WCBasicAdminGuide.pdf
Скачиваний:
71
Добавлен:
23.03.2015
Размер:
3.31 Mб
Скачать

13

Understanding Context Templates

Out-of-the-box Context Templates ............................................................................

394

Methods of Creating Additional Context Templates ....................................................

394

Creating Business XML Files for Context Templates ..................................................

396

Required Contents of Files Used to Create a Context Template ..................................

396

ZIP File Contents of an Exported Context Template ...................................................

398

Required Contents of ZIP File Used for Importing a Context Template .........................

399

Managing Context Templates ...................................................................................

401

This section provides details on how to create and manage context templates.

Note

Many of the descriptions in this section assume you are familiar with XML. The XML files that are used must be coded against the standardX20.dtd. You can download the standardX20.dtd by downloading any of the context templates. The DTD is contained in the downloaded ZIP file.

395

Out-of-the-box Context Templates

An initial set of context templates was loaded when your Windchill solution was installed. For a list of the loaded templates, see Installed Site Templates on page 76 For details about the loaded. templates, see the following:

For organization templates, see Out-of-the-box Organization Templates on

page 151

.

For product and library templates, see Out-of-the-box Product and Library

Context Templates on page 186

.

For program and project templates, see Out-of-the-box Project and Program

Templates on page 245

.

The XML elements in the template load files are basically the same as those used for the import and export functionality. However, there are minor variations and the load files are not meant to be used directly when you create new context templates.

Methods of Creating Additional Context

Templates

Only site administrators can create organization templates. Site and organization administrators can create product, library, program, and project templates.

You can create additional context templates in the following ways:

Using the new template icon to create a template using a custom context template input file. This option is available for all contexts. For more information, see Create a Context Template with a New Input File on page

394

.

Using the Save as Template action to create a new template from the current context. This option is only available for application contexts. For more information, see Create a Template from the Current Context on page 395

Using the Export as Template action to export the current product, library, project, or program context as a template. This option is only available for

application contexts. For more information, see Create a Context Using Export on page 395 .

Create a Context Template with a New Input File

You can include an additional context template by creating the input file manually, select the appropriate view from the view drop-down list, and click the new

template icon from the Templates table to create the template. This is the only

396

PTC Windchill® Basic Administration Guide

option available for creating an organization template. For more information on

 

the required contents of the file that is used, see Required Contents of Files Used

 

to Create a Context Template on page 396

.

Create a Template from the Current Context

The Save as Template action provides a way to create a new template from the current context.

A newly created product, library, program, or project template is saved in the organization context that is a parent of the current context and appears in the Templates table of that context when the table view is set for that context template type.

Create a Context Using Export

The Export as Template action allows you to export the current product, library, program, or project context as a template by creating a ZIP file on your system.

For more information on the contents of the exported ZIP file, see ZIP File

 

Contents of an Exported Context Template on page 398

.

You can import an exported template by navigating to either the site or the

 

organization under which you want the template imported and clicking the

 

Templates link. From the Templates table that appears, select the type of template

 

from the view and click the import from file icon . For more information on the

 

required contents of the ZIP file that is imported, see Required Contents of ZIP

 

File Used for Importing a Context Template on page 399

.

Using the import from file icon

creates a template with the same name as the

 

exported template. If you want to specify a different name for the template, you can do either of the following:

Select the new template icon instead of the import from file icon . On the window that opens, you specify the name and description of the template. This information is used in place of the name and description in the ZIP file.

Modify the contents of the TAG-ContainerTemplate-0.xml file that is in the exported ZIP file to change the name and description of the template and then use the import from file icon to import the exported template.

The import and create functions do not validate that the input XML conforms to the DTD; you must do this before doing the import or create function.

Understanding Context Templates

397

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]