0% found this document useful (0 votes)
64 views

Project Generator: Developed By: PC - SCHEMATIC A/S Bygaden 7 4040 Jyllinge Denmark

This document provides guidance on automatically generating projects in Automation. It discusses considerations for automatic project generation like creating drawing templates and sub drawings. It describes how to generate project definition files that control automatic project generation from templates and sub drawings. It also explains how to generate Automation projects based on a project definition file. The file formats, syntax and settings for the project generator tool are covered to enable full automatic project creation and merging capabilities in Automation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views

Project Generator: Developed By: PC - SCHEMATIC A/S Bygaden 7 4040 Jyllinge Denmark

This document provides guidance on automatically generating projects in Automation. It discusses considerations for automatic project generation like creating drawing templates and sub drawings. It describes how to generate project definition files that control automatic project generation from templates and sub drawings. It also explains how to generate Automation projects based on a project definition file. The file formats, syntax and settings for the project generator tool are covered to enable full automatic project creation and merging capabilities in Automation.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Project Generator

15/3-2013

Developed by: PC|SCHEMATIC A/S Bygaden 7 4040 Jyllinge Denmark

T: +45 4678 8244

www.pcschematic.com

[email protected]

TABLE OF CONTENTS
PREFACE ................................................................................................5
OTHER MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

GENERATE AND UPDATE PROJECTS AUTOMATICALLY ................................9


ON AUTOMATIC PROJECT GENERATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
POINTS TO CONSIDER IN PROJECT GENERATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
ON PROJECT DEFINITION FILES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
GENERATING PROJECT DEFINITION FILES FROM AUTOMATION . . . . . . . . . . . . . . . . . . 13
SETTINGS FOR THE PROJECT GENERATOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
GENERATE PROJECTS BASED ON PROJECT DEFINITION FILES . . . . . . . . . . . . . . . . . . 22

SYNTAX FOR PROJECT DEFINITION FILES.................................................27


WHAT CAN BE CONTROLLED VIA THE PROJECT DEFINITION FILE . . . . . . . . . . . . . . . . .
THE STRUCTURE AND CONTENTS OF PROJECT DEFINITION FILES . . . . . . . . . . . . . . . .
PROJECT TITLE AND PROJECT DATA IN PROJECT GENERATION . . . . . . . . . . . . . . . . .
REFERENCE DESIGNATIONS IN PROJECT GENERATION . . . . . . . . . . . . . . . . . . . . . . .
SPECIFYING DRAWING TEMPLATES AND SUB DRAWINGS . . . . . . . . . . . . . . . . . . . . . .
CONTROLLING TEXTS IN DRAWING TEMPLATES / SUB DRAWINGS . . . . . . . . . . . . . . . .
FRONT PAGES, DIVIDERS AND LISTS IN AUT. GENERATED PROJECTS . . . . . . . . . . . . .
COMMENTS IN THE PROJECT DEFINITION FILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
INSERTING NEW PAGES WHEN UPDATING EXISTING PROJECTS . . . . . . . . . . . . . . . . . .
COMMA SEPARATED FILES FOR AUTOMATIC PROJECT GENERATION . . . . . . . . . . . . . .

27
28
32
32
34
35
40
40
40
41

MERGING PROJECTS VIA THE PROJECT GENERATOR ...............................45


BENEFITS OF MERGING PROJECTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
HOW TO MERGE PROJECTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
KEEPING THE ORIGINAL PAGE NUMBERS WHEN MERGING PROJECTS . . . . . . . . . . . . .
VARIABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
STRUCTURE FOR PROJECT DEFINITION FILES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

45
46
47
51
53
57

Automation
Page 3

Automation
Page 4

Preface

PREFACE
This manual describes how to generate projects automatically in Automation.
Together with this manual it is recommended to read the "Sub drawings" chapter in
the Automation manual.

OTHER

MANUALS

For Automation the following additional manuals exist:


The Automation manual, which is the main manual for the electro-technical
documentation program Automation.
The Quick start manual, which gives you a quick introduction to Automation.
The Information & Installation manual, which gives you practical information
as well as information on how to install the program. You also get information on
how to install the license server software for multiuser network licenses.
The Tools manual, which describes how you can document symbols in projects
or libraries automatically, how to set up parameters for DWG/DXF import/export,
how to use the PC|SCHEMATIC Translator program, for translating project texts,
as well as how you automatically create graphical terminal plans, graphical cable
plans and graphical connection plans.
The Database manual, which describes how to use the PC|SCHEMATIC Database program for creating and maintaining your database for Automation.

Automation
Page 5

Preface

Automation
Page 6

Generate and Update Projects


This section describes how to generate and
update projects automatically in PC|SCHEMATIC
Automation.

Generate and Update projects automatically

GENERATE AND UPDATE PROJECTS AUTOMATICALLY


THIS CHAPTER DESCRIBES
ON AUTOMATIC GENERATION OF PROJECTS .................................................... P. 9
POINTS TO CONSIDER IN PROJECT GENERATION ........................................... P. 10
ON PROJECT DEFINITION FILES .................................................................... P. 12
GENERATING PROJECT DEFINITION FILES FROM AUTOMATION ........................ P. 13
GENERATING AN AUTOMATION PROJECT FROM A PROJECT DEFINITION FILE ... P. 22

Please also refer to Syntax for project definition files on page 27 and Merging
projects via the Project generator on page 45.

ON

AUTOMATIC PROJECT GENERATION

POSSIBILITIES IN AUTOMATIC GENERATION OF PROJECTS


GENERATING PLC AND CIRCUIT DIAGRAMS FROM A PROJECT DEFINITION
FILE FROM E.G. EXCEL
PROJECTS ON HUNDREDS OF PAGES CAN BE GENERATED FROM A SINGLE PROJECT DEFINITION FILE

CORRECTIONS CREATED IN Automation CAN BE TRANSFERRED BACK


TO THE PROJECT DEFINITION FILE, JUST LIKE CORRECTIONS IN THE PROJECT DEFINITION FILE CAN BE TRANSFERRED BACK TO Automation

Before you can generate projects automatically, you must do this:


1) Create all relevant sub drawings for automatic placing see "Creating Project pages for aut. placing of sub drawings" i PC|SCHEMATIC Automation
manualen.
2) Create all relevant drawing templates for inserting sub drawings.
See Creating drawing templates for automatic project generation on
page 10 and Points to consider in Project generation on page 10.
3) Create all other complete pages and/or projects also including front
pages, chapter front pages, tables of contents and all types of lists , that
you wish to include in the generated project.
4) Specify in which folders all of these sub drawings, drawing templates and
project pages / projects are placed. See Settings for the Project Generator on page 15, Specify where sub drawings and drawing templates are
placed on page 16 in particular.

Automation
Page 9

Generate and Update projects automatically

After this, you can generate a project definition file see On Project definition
files on page 12. Based on this project definition file you can then automatically
generate Automation projects. See Generate projects based on Project definition files on page 22.
On projects created via automatic project generation
When you have created a project via automatic project generation, you can continue working on the project, as with any other Automation project. If you want to,
you can update the project definition file at a later stage, so that it matches the
changes you have made in the project.
Creating drawing templates for automatic project generation
The pages, which the sub drawings are placed on during the automatic project
generation, are called drawing templates.
Drawing templates are created just like you create sub drawings, as described in
"Preparing Sub drawings for Dragn Draw / Aut. placing" i PC|SCHEMATIC Automation manualen.
On drawing templates you can as opposed to sub drawings also place a
drawing header.
On drawing templates you can just as for sub drawings insert variable markers, so that the texts in the drawing template can be controlled from the project definition file.
An example on creating a drawing template can be found in "Creating Project
pages for aut. placing of sub drawings" i PC|SCHEMATIC Automation manualen.

POINTS

TO CONSIDER IN

PROJECT

GENERATION

When you wish to create sub drawings for automatic project generation, it is necessary that you spend some time considering exactly how to apply the sub drawings,
and in which context they are going to be used. See also "Preparing Sub drawings for Dragn Draw / Aut. placing" and "Placing the insertion point symbols carefully" i PC|SCHEMATIC Automation manualen.
CREATING SUB DRAWINGS GRADUALLY
TO MAKE STARTING TO APPLY AUTOMATIC PROJECT GENERATION EASIER,
YOU CAN START BY CREATING THE SUB DRAWINGS GRADUALLY, AS YOU GET
TO NEED THEM IN YOUR DAILY WORK.
TO GET THE MAXIMAL BENEFIT FROM THE SUB DRAWINGS IN THE LONG
RUN, YOU MUST FIRST CONSIDER THE ISSUES MENTIONED BELOW.

You should for instance consider:


Paper size and Reference system
One of the things you should consider, is of course which paper size the sub drawings should be designed for, because this has an influence on the size of the sub
drawings.
Automation
Page 10

Generate and Update projects automatically

If you are applying a reference system on the pages, there must also be space
available for current path numbers on the page.
Using variables
When you are creating the sub drawings, you should also consider which data are
fixed, and which are changed in the repeated use of the sub drawings. For those
data that changes, you should create variables.
At the same time, you should also decide whether you wish to apply automatic
naming or not. If you wish not to apply automatic naming, you will have to create
more variables in the sub drawings.
Please note that it is possible to place variable markers for e.g. symbol names, and
in the project definition file specify not to change the symbol names from there
see Project generation with no symbol names in the project definition file on
page 39.
Creating sub drawings based on existing projects
As a starting point, it is a good idea to look closely on the already existing projects,
and discover which of the existing pages, that can be used for creating sub drawings. When examining the projects, you can also discover where the insertion
points should have been placed, if you had generated the projects automatically.
When you have done this, you can for instance start by placing the insertion points
for a coming sub drawing already in the existing project. You can then copy the
desired area containing symbols, lines and insertion points etc., and then create a
sub drawing based on the copied area.
See "Creating sub drawings by Copying from projects" i PC|SCHEMATIC Automation manualen.
Creating sub drawings as Modules
To use the area of the page to full extend in project generation, it is a good idea to
consider the size of the sub drawings.
It is here recommended to create the sub drawings in different sets of fixed module
sizes, in multipla that fits to the page size or more precisely: In multipla that fits
to the room between the insertion points on the page.
See "The function of the insertion points" i PC|SCHEMATIC Automation manualen.
As the largest module size when disregarding sub drawings that fills a full page
you can for instance create sub drawings, which you can have exactly two of on
a page.
As the next module size you can create sub drawings, of which you can have
exactly four, eight and even sixteen on a page.

Automation
Page 11

Generate and Update projects automatically

Designed this way, you can for instance have one half page sub drawing and two
quarter page sub drawings on the same page, which gives you a better use of the
pages.

+ 4x

Drawing template

+ 4 sub drawings of 1/4 page = Full use of the page

Model data in automatic project generation


See Create model variable on page 38.

ON PROJECT

DEFINITION FILES

To generate projects automatically in Automation, there must first be generated a


project definition file.
Together with the created sub drawings, drawing templates etc. see On automatic project generation on page 9 , this file defines the contents of the automatically generated project.
You can either create the project definition file directly in Excel, or you can let
Automation generate a project definition file based on an existing project see
Generating Project definition files from Automation on page 13. You can then
adapt the generated project definition file according to your needs.
See Syntax for project definition files on page 27.

Automation
Page 12

Generate and Update projects automatically

GENERATING PROJECT

DEFINITION FILES FROM

AUTOMATION

To generate a project definition file in Excel format see On Project definition


files created from Automation on page 14 from a drawing template, do the following:
WHEN USING DRAGN DRAW: KEEP TRACK OF THE FOLDERS
WHEN YOU USE DRAGN DRAW FOR DRAGGING SUB DRAWINGS AND PROJECT PAGES INTO A PROJECT, AND THEN GENERATE A PROJECT DEFINITION
FILE, INFORMATION ABOUT THE NAMES OF THESE SUB DRAWINGS, PROJECT
PAGES ETC. ARE INCLUDED, BUT THE PATH LEADING TO THESE SUB DRAWINGS ETC. IS NOT INCLUDED.
WHEN YOU EXECUTE THE AUTOMATIC PROJECT GENERATION BASED ON THE
PROJECT DEFINITION FILE, YOU MUST THEREFORE HAVE CREATED AN ALIAS
FOR EACH OF THE FOLDERS, WHICH YOU NEED TO FETCH SUB DRAWINGS
ETC. FROM.
OTHERWISE, THE PROJECT WILL NOT BE GENERATED CORRECTLY!
READ MORE ABOUT ALIASES IN WHAT IS AN ALIAS? ON PAGE 17.

1) Choose Tools => Project generator.

2) In the dialog box Project generator: Click on Options if you need to change
the settings for the project definition file see Settings for the Project Generator on page 15.
3) Click on Create project definition file from the active project and click
OK.
(If you wish to specify the settings for creating the project definition file, you
must first click the Options button see The Project definition file tab on
page 20).
4) In the dialog box Save as: Assign a name to the project definition file, and
specify where to save the file, and click Save.

Automation
Page 13

Generate and Update projects automatically

5) You now get a status of the generated project definition file:

Click OK.
You have now generated a project definition file from the active project.
ON PROJECT DEFINITION FILES CREATED FROM AUTOMATION
WHEN YOU HAVE GENERATED A PROJECT DEFINITION FILE IN THE EXCEL
FORMAT, YOU CAN EDIT THE FILE FROM MICROSOFT EXCEL, AS DESCRIBED
IN SYNTAX FOR PROJECT DEFINITION FILES ON PAGE 27.
SUCCEEDINGLY YOU CAN UPDATE THE ACTIVE PROJECT OR GENERATE A
NEW PROJECT BASED ON THE PROJECT DEFINITION FILE. READ MORE
ABOUT THIS IN GENERATE PROJECTS BASED ON PROJECT DEFINITION
FILES ON PAGE 22.

Automation
Page 14

Generate and Update projects automatically

SETTINGS

FOR THE

PROJECT GENERATOR

When you have chosen Tools => Project generator, and clicked on Options, you
can specify the settings for the project definition file you wish to generate from
Automation:
What happens when the
project is generated

What is included in the


project definition file

The file format

In the dialog box you find these tabs:


- The Generate/update project tab: Settings for what happens when the project
is generated see The Generate/update project tab on page 16.
- The Project definition tab: Settings for what is included , when the project definition file is created see The Project definition file tab on page 20.
- The File format tab: Settings for the file format for the project definition file
see The File format tab on page 21.
See also The significance of the first project page in the project definition file
on page 30.

Automation
Page 15

Generate and Update projects automatically

The Generate/update project tab


In the tab Generate/update project you specify the settings for how the project is
generated:

Specify where sub drawings and drawing templates are placed


Below Folders for sub drawings / drawing templates you can specify from
where to fetch the sub drawings, drawing templates and other project pages for the
generated project. This is done by creating an alias for each folder from which

Automation
Page 16

Generate and Update projects automatically

Automation needs to fetch drawing templates / sub drawings during the project
generation.
WHAT IS AN ALIAS?
AN ALIAS CONSISTS OF AN ALIAS NAME, AND A PATH TO A FOLDER ON YOUR
PC OR ON THE NETWORK THAT YOUR PC IS CONNECTED TO.
Alias

Path

WHEN YOU CREATE A PROJECT DEFINITION FILE FROM A PROJECT, ONLY


THE NAMES OF THE USED SUB DRAWINGS, DRAWING TEMPLATES ECT. ARE
INCLUDED IN THE FILE. THE PATH TO THE FOLDERS WHERE THESE ELEMENTS COMES FROM, ARE NOT INCLUDED IN THE PROJECT DEFINITION FILE.
WHEN YOU WISH TO GENERATE A PROJECT BASED ON A PROJECT DEFINITION FILE, Automation FIRST EXAMINES THE FOLDER AT THE TOP OF THE
ALIAS LIST, TO E.G. FIND AN APPLIED SUB DRAWING. IF THIS SUB DRAWING
CAN NOT BE FOUND IN THIS FOLDER, THE PROGRAM EXAMINES THE CONSECUTIVE FOLDERS IN THE ALIAS LIST, UNTIL A SUB DRAWING WITH THE USED
NAME IS FOUND. THIS PROCESS IS REPEATED FOR EACH INDIVIDUAL SUB
DRAWING, DRAWING TEMPLATE ETC. LISTED IN THE PROJECT DEFINITION
FILE.
THEREFORE IT IS IMPORTANT IN WHICH ORDER THE ALIASES APPEARS IN
THE ALIAS LIST. SEE ALSO ALIASES/FOLDERS CAN ALSO BE SPECIFIED
IN THE PROJECT GENERATOR DIALOG BOX ON PAGE 28 AND ALIASES RELATIVE TO OTHER ALIASES ON PAGE 29.

You can create or delete aliases by right-clicking in the alias window, as described
in "Directories" i PC|SCHEMATIC Automation manualen, in particular in "Show
directory alias". If you click on the Select folder button for one of the aliases, you
can click your way to a new folder for the selected alias.
See also On automatic project generation on page 9.
WHEN USING DRAGN DRAW: KEEP TRACK OF THE FOLDERS
WHEN YOU USE DRAGN DRAW FOR DRAGGING SUB DRAWINGS AND PROJECT PAGES INTO A PROJECT, AND THEN GENERATE A PROJECT DEFINITION
FILE, INFORMATION ABOUT THE NAMES OF THESE SUB DRAWINGS, PROJECT
PAGES ETC. ARE INCLUDED, BUT THE PATHS LEADING TO THESE SUB DRAWINGS ETC. ARE NOT INCLUDED AS DESCRIBED ABOVE.
WHEN YOU GENERATE A PROJECT, YOU MUST THEREFORE HAVE CREATED
AN ALIAS FOR EACH OF THE FOLDERS, WHICH YOU NEED TO FETCH SUB
DRAWINGS ETC. FROM, IN ORDER TO GENERATE THE PROJECT.
OTHERWISE, THE PROJECT WILL NOT BE GENERATED CORRECTLY!

Updating lists automatically when using drawing templates


Select Update lists after generation when you wish to have the project lists
updated automatically after generating/updating a project.

Automation
Page 17

Generate and Update projects automatically

This is the same as executing the command Lists => Update all lists after the
project is generated.
Automatic update of graphical lists
Select Update graphical plans after generation when you wish to update the
graphical lists in the project automatically after generating/updating a project.
DRAWING TEMPLATES FOR GRAPHICAL PLANS
IT IS RECOMMENDED TO CREATE DRAWING TEMPLATE PAGES FOR EACH
INDIVIDUAL TYPE OF GRAPHICAL PLANS, THAT YOU USE.
YOU CAN CREATE A DRAWING TEMPLATE BASED ON AN EXISTING GRAPHICAL
PLAN, AND THEN PLACE IT UNDER THE SUBDRAWINGS TAB IN THE
EXPLORER WINDOW. THE DRAWING TEMPLATE ONLY NEEDS TO CONTAIN A
SINGLE PAGE, AND IT IS IMPORTANT THAT YOU KEEP THE FIRST PAGE FROM
THE ORIGINAL GRAPHICAL PLAN. THIS IS BECAUSE THE FIRST PAGE CONTAINS THE PLAN SETTINGS INFORMATION.
WHEN YOU DRAG A SUCH DRAWING TEMPLATE FOR A GRAPHICAL PLAN INTO
A PROJECT, THE GRAPHICAL PLAN SETTINGS ARE AUTOMATICALLY
INCLUDED.

Updating component data automatically when using drawing templates


Select Update component data from database after generation to update component data automatically after generating/updating a project.
This causes that for instance the type descriptions matches the article number
without including the type descriptions in the project definition file.
Auto name symbols during generation
If you choose Auto name symbols during generation, the symbols are named
automatically in the generated project. If you choose this option, you will therefore
not have to specify symbol names in the project definition file.
See Current path numbers Or Automatically generated names on page 30.
See also Project generation with no symbol names in the project definition file
on page 39.
Add page reference designation to symbols in subdrawings
This only applies for generating projects: If you choose Add page reference designation to symbols in subdrawings, symbols with no function and/or location
aspect in the reference designation are automatically assigned these from the
page, on which the subdrawing is placed when generating the project.
If a symbol has the name -Q1, and the page reference designation is =G1+A2, the
symbol will get the reference designation =G1+A2-Q1, if you have chosen Add
page reference designation to symbols in subdrawings. If not, the symbol
will just keep the name -Q1.
If a symbol in a subdrawing has a location and/or a function aspect attached, the
reference designation will not be changed, even though you have chosen Add
page reference designation to symbols in subdrawings.

Automation
Page 18

Generate and Update projects automatically

PLC synchronization
When you in the project generation use pages from different projects, where pages
with PLC symbols comes from one project, and pages with PLC reference symbols
comes from another, Automation can not determine how to synchronize the PLC
symbols and the PLC reference symbols.
Below PLC synchronization you have the following options:
- None: No synchronization is made.
- PLC reference >> PLC: Data is transferred from the PLC reference symbols to
the PLC symbols. This is equal to executing the command Functions => Special Functions => Transfer data from PLC reference symbols to PLC symbols after generating the project.
- PLC reference << PLC: Data is transferred from the PLC symbols to the PLC
reference symbols. This is equal to executing the command Functions =>
Special Functions => Transfer data from PLC symbols to PLC reference
symbols after generating the project.
Invisible nonreferenced Cables and Signals
When you create a project by applying sub drawings or project pages, where one
end of a cable is illustrated on one page, and the other end is illustrated on another
page, it may occur that one end of a cable is not applied in a project. When the
cable connection points have With reference activated, nonreferred cables will
occur. The same phenomenon can be observed for signals.
These cables and signals can be set invisible by selecting Unreferenced cables
and Unreferenced signals respectively. This is equal to executing the command
Functions => Special Functions => Set unreferenced cable symbols invisible
and Functions => Special Functions => Set unreferenced signal symbols
invisible after generating the project.

Automation
Page 19

Generate and Update projects automatically

The Project definition file tab


In the Project definition file tab it is specified which information is included when
the project definition file is created:

Include Project data


When you select Include project data, the applied Project data datafields are
included in the project definition file.
Include reference designations
When you select Include reference designations, the project reference designations are included in the project definition file.
Creating column headings in project definition files
When you want Automation to create column headings describing the variables in
the generated project definition file, you have two options:
- Choose Names of variables to insert variable names (@1, @2, @3 ...) as column headings.
- Choose Text types of variables to insert the variable text types (s.name,
c.function ...) as column headings.
Please note, that it is possible to select both, so that you get two heading rows.
Project generator options in the project definition file
The settings you specify in the Options for project generator dialog box, can be
included in the project definition file.

Automation
Page 20

Generate and Update projects automatically

INCLUDE FOLDERS WITH SUBDRAWINGS/DRAWING TEMPLATES

When you select Include folders with subdrawings/drawing templates, the folders with sub drawings / drawing templates, which you have specified in the Generate/update project tab, are saved in the project definition file.
See the syntax for how the information is saved in the project definition file in
Syntax for project definition files on page 27.
INCLUDE SETTINGS FOR PROJECT GENERATION

When you select Include settings for project generation, the settings you have
specified under Options for project generation in the Generate/update project
tab, are saved in the project definition file.
See the syntax for how the information is saved in the project definition file in
Syntax for project definition files on page 27.
The File format tab
In the File format tab, you specify the file format for the project definition file:

Format for comma separated files


For comma separated files you can specify Delimiter character and Quote character at the bottom of the dialog box.

Automation
Page 21

Generate and Update projects automatically

GENERATE

PROJECTS BASED ON

PROJECT

DEFINITION FILES

Project definition files can be generated based on an existing Automation project


see Generating Project definition files from Automation on page 13 or be
created directly in e.g. Excel see Syntax for project definition files on page 27.
To generate a project, or to update the active project based on an existing project
definition file in e.g. Excel format, do the following:
1) Choose Tools => Project generator.

2) In the dialog box Project generator: Click on Options and check whether
the setup is correct for the project generation. See On automatic project generation on page 9 and Settings for the Project Generator on
page 15.
3) In the dialog box Project generator: Click on Generate new project when
you wish to generate a new project, or click on Update the active project
when you wish to update the active project.
4) Click on the Browse button, select the project definition file in the dialog box
Open, and click Open.
See the project definition file
5) In the dialog box Project generator:
If you wish to see the contents of the
file, click on the Display in Excel button, and Excel is opened if Excel
is installed on your PC and the
contents of the selected file is displayed. Here you can make changes
in the project definition file before
generating the project. (Please
remember to save the project definition file before returning to
Automation).
6) In the dialog box Project generator: Click OK, and the project is updated/
generated based on the project definition file.

Automation
Page 22

Generate and Update projects automatically

The dialog box Generate new project


7) You now enter the dialog box Generate new project (if you chose Update
the active project you enter the dialog box Update the active project
see The dialog box Update the active project on page 24):

In the left-hand side of the Generate new project dialog box, you can see
the project definition file, and in the right-hand side you can see the project
pages and variable values, which will be inserted in the automatically generated project.
If you double-click on a row in the dialog box, the project definition file is
opened in Excel, where the row you clicked on is selected.
If you make changes in the project definition file in Excel, before generating
the project, please remember to save the Excel file before returning to
Automation.
8) Click on Generate, and the project is generated.
Please also see The dialog box Update the active project on page 24.
Editing text fields with variables after generating projects
When you wish to edit text fields with variables after generating a project, you can
also do this by choosing Edit => Variables, when you subsequently work with the
project in Automation. See "Editing variables for inserted sub drawings" i
PC|SCHEMATIC Automation manualen.
You can also change data in the generated project, just like when working with any
other Automation project.

Automation
Page 23

Generate and Update projects automatically

The dialog box Update the active project


If you in the Project generator choose Update the active project and click OK,
you enter the dialog box Update the active project:

Here you have the same options as described in The dialog box Generate new
project on page 23.
New values displayed as blue text
Beyond this, you can see the present values of the variables in the project, and the
values these variables will be assigned by generating the project again.
New values are displayed as blue text.
Mismatch and syntax errors displayed as red text
If there is a mismatch between the project and the project definition file e.g. if
the project definition file does not contain enough variables the mismatch is
pointed out in red writing.
Syntax errors in the project definition file are also written in red.

Automation
Page 24

Syntax for Project definition files


This section describes the syntax for project
definition files.
Please note the appendix Structure for Project
definition files on page 53 and the appendix
Variables on page 51.

Syntax for project definition files

SYNTAX FOR PROJECT DEFINITION FILES


To make it possible for Automation to interpret the contents of a project definition
file see On Project definition files on page 12 , the contents of this file must
follow the syntax described below.
This syntax is automatically followed when project definition files are created
directly from Automation see Generating Project definition files from Automation on page 13.

THIS CHAPTER DESCRIBES


WHAT CAN BE CONTROLLED VIA THE PROJECT DEFINITION FILE ..................... P. 27
THE STRUCTURE AND CONTENTS OF PROJECT DEFINITION FILES ................... P. 28
SYNTAX FOR PROJECT TITLE AND PROJECT DATA ......................................... P. 32
SYNTAX FOR REFERENCE DESIGNATIONS ..................................................... P. 32
SPECIFYING DRAWING TEMPLATES AND SUB DRAWINGS................................ P. 34
CONTROLLING TEXTS IN DRAWING TEMPLATES AND SUB DRAWINGS ............... P. 35
FRONT PAGES, DIVIDERS AND LISTS ............................................................ P. 40
COMMENTS IN PROJECT DEFINITION FILES .................................................... P. 40
INSERTING NEW PAGES WHEN UPDATING PROJECTS ..................................... P. 40
COMMA SEPARATED FILES AND AUTOMATIC PROJECT GENERATION ............... P. 41

WHAT

CAN BE CONTROLLED VIA THE

PROJECT

DEFINITION FILE

The chapter Generate and Update projects automatically on page 9 describes


how to create Automation projects based on a project definition file. This file contains all necessary information for generating a project automatically.
In this file you can for instance specify:
- Project data and Project title
- Reference designations for projects
- The name of a project with front pages, declarations, project tables of contents
etc., which your company for instance use when creating projects
- Names on the Automation projects containing ready made diagram pages,
which shall be part of the project e.g. projects containing circuit diagrams for
relays, and projects containing circuit diagrams for PLCs
- Drawing template pages, prepared for inserting sub drawings
- Sub drawings to insert automatically on the drawing templates see "Sub
drawings" i PC|SCHEMATIC Automation manualen and Generate and Update
projects automatically on page 9
- Information on which data values to assign to the sub drawings, such as article
numbers see Controlling texts in drawing templates / sub drawings on
page 35
- The name of a list project, e.g. containing all of the list types, that your company
normally use for projects

Automation
Page 27

Syntax for project definition files

... and much more, which is described in the following.


CREATE AN ALIAS FOR EACH APPLIED FOLDER
IN ORDER TO BE ABLE TO GENERATE A PROJECT CORRECTLY FROM THE
PROJECT DEFINITION FILE, YOU MUST HAVE CREATED AN ALIAS FOR EACH
FOLDER FROM WHICH YOU FETCH PROJECT FILES, DRAWING TEMPLATES
AND SUBDRAWINGS WHEN GENERATING THE PROJECT.
PLEASE ALSO SEE WHAT IS AN ALIAS? ON PAGE 17 AND WHEN USING
DRAGN DRAW: KEEP TRACK OF THE FOLDERS ON PAGE 13.

THE STRUCTURE

AND

CONTENTS

OF PROJECT DEFINITION FILES

A project definition file can contain up to three different sections (please see the
figure in Project definition file example on page 29):
1. FOLDERS: Specifying applied folders / Aliases
This section is optional. The section is applied to specify in the project definition
file from which folders to fetch files, drawing templates and sub drawings when
generating the project.
This is done by creating a so-called alias for each of these folders. A such alias
consists of an alias name, and a path, that specifies the exact location of a folder.
See also What is an Alias? on page 17.
To create aliases in the project definition file, write FOLDERS in the field A1 in the
Excel spreadsheet containing the project definition file. In the field A2 you type in
the name of the first alias, and in the field B2 you type in the folder (including the
complete path), from which sub drawaings etc. are to be fetched. In the fields A3
and B3 you specify the next alias etc.
Aliases/Folders can also be specified in the Project generator dialog box
When you generate projects, you must specify at least one alias, from which sub
drawings, drawing templates and other project files must be fetched when generating the project. However, you have two options for specifying this information:
- When you specify the aliases in the project definition file, the sub drawings,
drawing templates and other project files will be fetched from these folders.
- If you do not write this information in the project definition file, you must specify
the aliases in the Project generator dialog box in Automation see Generate projects based on Project definition files on page 22.
When aliases are specified both in the Project generator dialog box and in the
project definition file, Automation first examine the aliases specified in the Project
generator dialog box, and then examine the aliases specified in the project definition file.
CAN ALSO CONTAIN THE PROJECT GENERATOR SETTINGS
THE FIRST PART OF THE PROJECT DEFINITION FILE CAN ALSO CONTAIN THE
SETTINGS FROM THE DIALOG BOX OPTIONS FOR PROJECT GENERATOR.
SEE THE PROJECT DEFINITION FILE TAB ON PAGE 20.
Automation
Page 28

Syntax for project definition files

2. PCSCHEMATIC DATA: Project data and Reference designations


This section is optional. The section can be used to include Project data and/or reference designations in the project definition file.
To include this section, you must write PCSCHEMATIC DATA at the top of column
A (below FOLDERS, if this option is applied see FOLDERS: Specifying applied
folders / Aliases on page 28) to tell that the lines below specifies general data
for the generated project.
See Project title and Project data in Project generation on page 32 and Reference designations in Project generation on page 32.
3. PCSCHEMATIC PAGES: Files, Drawing templates, Sub drawings etc.
If you have specified Project data or reference designations at the top of the project
definition file, you must write PCSCHEMATIC PAGES in column A to specify that
the consecutive rows in the project definition file contains names on drawing templates, sub drawings and other project files. See the figure in Project definition
file example on page 29.
Read more about this in Specifying Drawing templates and Sub drawings on
page 34, Controlling texts in drawing templates / sub drawings on page 35 and
Front pages, Dividers and Lists in Aut. generated projects on page 40.
ALIASES RELATIVE TO OTHER ALIASES
WHEN YOU SPECIFY THE PATH TO THE FOLDER, WHICH AN ALIAS POINTS AT,
YOU CAN ALSO START BY SPECIFYING ANOTHER ALIAS BETWEEN TWO %
CHARACTERS, AND THEN WRITE THE SUBSEQUENT PATH:
FOLDERS
ALIAS1
C:\PCS\SUBDRAWINGS
ALIAS2
%ALIAS1%\CUSTOMER14
IN THE PROJECT DEFINITION FILE YOU CAN BOTH REFER TO ALIASES SPECIFIED IN THE PROJECT GENERATOR DIALOG BOX, AND TO ALIASES SPECIFIED
ABOVE THE RELEVANT ALIAS IN THE PROJECT DEFINITION FILE. (IN THE
EXAMPLE ABOVE, ALIAS2 CAN THEREFORE BE RELATIVE TO ALIAS1 BUT
NOT THE OTHER WAY AROUND).
YOU CAN ALSO APPLY RELATIVE ALIASES IN THE PROJECT GENERATOR
DIALOG BOX, BUT YOU CAN NOT REFER TO ALIASES IN A PROJECT DEFINITION FILE FROM THERE.

Project definition file example


A project definition file could for instance look like this:

Automation
Page 29

Syntax for project definition files

1)

Specification of
Aliases (optional)

2)
Specification of Project
title and Project data
(optional)
Specification of reference
designations (optional)

3)
Specification of 1-page
projects and page names
Specification of drawing
template page
The sub drawings to insert on the drawing template (see below for info
on variables)
Specification of project
(containing list pages)
Please note that the use of variables in project definition files is displayed in
detail in Controlling texts in drawing templates / sub drawings on page 35.
See also the appendices Structure for Project definition files on page 53 and
Variables on page 51.
The significance of the first project page in the project definition
file
Some project settings are fetched from the first project page / the first project in the
project definition file. This is the case for:
Current path numbers Or Automatically generated names
If the first page or the first project in the project definition file uses a symbol
name format containing current path numbers, this format is applied in all of the
generated project. If this is not the case, automatic numbering of symbols with consecutive names are applied.
However, the symbol naming is only changed if you in Tools => Project Generator => Options have selected Auto name symbols during generation. If this is
not the case, the names will be fetched from the project definition file during the
automatic project generation if no names are specified in the project definition
file, no changes are made.
Automation
Page 30

Syntax for project definition files

See Settings for the Project Generator on page 15, Auto name symbols during generation on page 18 in particular.
Text visibility
The general settings for which texts are visible in the generated project is determined by the first project or by the first 1-page project in the list of projects in
the project definition file.
Information not necessarily specified in the project definition file
Other information can be specified in the project definition file, but does not necessarily have to be specified there. If these types of information are not specified in
the project definition file, the information is fetched from the first page / project
occurring in the project definition file.
This is the case for:
- Project title and Project data see Project title and Project data in Project
generation on page 32
- Reference designations see Reference designations in Project generation
on page 32

Automation
Page 31

Syntax for project definition files

PROJECT

TITLE AND

PROJECT

DATA IN

PROJECT

GENERATION

When you create Automation projects via a project definition file, you can specify
project title and Project data at the top of the project definition file in Excel.
This is done by writing PCSCHEMATIC DATA at the top of column A (below FOLDERS, if this option is applied see FOLDERS: Specifying applied folders / Aliases on page 28) in the file to tell that the lines below specifies the general data
for the created project.
Below this write ProjectData in column A, also.
If you wish to specify a project title, write Title below this in column A, and write the
project title next to this in column B.
If you wish to specify Project data, you can write the names of the Project data
datafields in column A, and their contents in column B.

Also see the figure in Project definition file example on page 29 and The significance of the first project page in the project definition file on page 30.

REFERENCE

DESIGNATIONS IN

PROJECT

GENERATION

In automatic project generation you can specify the reference designations for the
project at the top of the project definition file.
If you have not written PCSCHEMATIC DATA at the top of column A (below FOLDERS, if this option is applied see FOLDERS: Specifying applied folders / Aliases on page 28) in the project definition file, you must do this see Project title
and Project data in Project generation on page 32.
Below this write Reference Designations in column A.
Below this write FUNCTION in column A.
Below this write the names of the function aspects for the project in column A, and
their attached descriptions in column B.
Below this write LOCATION in column A.
Below this write the names of the location aspects for the project in column A, and
their attached descriptions in column B.

Also refer to the figure in Project definition file example on page 29 and The
significance of the first project page in the project definition file on page 30.

Automation
Page 32

Syntax for project definition files

Reference designations in the individual projects when generating projects


If there exists reference designations in the different projects / project pages, these
will also become a part of the generated project.
If the same reference designations exists in more than one project, and these reference designations have different attached descriptions, the descriptions for the
first project / project page, in which they occur, will be attached to the generated
project.
Reference designations in applied sub drawings when generation projects
When Automation via applied sub drawings (see Generate and Update projects
automatically on page 9) meets reference designations, which have not been created in the project, these reference designations will be created in the generated
project.
Because sub drawings can not contain descriptions for reference designations,
these reference designations will have no descriptions in the generated project.
Please note that the program will issue no warning about this.
Controlling reference designations for individual pages
See "Sub drawings" i PC|SCHEMATIC Automation manualen, "Variables for
Page title and Page data" in particular.

Automation
Page 33

Syntax for project definition files

SPECIFYING DRAWING

TEMPLATES AND

SUB

DRAWINGS

The first project information you must specify, is the name of the drawing template,
which must be placed in column A (in the column with the heading TEMPLATE).
After this you write the name of the drawing template in column B. When you do
not write anything in column B, it is assigned the next available page name.
Under this in column A you place the names of the sub drawings, which shall
be placed on the specified drawing template. In column B you write the character
~, which tells the program that this is a sub drawing. If there is no ~ character, the
program knows it is a drawing template.
When more than one project page with the specified drawing template is required,
these are inserted automatically see "Sub drawings" i PC|SCHEMATIC Automation manualen, "Insertion points and automatic project generation" in particular.
When you need a drawing template or a sub drawing from another folder than the
one that is specified in the Options dialog box see Settings for the Project Generator on page 15 (or under FOLDERS in the project definition file, see FOLDERS: Specifying applied folders / Aliases on page 28), you must type in the path
to this folder in front of the drawing template or the sub drawing.
This column
contains names
of drawing templates
and sub drawings

Name of drawing template


Name of sub drawing

This column contains page names

Page name
Marks that this is
a sub drawing

MERGE WHEN MERGING PROJECTS


IN STEAD OF TEMPLATE YOU CAN ALSO WRITE MERGE IN THE PROJECT
DEFINITION FILE. THIS IS USED FOR MERGING PROJECTS VIA THE PROJECT
GENERATOR. SEE KEEPING THE ORIGINAL PAGE NUMBERS WHEN MERGING PROJECTS ON PAGE 47.

Automation
Page 34

Syntax for project definition files

CONTROLLING

TEXTS IN DRAWING TEMPLATES

SUB DRAWINGS

In the automatic project generation you can control all texts and names in the project. This chapter describes how to control the texts in drawing templates and sub
drawings.
To be able to control the texts in a sub drawing or a drawing template via the project definition file, this requires that variable markers have been inserted, and that a
variable list have subsequently been created for the sub drawings / drawing templates see "Sub drawings", and in particular "Creating a variable list for a sub
drawing / drawing template" i PC|SCHEMATIC Automation manualen.

THIS CHAPTER DESCRIBES


VARIABLES IN THE PROJECT DEFINITION FILE ................................................. P. 35
EXAMPLE ON A PROJECT DEFINITION FILE ..................................................... P. 37
INVISIBLE SYMBOLS IN SUB DRAWINGS .......................................................... P. 39
PROJECT GENERATION WITH NO SYMBOL NAMES SPECIFIED .......................... P. 39
VARIABLE VALUES IN VALUE STRINGS............................................................ P. 39

Variables in the project definition file


In the columns immediately after the drawing template / sub drawing typically in
column C the values for the variables on the drawing template / sub drawing are
specified. See "Inserting variables in Sub drawings, Pages and Projects" i
PC|SCHEMATIC Automation manualen.

The text for variable @1 for e.g. a


sub drawing is placed in the first text
column (C) in the project definition file.
The text for variable @2 is placed in
the second text column (D) - etc.

Sub drawing (or


drawing template)

When the variables in the sub drawing


are inserted in the project definition file

In the project definition file you must write the name of the sub drawing for each
time the sub drawing shall be placed, followed by the variable values for this specific sub drawing.

Automation
Page 35

Syntax for project definition files

When the project is generated, the values of the variables are fetched from the project definition file, the values are inserted in the sub drawing, and the sub drawing
is inserted in the project.
The sub drawing is inserted in the drawing template, and
the variable values from the project definition file are inserted.
Variables can also be inserted in drawing templates.

Sub drawing
(Variables /@1
and /@2)

Part of project
definition file
(Variable /@1 and
variable /@2)

Generated project
(Variable values inserted)

See also the figure below Example on project definition file with drawing templates and sub drawings on page 37.
SEE APPENDICES FOR VARIABLES AND PROJECT GENERATION
PLEASE NOTE THE APPENDIX VARIABLES ON PAGE 51 AND THE APPENDIX
STRUCTURE FOR PROJECT DEFINITION FILES ON PAGE 53.

Automation
Page 36

Syntax for project definition files

Example on project definition file with drawing templates and


sub drawings
A project definition file specifying drawing templates and sub drawings, could for
instance look like this:
Drawing template L1L2L3DEMO with page name 1

The sub drawing MOTORDEMO1


- with the variable values @1 (-Q1) to @5 (-M1)
The sub drawing is inserted (here: 6 times) on the
last mentioned drawing template (here: L1L2L3DEMO)
Please note that automatic naming during project generation is not applied in
the figure above, because the symbol names are controlled directly from the project definition file.
Naming connectionpoints in the project definition file
When you wish to specify connection names for a symbol, you just write : (colon)
after the symbol name in the project definition file, followed by the connection
name.
Example: If the name of a terminal is specified as -X1:1 in the project definition file,
the symbol gets the name -X1, and the connection name is set to 1.
For symbols with more than one connection name, the connection names are separated by commas.
Example: If the name of a symbol with three connectionpoints is specified as
-M1:U,V,W in the project definition file, the symbol is assigned the name -M1 and
the connection names are set to U, V and W respectively.

Automation
Page 37

Syntax for project definition files

Create model variable


For use in automatic project generation, you can create a so-called model variable,
so that you from the project definition file can specify which of the models for a subdrawing, that you wish to insert.
To create a model for a subdrawing, do this:
1) In the Subdrawings window: Right-click on the subdrawing, and choose
Edit.
2) Right-click on the page and select Variables.
3) In the dialog box Variables: Right-click and select Model variable.
4) Type in an unused variable name, and click OK:

5) The name of the model variable is then displayed in the title bar of the dialog
box Variables:

6) In the project definition file you then only have to specify the Model title for
the desired model in the subdrawing. You do this in the Model variable field
(here: /@10). Hereby the values for the other variables for the subdrawing
are fetched automatically from the model data in the subdrawing definition. (If
you just write 55 kW in the figure below, the model 55 kW 40 - 100 A will be
inserted. This is because Automation selects the first model title that
matches the text you write in the model variable field).
Variable independant of model selection
As described above see Create model variable on page 38 , it is possible to
specify in the project definition file that a subdrawing gets its variable values from
one of the created models for the subdrawing.
In the definition of a subdrawing, it is also possible to specify that the contents/
value of a variable in a model is fetched from the project definition file.
To do this, write /? in the first model for a variable (here: for the variable /@6) in the
dialog box Variables:

Automation
Page 38

Syntax for project definition files

This specifies that all models in the subdrawing fetches the value for this variable
from the project definition file.
Invisible symbols in sub drawings
If a symbol and its connecting lines shall be invisible, you must set the variable for
the symbol name to ! in the project definition file.
If the connecting lines are cable wires, and you wish to stop the invisibility at the
cable symbol, you must set the variable for the symbol name to !C in the project
definition file.
Project generation with no symbol names in the project definition file
If you do not wish to specify a symbol name from the project definition file and a
variable marker has been created for the symbol in the sub drawing , you must
set the variable for the symbol name to the value ? in the project definition file.
If Auto name symbols during generation is not selected, the symbol will then be
assigned the name specified in the original sub drawing.
Variable values in Value strings in Project generation
Variable markers in sub drawings / drawing templates / project pages can be
indexed, so that they can fetch values from a comma separated value string in the
project definition file.
For instance will /@1[2] (on the project page / sub drawing) fetch the second value
from e.g. the value string Brown, Black, Blue (from the project definition file).
Without the index, the variable /@1 would be assigned the value Brown, Black,
Blue. With the index it gets the value Black see below:
Example for Cables
In project definition file:
/@1 = Brown, Black, Blue

Gets the value: Brown


Gets the value: Black
Gets the value: Blue
... in project generation

Example for Terminals


In project definition file:
/@5 = 1U2, 1V2, 1W2

Gets the value: 1U2


Gets the value: 1V2
Gets the value: 1W2
... in project generation

Automation
Page 39

Syntax for project definition files

Fetching multiple values simultaneously from the value string


A variable can contain more than one index number, so that multiple values can be
fetched from the string.
For instance will /@1[1,3] fetch the value Brown, Blue. When multiple values are
selected in a string, the values are separated by a comma.

FRONT

PAGES,

DIVIDERS

AND

LISTS

IN

AUT.

GENERATED PROJECTS

When you wish to insert pages, which does not use the intelligence from the project definition file, you just write the name of the page in a line in the project definition file.
The name of the project / drawing template is written in column A, and the name of
the page can be specified in column B.
These projects / drawing templates could for instance include front pages, dividers
or pages containing lists.

COMMENTS

IN THE PROJECT DEFINITION FILE

To place comments in the project definition file, you just have to let the first field in
a row be empty. Please note, that this is only possible below the code word TEMPLATE in the project definition file.
In the figure in Example on project definition file with drawing templates and sub
drawings on page 37, the lines with the texts S.Name and S.Func are comments,
just like the blank line is a comment line. Comment lines can be inserted anywhere
you want in the file.

INSERTING

NEW PAGES WHEN

UPDATING

EXISTING PROJECTS

When you wish to insert new pages when updating existing projects, you can specify this in the TEMPLATE column.
Here you write NEWPAGES>> before the list of new pages, type in the new pages,
and write <<NEWPAGES after the inserted pages.
Example:
... Existing pages ...
NEWPAGES>>
... New pages ...
... New pages ...
<<NEWPAGES
... Existing pages ...
REMEMBER TO DELETE NEWPAGES
PLEASE REMEMBER TO DELETE THE NEWPAGE TEXTS FROM THE PROJECT
DEFINITION FILE, IN CASE YOU AT A LATER STAGE WISH TO GENERATE THE
PROJECT BASED ON THE PROJECT DEFINITION FILE ONCE AGAIN.

Automation
Page 40

Syntax for project definition files

COMMA

SEPARATED FILES FOR AUTOMATIC PROJECT GENERATION

You can also use comma separated files for automatic generation of Automation
projects. These can for instance be generated directly from a company database.
Using comma separated files can be done similar to using Excel files. Here you
just have to select a comma separated file (*.csv) in stead of an Excel file in the
description Generate projects based on Project definition files on page 22.
The syntax for the comma separated files is the same as described in Syntax for
project definition files on page 27.
Remember to specify the settings for the comma separated file as described in
Settings for the Project Generator on page 15.

Automation
Page 41

Syntax for project definition files

Automation
Page 42

Merging Projects
This section describes how to merge PC|SCHEMATIC Automation projects via the Project generator.
Please note the appendix Structure for Project
definition files on page 53.

Merging projects via the Project generator

MERGING PROJECTS VIA THE PROJECT GENERATOR


In Automation it is also possible to use the Project generator for merging projects.

THIS CHAPTER DESCRIBES


BENEFITS OF MERGING PROJECTS ............................................................... P. 45
HOW TO MERGE PROJECTS .......................................................................... P. 46
KEEPING THE ORIGINAL PAGE NUMBERS ....................................................... P. 47

BENEFITS

OF MERGING PROJECTS

When you merge projects via the Project generator, it is possible to let more than
one employee work on the same project at the same time.
When you, as the constructor of a part of the project, need to know exactly how far
the other constructors have come with their parts of the project or e.g. need to
know how another constructor has named a specific component , you can create
the full project via the Project generator. When this project is generated, this is
done based on the last saved version of each constructors part of the project. Any
of the constructors will at any time be able to generate the full project, as described
in How to merge projects on page 46.
This makes it possible for each constructor to work on much smaller project files.
Naming when merging projects
When merging Automation projects via the Project generator, the program does
not rename symbols, which appears with the same name in the different projects.
However, this is not the case if you have selected Auto name symbols during
generation under Options in the Project generator see Auto name symbols
during generation on page 18.
When merging projects it is required that the constructors agrees on a convention
for naming the symbols in the project. For instance by assigning different series
of numbers to the different constructors, or by using reference designations.
See "Reference designations" i PC|SCHEMATIC Automation manualen.

Automation
Page 45

Merging projects via the Project generator

HOW

TO MERGE PROJECTS

A simple example on how e.g. four project files can be merged via Excel:
1) Save the four project files e.g. the project files frontpages.pro,
relays.pro, plcs.pro and lists.pro in the same folder. (You can also fetch
the files from different folders see FOLDERS: Specifying applied folders /
Aliases on page 28).
2) Open the program Microsoft Excel, and create an Excel file (the project definition file) with the following contents:
- Write FOLDERS at the top of column A, and specify the path to the folder
in the next line
- In the row below: Write TEMPLATE in column A and PAGE in column B
- Below this the project names are written on separate lines in column A
according to the order in which you want the project files to be merged:

3) Save the Excel file in the same folder as the project files.
4) In Automation: Choose Tools => Project Generator:

Click here

Choose Excel file

Click here to edit


the Excel file

Change
settings

5) Click on Generate new project from project definition file, choose the
Excel document at the bottom of the dialog box below Project definition file,
and click OK. (If you wish to change settings, click on Options see Settings for the Project Generator on page 15).
6) The project files are merged in a new project, with the same name as the
Excel file.

Automation
Page 46

Merging projects via the Project generator

7) If you wish to update the lists in the project, choose Lists => Update all
lists. (This can be done automatically see Settings for the Project Generator on page 15).
OTHER OPTIONS WHEN MERGING PROJECT FILES:
PROJECT TITLE AND PROJECT DATA IN PROJECT GENERATION ON
PAGE 32
REFERENCE DESIGNATIONS IN PROJECT GENERATION ON PAGE 32
GENERATE AND UPDATE PROJECTS AUTOMATICALLY ON PAGE 9

Specifying page number start when merging


When merging projects, you can use the PAGE column to specify the start page
number for the individual projects, as displayed below.

Otherwise, the pages will be numbered consecutively see also Keeping the
original page numbers for individual projects on page 47.
Keeping the original page numbers for individual projects
If you wish to keep the page number for a specific project, you type in the text
#REMAIN in the PAGE column. The page number(s) which the project is created
with, are hereby transferred unchanged to the automatically generated project.

KEEPING

THE ORIGINAL PAGE NUMBERS WHEN MERGING PROJECTS

When you wish to keep the original page numbers from the project files (or drawing
templates) during automatic project generation, you can do this for all projects in
the project definition file, or for individual projects:
Keeping the original page numbers for all created project
pages
If you create a MERGE column in stead of a TEMPLATE column see Specifying Drawing templates and Sub drawings on page 34 , the page numbers
remains unchanged on all merged project pages.
Therefore you only need a project definition file / Excel file which only consists of
the following lines, which merges three projects to one new project:
MERGE
ProjectA
ProjectB
ProjectC
The page numbers from the three projects are then transferred unchanged to the
automatically generated project.
Automation
Page 47

Merging projects via the Project generator

Automation
Page 48

Appendices
Here you will find the following:
- Appendix of options for variables...................... p. 51
- Appendix for project def. file syntax .................p. 53
- An Index................................................................. p. 57

VARIABLES
Variable definition: /@n
n is a number between 1 and 64000. Variables containing small numbers will be processed faster than variables containing larger numbers. Therefore smaller
numbers are recommended in variables.

/@n

/@1

Variable 1

/@10

Variable 10

Normal variable: /@n


/@1

The variable has no default value. Fields in the project definition file, where the variable value will be typed in later, are
empty.

Variable with default value: xxxx/@n


3389110610000/@1
-P1/@3

3389110610000 is displayed in field in the project definition


file, where the variable value will be typed in later.
The variable has the default value P1.
The value that is typed in later, overwrites the default value.

Variable that inserts a value in a text: xxxx</@n>


-P</@3>
</@4> out
</@4> in

-P</@3>
-S</@3>

The text (name) has a fixed part (-P) and a variable part </
@3>
Can be applied with benefit where the same value shall be
inserted into texts, where the fixed part are different from text
to text. Here the values could for instance be Weighing in
one case, and Casting in another.
Can be applied where all or some names in a sub drawing always have the same serial number.
E.g. P1 and S1

Insertion with default value: xxxx<yyyy/@n>


-P<1/@3>
<Weighing/@4> out

The text (name) has a fixed part (-P) and a variable part </
@3>, which has the default value 1.
The variable has the default value Weighing.

Automation
Page 51

Indexed variables: /@n[i]

or /@n[i1,i2,i3,....]

/@4[1]

The variable takes the value from the first parameter in a


comma separated text.
E.g.: BK,BL,BU,GR The variable gets the value BK
E.g.: BK,BL,BU,GR The variable gets the value BL
E.g.: BK,BL,BU,GR The variable gets the value BL,BU

/@4[2]
/@4[2,3]

This function is very useful for cables.


Below this is shown with cable wire colors.
< BK,BL,BU,GR/@4[1]>
< BK,BL,BU,GR/@4[2]>
< BK,BL,BU,GR/@4[3]>
< BK,BL,BU,GR/@4[4]>

=> BK
=> BL
=> BU
=> GR

Possible control via variables in symbol names


/@1=-M1
/@1=!
/@1=!C
/@1=?

=> The symbol gets the name -M1


=> The symbol and connecting lines becomes invisible.
=> The symbol and connecting lines up to a cable symbol
becomes invisible.
=> The symbol name is not controlled from the variable.

Variables in reference frames


To insert a variable to control the reference designation in a reference frame:
1) Click on Texts
2) Double-click on the reference designation for the reference frame
3) In the dialog box Change text: Type in the name of the variable (e.g. /@3)
Variables in reference designations for pages
To insert a variable to control the reference designation for a page:
1) Right-click on the page and choose Page article data
2) In the dialog box Page article data: Type in the name of the variable (e.g.
/@7) in the Name field

Automation
Page 52

STRUCTURE

FOR

PROJECT

DEFINITION FILES

A project definition file consists of three parts, of which the first two are optional.
Part 1: Specifying aliases / applied folders (Optional)
The settings in this section, corresponds to the settings which can be set from the
dialog box Options for project generator, in the tab Generate/update project.
See The Generate/update project tab on page 16.
FOLDERS
Name for Alias 1
E.g.: FOLDER1

Path to the first folder to examine for drawing templates,


sub drawings and projects.
E.g.: C:\PCschematic\MySubDrawings

Name for Alias 2

Path to the second folder to examine for drawing templates, sub drawings and projects.

Name for Alias 3


(Relative to other alias)

E.g.: %FOLDER1%\SubDrawings
Can both be relative to aliases defined in the Project
generator dialog box, and to aliases defined on a previous line here in the project definition file.

...

...

GENERATOR OPTIONS
UpdateLists=yes

Options: yes / no

UpdateFromDB=yes

Options: yes / no

AutoNumSymbolNames=yes

Options: yes / no

PLCSync=FromPLCref

Options: none / FromPLCref / ToPLCref

MakeInvisibleUnrefSignals=yes

Options: yes / no

MakeInvisibleUnrefCables=yes

Options: yes / no

Automation
Page 53

Part 2: Specifying Project data and/or Reference designations


(Optional)
PCSCHEMATIC DATA

PROJECTDATA
Datafield from Project data

Value for datafield

Datafield from Project data

Value for datafield

...

...

REFERENCE DESIGNATIONS
FUNCTION
Function aspect

Description

Function aspect

Description

...

...

LOCATION
Location aspect

Description

Location aspect

Description

...

...

Automation
Page 54

Part 3: Specifying Drawing templates, Sub drawings and Projects


PCSCHEMATIC PAGES

TEMPLATE

PAGES

Multipage project

Page no. / Empty

Drawing template / Single-page


project

Page no. / Empty

@1

@2

...

Sub drawing

@1

@2

...

Project / Page

#REMAIN

When Updating projects


NEWPAGES>>
Multipage project

Page no. / Empty

Drawing template / Single-page


project

Page no. / Empty

@1

@2

...

Sub drawing

@1

@2

...

Project / Page

#REMAIN

<<NEWPAGES

When Merging projects


MERGE
Project 1
Project 2
Project 3
...
Project n

Automation
Page 55

Automation
Page 56

INDEX
A

Alias
specify in project definition file . . . . . . . . . 28
Automatic project generation
about . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Automatically generated names . . . . . . . . . . . 30

MERGE . . . . . . . . . . . . . . . . . . . . . . . . . . 47, 55
Merge projects . . . . . . . . . . . . . . . . . . . . . . . . 45
how to . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
naming when merging projects . . . . . . . . . 45
secifying page number start when merging 47

Cables
invisible, nonreferenced . . . . . . . . . . . . . . 19
Comma separated files . . . . . . . . . . . . . . . . . 41
Comments . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Create
projects via project def. file . . . . . . . . . . . . . 9
Create project def. file from active project . . . . 13
Current path numbers . . . . . . . . . . . . . . . . . . 30

NEWPAGES

D
Default vaule
for variable . . . . . . . . . . . . . . . . . . . . .
Dividers . . . . . . . . . . . . . . . . . . . . . . . . . . .
Drawing templates
create
for project generation

. . 51
. . 40

. . . . . . . . . . . . . . 10
. . . . . . . . . . . 34

specifying in project def. file

E
Edit =>
Variables . . . . . . . . . . . . . . . . . . . . . . . . .
Excel
create and update projects via . . . . . . . . .
syntax for project def. files . . . . . . . . . . . .

23
.9
27

F
Files
comma separated files
for automatic project generation

. . . . . . . 41
53
28
40
54

FOLDERS . . . . . . . . . . . . . . . . . . . . . . . . . . .
specifying aliases . . . . . . . . . . . . . . . . . .
Front pages . . . . . . . . . . . . . . . . . . . . . . . . . .
FUNCTION . . . . . . . . . . . . . . . . . . . . . . . 32,

G
Generate new project, dialog box

. . . . . . . . . . 23

Indexed variables . . . . . . . . . . . . . . . . . . . . .
Inserting new pages . . . . . . . . . . . . . . . . . . . .
Invisible
cables and signals . . . . . . . . . . . . . . . . . .

Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . .
LOCATION . . . . . . . . . . . . . . . . . . . . . . .

52
40
19

. . . 40
32, 54

. . . . . . . . . . . . . . . . . . . . . . 40, 55

P
Page numbers
keep . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
PAGES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
PCSCHEMATIC DATA . . . . . . . . . . . . . . . 32, 54
Project data and Reference designations . . 29
PCSCHEMATIC PAGES . . . . . . . . . . . . . . . . . 55
files, drawing templates, sub drawings etc. . 29
PLC
synchronization . . . . . . . . . . . . . . . . . . . . 19
PLC reference . . . . . . . . . . . . . . . . . . . . . . . . . . 19
PLC reference >> PLC . . . . . . . . . . . . . . . . . . 19
Project data, syntax . . . . . . . . . . . . . . . . . . . . 32
Project definition file
example with variables . . . . . . . . . . . . . . . 37
generate and update projects . . . . . . . . . . . 9
specify aliases . . . . . . . . . . . . . . . . . . . . . 28
Project definition files
about . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
appendix of syntax . . . . . . . . . . . . . . . . . . 53
comments . . . . . . . . . . . . . . . . . . . . . . . . 40
example . . . . . . . . . . . . . . . . . . . . . . . . . . 29
front pages, dividers and lists . . . . . . . . . . 40
generate from Automation . . . . . . . . . . . . . 13
generate projects based on . . . . . . . . . . . . 22
Project title and Project data . . . . . . . . . . . 32
reference designations . . . . . . . . . . . . . . . 32
significance of the first project page . . . . . . 30
structure and contents . . . . . . . . . . . . . . . 28
syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
the purpose of project def. files . . . . . . . . . 14
what can be controlled . . . . . . . . . . . . . . . 27
without symbol names . . . . . . . . . . . . . . . 39
Project generation
about . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
drawing templates . . . . . . . . . . . . . . . . . . 10
editing variables after generating project . . 23
model data in automatic project generation 12
paper size and Reference system . . . . . . . 10
points to consider . . . . . . . . . . . . . . . . . . . 10
sub drawings as Modules . . . . . . . . . . . . . 11
sub drawings based on existing projects . . 11
using variable . . . . . . . . . . . . . . . . . . . . . . 11
Project generator

Automation
Page 57

settings . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Project pages
the first page in project def. files . . . . . . . . 30
Project title, syntax . . . . . . . . . . . . . . . . . . . . . 32
PROJECTDATA . . . . . . . . . . . . . . . . . . . . . . . 54
Projects
create and update projects . . . . . . . . . . . . . 9
generate based on project def. files . . . . . . 22
merge . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

REFERENCE DESIGNATIONS . . . . . . . . . . . . 54
Reference designations
in individual projects . . . . . . . . . . . . . . . . . 33
syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
REMAIN . . . . . . . . . . . . . . . . . . . . . . . . . 47, 55

S
Signals
invisible, non referenced . . . . . . . . . . . . . . 19
Structure
of project definition files . . . . . . . . . . . . . . 28
Sub drawings
invisible symbols in . . . . . . . . . . . . . . . . . . 39
specifying in project def. file . . . . . . . . . . . 34
Symbol names
current path numbers / auto generated names

30

Symbols
without name in project def. file

. . . . . . . . . 39

TEMPLATE . . . . . . . . . . . . . . . . . . . . . . . 34, 55
Texts
in drawing templates / sub drawings . . . . . 35
visibility . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Tools =>
Project generator . . . . . . . . . . . . . . . . . . . 22
Project generator => . . . . . . . . . . . . . . . . . 13
Options

. . . . . . . . . . . . . . . . . . . . . . . . 15

U
Update projects
inserting new pages . . . . . . . . . . . . . . . . . 40
via project def. file . . . . . . . . . . . . . . . . . . . 9
Update the active project, dialog box . . . . . . . . 24

Value strings, for variables . . . . . . . . . . . . . . . 39


Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
in value strings . . . . . . . . . . . . . . . . . . . . . 39
indexed variables . . . . . . . . . . . . . . . . . . . 52
insertion with default value . . . . . . . . . . . . 51
normal variable . . . . . . . . . . . . . . . . . . . . . 51
possible control via var. in symbol names . . 52
that inserts a value in a text . . . . . . . . . . . . 51
with default value . . . . . . . . . . . . . . . . . . . 51

Automation
Page 58

You might also like