Perceptive Software Document Composition Studio Product Guide
Below you will find brief information for Document Composition Studio 6.0.x. This guide covers the user interface, administration, text blocks, dynamic charts, documents, bundles, reports, scripts and conditions, and more. It helps you create and manage documents, bundles, and other objects within the studio. Learn to utilize features like variable pools, attribute inheritance, and dynamic document generation.
Advertisement
Advertisement
Perceptive Document Composition
Studio Product Guide
Version: 6.0.x
Written by: Product Documentation, R&D
Date: August 2014
© 2014 Perceptive Software. All rights reserved.
Perceptive Software is a trademark of Lexmark International Technology S.A., registered in the U.S. and other countries. All other brands and product names mentioned in this document are trademarks or registered trademarks of their respective owners. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, or any other media embodiments now known or hereafter to become known without the prior written permission of Lexmark.
Table of Contents
1
2
3
4
5
6
7
User Interface
Overview
8
Editor Window
In the Editor window, you modify all objects in Composition Studio. It is possible to open numerous objects simultaneously. Each object opens in its own tab.
Main Menu
To access the main menu, click the four-colored
The main menu offers the following options.
icon in the top left-hand corner.
Menu item
New
Create New
Version
Description
Opens a submenu to select a new object to be created.
This menu item is only available when you have a versioning license installed.
For more information, refer to Create a new version
Reactivate
Version
Save
Save All
This menu item is only available when you have a versioning license installed.
For more information, refer to Show Object History
Saves the current object.
Saves all open objects.
Close Current
Object
Closes the current object.
Close All Objects Closes all open objects.
Print Preview
Enables you to print conditions, scripts and processes.
This menu item is available for conditions, scripts and processes and displays them in a print preview.
Clear Studio and
Runtime Cache
Debug Manager
If you modified an object, for example a document or a selection, and you test the modifications without saving the object first, a new compilation of the object will be created.
If you close the object without saving, the new compilation remains in the cache. So, if the object is executed again, it is the cached compilation that executes. In this case, you should use the function Clear Cache to execute the object in its original state.
The debug manager administrates scripts in the debug service. It allows you to remove them from the service.
9
Quick Access Toolbar
The quick access toolbar holds a number of buttons used to call frequently used functions.
Note You can use the menu to the right to hide or show these buttons.
Icon Menu item
Save
Description
Saves the current object.
Create New Version This menu item is only available when version control has been licensed accordingly.
For more information, refer to Create a new version.
Reactivate Version This menu item is only available when version control has been licensed accordingly.
For more information, refer to Reactivate an older version.
Close Current
Object
Closes the current object.
10
Navigator Pane
About the Navigator pane
The Navigator pane enables you to administrate all Composition Studio objects.
The Navigator pane contains the following tabs.
Display the Navigator pane
If the Navigator pane is not visible, complete the following step.
In the Studio tab, click the Navigator button.
About the Folder View tab
The upper pane of the Navigator shows the folder structure. The lower pane shows all objects of the folder selected in the upper pane.
Filter
About the Filter tab
In the Filter tab, you can locate objects with names containing a specified text pattern.
Use the filter
To use the filter, complete the following steps.
1. In the Navigator, click the Filter tab.
2. In the Filter tab, select one of the following options.
starts with Object names with the text pattern.
ends with Object names end with the text pattern.
contains Object names contain the text pattern.
3. In the input field, type your text pattern.
Note As you are typing, the filter result in the lower pane refreshes with each keystroke.
Search
About the Search tab
The Search tab enables you to perform a full-text search to locate objects that contain a specified text string.
Depending on database workload, changes of text block content or document text may be found after a delay caused by the update of the full-text database index.
Full-Text Search requires a specific index in your database system (SQL Full Text or Oracle Text). For more information, refer to the Perceptive Document Composition Advanced Design and Setup Guide and contact your database administrator.
The original release of the Oracle 10g database does not support full-text search in DOCX files. When using this database product, the full-text search in DOCX files related to text blocks and documents does not produce the expected results.
11
Perform a full-text search
To perform a full-text search, complete the following steps.
1. In the Navigator, click the Search tab. The objects matching your search display in the lower pane.
2. In the Search tab, select the object types you want the full-text search to regard.
Note Depending on the scanned object type, the search performs either fuzzy matching or exact matching.
Object type Search technique
Text Block Content Exact Matching
Document Text Exact Matching
Object Description Exact Matching
Version Identifier Fuzzy Matching
Script
Condition
Fuzzy Matching
Fuzzy Matching
Example
If you choose "future" as your search string, the search only detects the occurrence of the exact string "future" in text blocks and documents.
In object descriptions, scripts, and conditions, the search also finds additional word forms like
"futures", as the search bases on fuzzy matching.
3. In the Search for box, type your search string and click the Search button.
Note The search does not support the use of wildcard characters.
Navigator Toolbar
About the Navigator toolbar
The Navigator toolbar offers various functions.
Display objects on multiple pages
By default, all objects in the Navigator display on one page.
To display objects on a number of pages, complete the following steps.
1. In the top-left corner, click the main menu right.
icon and click the Options button in the bottom
2. In the Options dialog box, in the left pane, click General Settings.
3. In the right pane, select the Activate paging for the Navigator check box.
4. In the Page Size box, type the number of objects to display on one page and click OK.
5. To page through the objects, on the Navigator toolbar, click the Previous Page button or the
Next Page button.
Refresh
12
To go back to the standard view, for example after executing the function Is Used By or after displaying
locked objects , complete the following step.
On the Navigator Toolbar, click the Refresh button.
Show filterlist
To use the filter list function, complete the following steps.
1. On the Navigator toolbar, click the Show Filterlist button.
2. In the Filter Settings dialog box, select the object types you want to display in the Navigator pane and click OK.
Last View
If you have just used the function Is Used By and have returned to the standard view, you can use this function to display the result of Is Used By again.
To display the result of Is Used By again, complete the following step.
On the Navigator Toolbar, click the Last View button.
Import objects
This function enables you to import existing DOCX files as documents or text blocks.
To import DOCX files, complete the following steps.
1. On the Navigator toolbar, click the Import Objects button.
2. In the Import Objects dialog box, complete of the following substeps.
1. Select one of the following options as target object type.
Text Block
Document
For documents as target object type, select one of the following document types.
Dynamic Word Document
Static Word Document
Optional. If you use the function from a subfolder, to link the imported objects current folder, select the Create links to the current folder check box.
Optional. In the Version identifier box, modify the default text.
Click the button to the right of the Import Directory box.
In the Search folder dialog box, select the folder from which you want to import the DOCX files and click OK.
Click Start.
Notes
The objects created receive the name of the respective import file.
If the name of the import file contains invalid characters for object names, for example spaces, these are automatically replaced by the underline character.
13
When an object has been imported, the suffix of the corresponding DOCX file is renamed to
.docx_done.
If you cannot import an object, the name of the DOCX file remains unchanged.
Before each object is imported, the system checks whether an object with that name already exists.
If this is the case, a dialog box displays and you can decide if you want to overwrite the existing object.
If version control is licensed, confirming the dialog box message results in a new work version of the object.
If the new document type is not the same as that of the existing object, the object will not import.
Display locked objects
If Composition Studio terminates unexpectedly while objects were still being edited, these objects remain locked.
To unlock locked objects, complete the following steps.
1. To display a list of locked objects in the bottom pane of the Navigator, on the Navigator toolbar, click the Locked Objects button.
2. Select the objects you want to unlock.
3. In the bottom pane of the Navigator, right-click and click Unlock.
Display work versions
This menu item is only available when you have a versioning license installed.
To display a list of all the objects whose highest version is a work version, complete the following step.
On the Navigator toolbar, click the Work Versions button.
The Work versions dialog box offers the following functions.
Create release version
To create a new release version from a work version, complete the following steps.
1. In the Work versions dialog box, select the preferred objects.
2. Click the Create Release Version button.
3. Optional. In the Version Label dialog box, in the Label box, type a label for the release version.
4. Click OK and click Close.
Add to new transfer job
To add the selected objects to a new transfer job, complete the following steps.
1. In the Work versions dialog box, select the preferred objects.
2. Click the Add to new transfer job button and click Close.
3. Start the transfer as described in Create a transfer job.
Create release version and add to new transfer job
To create release versions and add the selected objects to a new transfer job, complete the following steps.
14
1. In the Work versions dialog box, select the preferred objects.
2. Click the Create release version and add to new transfer job button
3. In the Create Release Version dialog box, click Yes.
4. Optional. In the Version Label dialog box, in the label box, type a label for the release version.
5. Click OK and click Close.
6. Start the transfer as described in Create a transfer job.
Notes
The number of the release version sets automatically.
You cannot create a release version for locked objects.
Manage scheduled transfers
This menu item is only available when you have a versioning license installed and when you possess the
Administration(12) right.
This function lists all scheduled transfers in which the current system is the target system.
To manage scheduled transfers, complete the following steps.
1. On the Navigator toolbar, click the Scheduled Transfers button.
2. In the Scheduled Transfers dialog box, in the upper pane, click a transfer.
Note The objects of the selected transfer display in the lower pane.
3. Optional. To edit a scheduled transfer, complete the following substeps.
1. Click the Edit button.
2. In the Edit Scheduled Transfer dialog box, complete one or more of the following substeps.
1. Optional. To modify the start date, in the Date box, type a date or click the down arrow to select a date from the calendar.
2. Optional. To modify the start time, in the Time list, select a time.
Note You can specify the date to the nearest hour.
3. Optional. In the Status list, modify the status.
4. Optional. To set the write protection for the transferred objects in the target system, select the
Write Protected option.
5. Click OK.
4. Optional. To delete the selected scheduled transfer, click the Delete button.
5. Optional. To refresh the displayed properties of the scheduled transfer, click the
Refresh button.
Display transfer history
This function displays all transfers executed in which the current system was the target system.
To display the transfer history, complete the following steps.
1. On the Navigator toolbar, click the Transfer History button.
2. In the Transfer History dialog box, in the upper pane, click a transfer.
Note The objects of the selected transfer display in the lower pane.
15
Revoke a transfer
This function is only available when you have a versioning license installed and when you possess the
Administration(12) right.
To revoke a transfer, complete the following steps.
1. On the Navigator toolbar, click the Transfer History button.
2. In the Transfer History dialog box, in the upper pane, click a transfer.
3. Click the Revoke Transfer button.
Notes
Revoked transfers display in strike-through type in the list.
You must revoke transfers in the order they were originally executed.
If the transfer newly creates an object in a target system, revoking the transfer results in deleting the object from the target system.
If the transfer restores an object from the recycle bin, the object is logically deleted and returned to the recycle bin when you revoke the transfer.
Display deleted objects
To display all logically deleted objects, complete the following step.
On the Navigator toolbar, click the Deleted Objects button.
Note The highest version of each object displays.
For more information, refer to the
Restore an object
To restore an object, complete the following steps.
1. On the Navigator toolbar, click the Deleted Objects button.
2. In the Deleted Objects dialog box, select the objects you want to restore and click the Restore
Objects button.
Result
The object is visible and editable in the Navigator again.
Delete an object permanently
This function is only available when you possess the right Delete Objects Permanently (37).
You cannot permanently delete an object if it is still used by a logically deleted object. You can only permanently delete an object if no current or previous version of another object uses the object you want to delete.
An object is classified as being used by another object, when:
The object is a child object of another object.
Example
A text block is used by another text block.
The object is referenced by another object.
Example
A script is executed by a text block event.
16
To permanently delete an object, complete the following steps.
1. On the Navigator toolbar, click the Deleted Objects button.
2. In the Deleted Objects dialog box, select the objects you want to delete permanently and click the
Permanently delete objects button.
Note This action deletes all previous versions of the object permanently from the database.
Context menu of the Navigator pane
The context menu in the lower pane of the Navigator provides specific object administration functions.
Menu item
New
Description
Opens a submenu to select a new object to be created.
Rename
Delete (Link)
Delete (Object)
Opens a dialog box to specify the new name for the object.
This menu item is only available in folders and deletes the selected object (link) from the folder.
Deletes the selected object.
At first, this only means the object is deleted logically - it is marked as deleted in the database and no longer displayed in the Navigator.
The object remains in the database with all its versions and, through the list of
Deleted Objects can either be restored or permanently and physically deleted.
As long as the object is still in the database, it is not possible to create a new object of the same type with the same name.
Version controlled objects can only be logically deleted if
they are not being used by the current version of another object or
they are only being used by objects that themselves have been logically deleted.
Note DB alias and folder objects are automatically physically deleted and cannot be restored.
Open
Contains
Is Used By
Opens the selected object. Alternatively, you can open all objects by double-clicking them.
Shows the first level objects used by the selected object.
Shows a list of objects using the selected object.
Used by Document
Copy
Copy with Child Objects Copies the object tree to the clipboard. A prefix and/or suffix for the new objects that will be created must be defined in the dialog box that is then displayed.
Add to new Transfer Job Creates a new transfer job and adds the selected object to the transfer job. For more information, refer to Transfer Jobs.
Paste Link
Shows a list of documents using the selected text block.
Copies the selected object to the clipboard.
Paste
Show Object History
This menu item is only available in folders and inserts the object you have copied as a link in the folder.
Inserts a an object you have copied.
Displays the complete version history of an object. For more information, refer to
Show the object history.
Note This menu item is only available when version control has been licensed accordingly.
Show Object Information Lists various object information in the output pane.
Start in Document
Composition Client
This menu item is available for documents and bundles and starts the selected object in the integrated Document Composition Client for test purposes.
17
Add to Debug Service
Remove from Debug
Service
This menu item is only available for scripts and conditions. For more information, refer to Debug a script or a condition.
This menu item is only available for scripts and conditions. For more information, refer to Debug a script or a condition.
18
Object Inspector Pane
About the Object Inspector pane
The Object Inspector pane enables you to edit properties and events of open objects.
Display the Object Inspector pane
If the Object Inspector pane is not visible, complete the following step.
In the Studio tab, click the Object Inspector button.
Context menu of the Object Inspector pane
The context menu of the Object Inspector pane offers the following options.
Menu item Description
Reset Resets the value of the property to the default value or deletes the value of the property.
Create
Edit
Creates a new script, condition or variable object definition.
Opens the script or condition assigned to the property.
Output Pane
About the Output pane
The Output pane displays warnings, status messages, and error messages as well as console output.
Display the Output pane
If the Output pane is not visible, complete the following step.
In the Studio tab, click the Output button.
Context menu of the Output pane
The context menu of the Output pane offers the following options.
Menu item Description
Clear all
Deletes all entries in the Output pane.
Copy
Save output
Copies the text selected in the Output pane to the clipboard.
Allows you save the content of the Output pane to a TXT file.
Toolbox Pane
About the Toolbox pane
The Toolbox provides tools you need for modifying certain objects. Depending on the selected object, the toolbox can also be empty.
Display the Toolbox pane
If the Toolbox pane is not visible, complete the following step.
In the Studio tab, click the Toolbox button.
19
System Font
Perceptive Document Composition uses the Windows system font Segoe UI to display all interface texts.
This font is capable of displaying all the special characters for European languages.
Note The Segoe UI font cannot be used to display certain mathematical special characters.
20
Administration
Odin Views
About Odin views
The Odin views display printed processes, stacks, open jobs, and open envelopes.
Access Odin views
To access the Odin views, complete the following step.
On the Administration tab, click the Odin Views items.
Process View
button, then click one of the submenu
About the process view
The process view displays all pending print processes in the upper pane. The query ViewProcess defines the data that is shown.
The jobs of a process display in the lower pane. The query ViewProcessJobs defines the data that is shown.
Open the process view
To open the process view, complete the following steps.
1. On the Administration tab, click the Odin Views button and click Processes.
2. In the Select Odin Database dialog box, select a database and click OK.
Note The Select Odin Database dialog box only displays if an Odin view is not open yet.
3. Optional. To copy the contents of a cell, click the cell and press CTRL + C.
4. Optional. To display the jobs of a process in the lower pane, in the upper pane, double-click a process.
Context menu of the process view
Menu item
Lock Process
Unlock Process
Reset status to
Set status to Delete
Creating Stack from Open
Jobs
Show jobs of process
Show error view
Select Columns
Sort by multiple columns
Description
Sets the status of the process to locked.
Resets the field ODP_Locked_by so that processing of the dataset can continue.
Sets the status of the process to Imported or Rendition created.
Sets the status of the process to Delete.
Creates a stack for printing or for deleting.
Displays the jobs of the process in the bottom window.
Opens another pane to show any errors if applicable.
Opens a dialog window in which you can select the columns to display.
Opens a dialog window in which you can select the columns for sorting list results.
21
Refresh Refreshes the process list.
Context menu of the jobs of a process
Menu item
Show print stream
Show Stack
Select Printer
Create Stack
Select all
Show error view
Select Columns
Sort by multiple columns
Refresh
Description
Opens the corresponding document in the XPS viewer.For more information, refer to XPS
Shows the corresponding stack.
Allows you to modify the printer.
Creates a stack for printing or for deleting.
To do this, the user must have the Create Odin stack for deleting/printing in the Odin
view Processes (3002) right.
Selects all jobs of the specified process.
Opens another pane to show any errors if applicable.
Opens a dialog window in which you can select the columns to display.
Opens a dialog window in which you can select the columns for sorting list results.
Refreshes the view.
Stack View
About the stack view
The stack view displays print stacks. The query ViewStacks defines the data shown.
The jobs of a stack display in the lower pane. The query ViewStackEditJobs defines the data that is shown.
Open the stack view
To open the stack view, complete the following steps.
1. On the Administration tab, click the Odin Views button and click Stacks.
2. In the Select Odin Database dialog box, select a database and click OK.
Note The Select Odin Database dialog box only displays if an Odin view is not open yet.
3. Optional. To copy the contents of a cell, click the cell and press CTRL + C.
4. Optional. To open a stack, double-click the stack row.
5. Optional. To show the print stream in the integrated XPS viewer, complete the following substeps.
1. Double-click the stack.
2. In the stack window, in the Jobs of stack pane, right-click and click Show Print Stream.
Context menu of the stack view
Menu item
Reset Stack
Description
Sets the status to wait.
22
Release Stack
Delete Stack
Lock Stack
Edit Stack
Unlock Stack
Reset Stack for
Streaming
Reset Stack To
Show Stream
The term or function release stack refers to the action of removing the stack reference in jobs and envelopes, thereby freeing them up to be processed by a new stack.
Sets the status of a stack to delete.
Sets the status to locked.
Displays the stack in a new tab.
Resets the field ODS_Locked_by so that a dataset can be further processed.
Sets the stack type to streaming.
Mark Stack
Show Stack
Select all
Show error view
Select Columns
Sort by multiple columns
Refresh
Sets the status of a stack to the type selected.
Opens the print stream in an XPS viewer.
For more information, refer to
Sets a marker for the selected stack in the list header.
Displays the stack in a new tab.
Selects all stacks in the view.
Opens another window to show any errors if applicable.
Opens a dialog window in which you can select the columns to display.
Opens a dialog window in which you can select the columns for sorting list results.
Refreshes the view.
Context menu of the jobs of stack view
Menu item
Show Jobs of Envelope
Show Stack
Show error view
Remove envelope from stack
Select Columns
Sort by multiple columns
Refresh
Description
Displays the jobs of the envelope in the bottom pane.
Shows the stack in the upper pane.
Opens another window to show any errors if applicable.
Removes the envelope from the stack.
To do this, the user must have the Remove Odin envelope from stack
(3511) right.
In addition, the stack must be set to locked.
Opens a dialog window in which you can select the columns to display.
Opens a dialog window in which you can select the columns for sorting list results.
Refreshes the view.
Context menu of the envelopes of stack view
Menu item
Select Printer
Reset Job To
Show print stream
Show Stack
Show error view
Description
Allows you to change the printer.
Sets the stack to the selected status.
Opens the print stream in an XPS viewer .
Shows the stack in the upper pane.
Opens another pane to show any errors if applicable.
23
Remove Job Removes the job from the stack.
To do this, you must have the Remove Odin job from stack/envelope (3512) right.
In addition, the stack must be set to locked.
Select Columns Opens a dialog window in which you can select the columns to display.
Sort by multiple columns Opens a dialog window in which you can select the columns for sorting list results.
Refresh Refreshes the view.
Context menu of the jobs of envelopes view
Menu item
Select Printer
Description
Allows you to change the printer.
Reset Job To
Show print stream
Show Stack
Sets the stack to the status selected.
Opens the print stream in an XPS viewer .
Shows the stack in the upper pane.
Show error view
Remove Job
Opens another pane to show any errors if applicable.
Removes the job from the stack.
To do this, you must have the Remove Odin job from stack/envelope (3512) right.
In addition, the stack must be set to locked.
Opens a dialog window in which you can select the columns to display. Select Columns
Sort by multiple columns Opens a dialog window in which you can select the columns for sorting list results.
Refresh Refreshes the view.
Open Job View
About the open job view
The open job view displays all open jobs. The query ViewOpenJobs defines the data that is shown.
Open the open jobs view
To open the open jobs view, complete the following steps.
1. On the Administration tab, click the Odin Views button and click Open Jobs.
2. In the Select Odin Database dialog box, select a database and click OK.
Note The Select Odin Database dialog box only displays if an Odin view is not open yet.
3. Optional. To copy the contents of a cell, click the cell and press CTRL + C.
4. Optional. To show the print stream in the integrated XPS viewer, right-click the open job and click
Show Print Stream.
Context menu of the open jobs view
Menu item
Show print stream
Creating stack
Description
Opens the print stream in an XPS viewer.
Creates a stack for printing or for deleting.
To do this, you must have the Create Odin stack for deleting/printing in the Odin view
24
Show error view
Select Columns
Sort by multiple columns
Refresh
Open Jobs (3005) right.
Opens another pane to show any errors if applicable.
Opens a dialog window in which you can select the columns to display.
Opens a dialog window in which you can select the columns for sorting list results.
Refreshes the view.
Open Envelopes View
About the open envelopes view
This view displays all open envelopes. The query ViewOpenEnvelopes defines the data that is shown.
Open the open envelopes view
To open the open envelopes view, complete the following steps.
1. On the Administration tab, click the Odin Views button and click Open Envelopes.
2. In the Select Odin Database dialog box, select a database and click OK.
Note The Select Odin Database dialog box only displays if an Odin view is not open yet.
3. Optional. To copy the contents of a cell, click the cell and press CTRL + C.
Context menu of the open envelopes view
Menu item
Show Jobs of
Envelope
Show error view
Select all
Refresh
Select Columns
Sort by multiple columns
Release
Description
Displays the jobs of the envelope in the bottom window.
The query ViewOpenEnvelopesJobs defines the data shown.
Opens another pane to show any errors if applicable.
Selects all jobs of the specified envelope.
Refreshes the view.
Opens a dialog window in which you can select the columns to display.
Opens a dialog window in which you can select the columns for sorting list results.
Releases the envelope and deletes the reference in the jobs, thereby creating open jobs.
Note The term Release refers to the action of logically destroying the envelope and freeing up the jobs to be packed in other logical envelopes.
XPS viewer
The XPS Viewer allows you to view generated documents from the Odin views Open Jobs and Stacks and enables local printing of the document as well as searching for text in the document.
Odin views tools
The functions in this menu are available to all views.
Icon Name
Refresh View
Description
Refreshes the view.
25
Previous Page
Next Page
Select Filter
Scrolls one page back.
Scrolls one page forward.
Allows you to modify the filter.
Change active filter conditions
Allows you to modify the parameters of the current filter.
Show View Information The information window displays the parameters of the current query.
The field DataProviderDefinition shows the name of the query definition.
For more information, refer to Query Definitions.
Overview of Odin statuses
Processes
ODP_STATE Meaning
0 Imported
1
2
3
Rendition created
Locked
Delete
Stack Status
ODS_STATE Meaning
0 Wait
1
2
3
4
In Progress
On Hold (printed)
Locked (in the event of an error)
Delete
Stack Type
ODS_STACKTYPE Meaning
0 Print (default)
10 *
20 *
30 *
40 *
50
60
99
Postage Optimization
Streaming
Convert
StreamPrint
Archive
Transfer (Example of a Custom Process)
Finished
* = The stack type cannot be set and will result in an error if set in a script.
26
Jobs
ODJ_STATE Meaning
0 Created (job was inserted into the database)
1
2
3
4
Rendition created
Error creating rendition
Printed
Error while printing
Envelopes
ODE_STATE Meaning
0 Created
1
11
12
13
IT Franking
In print
Printed
Error while printing
27
Query Assistant
About Query Assistant
The Query Assistant enables you to run predefined queries. For more information on queries, refer to
Query Definitions.
Access Query Assistant
To access the Query Assistant, complete the following step.
On the Administration tab, click the Query Assistant button.
Run a predefined query
To run a predefined query, complete the following steps.
1. In the Select the required query definition window, select a query definition from the list and click
Next.
2. In the Select the required condition window, select a condition and click Next.
3. Optional. If the query definition contains variables, in the Enter the parameter values window, enter the values.
4. Click Next.
28
DB Alias Administration
About DB Alias Administration
In a database alias, you specify the connection information to a data source, for example, to a database.
Access DB Alias Administration
To access the DB Alias Administration, complete the following step.
On the Administration tab, click the DB Alias Administration
Create a database alias
To create a database alias, complete the following steps.
button.
1. On the DB Alias Administration tab, click the Create New DB Alias button.
2. In the Create New DB Alias dialog box, type a name for the DB alias and click OK.
3. In the Connection Settings dialog box, complete the following substeps.
1. Under Data Provider, select the preferred data provider.
2. Under SQL Template, click the Standard Value button.
3. Under SQL Field Template, click the Standard Value button.
4. Click the ellipsis button to the right of the Connection String box.
5. In the Data Link Properties dialog box, specify the connection settings and click OK.
Note For information about the settings for a connection to an MS SQL Server, refer to
Connection settings for MS SQL Server .
6. Optional. In the Connection Settings dialog box, select the Encrypt Password check box.
8. To check your settings, in the Connection Settings dialog box, click the Check Connection button.
9. Click OK.
Modify the connection settings
To modify the connections of a DB alias, complete the following steps.
1. In the DB Alias Administration window, right-click a DB alias and click Connection Settings.
2. In the Data Link Properties dialog box, modify the connection settings and click OK.
3. In the Connection Settings dialog box, click the Check Connection button.
Connection settings for MS SQL Server
To specify connection settings for a Microsoft SQL Server, in the Connection Properties dialog box, complete the following steps.
1. On the Common tab, from the Select or enter a server name drop-down menu, select a server or type a server name.
2. Complete one of the following substeps.
To use Windows authentication, select the Use Windows Authentication option.
To specify user and password, complete the following substeps.
1. Select the Use SQL Server Authentication option.
29
2. In the User name box, type a user name.
3. In the Password box, type the password.
3. Complete one of the following substeps.
From the Select or enter a database name drop-down menu, select a database or type a database name.
To attach a database file, complete the following substeps.
1. Click the Browse button to the right of the Attach a database file box.
2. In the Select SQL Server Database File dialog box, select a database file and click Open.
3. In the Logical name box, type a name.
4. Optional. To use encryption for the database connection, complete the following substeps.
Note On your MS SQL Server, you need to specify the appropriate settings for data encryption.
1. In the Connection Properties dialog box, click the Advanced tab.
2. Double-click the Encrypt entry.
3. In the Edit Property Value dialog box, from the Property Value drop-down menu, select True and click OK.
5. To check your settings, click the Test Connection button.
Delete a DB alias
You can only delete aliases that are not in use.
To delete a DB alias, complete the following steps.
1. In the DB Alias Administration window, select the aliases you want to delete.
2. On the DB Alias Administration Tools tab, click the Delete DB Alias button.
Note The selected alias is first marked for deletion. After saving, the alias is then deleted permanently.
Export a DB alias
To export a DB alias as an XML file, complete the following steps.
1. In the DB Alias Administration window, select the aliases you want to export.
2. On the DB Alias Administration Tools tab, click the Export DB Alias as XML button.
3. In the Save As dialog box, type a name for the XML file and click Save.
30
Repository Import
About Repository Import
Repository Import enables you to import previously exported objects. For information about exporting objects, refer to Export objects.
Access Repository Import
To access Repository Import, complete the following step.
On the Administration tab, click the Repository Import button.
Import objects
Note To allow the import of work versions, open the System Administration and set the Import Work
Versions property of the appropriate system to True.
To import objects into the repository, complete the following steps.
1. In the Repository Import window, in the Specification of the import directory, type the name of the directory from which you want to import the objects.
Note The directory must be a subdirectory below the configured RWS work directory. The default setting for this directory is [drive:]\PDC\Admin\rws_work\.
2. Optional. If objects should be flagged as write-protected in the target system, select the Set Write
Protection check box.
3. On the Repository Import tab, click the Execute button.
31
System Synchronization
About System Synchronization
System Synchronization enables you to compare the objects in two systems and to synchronize these systems.
Access System Synchronization
To access System Synchronization, complete the following step.
On the Administration tab, click the System Synchronization button.
Synchronize two systems
To synchronize two systems, complete the following steps.
1. On the System Synchronization tab, select the systems you want to compare.
2. To display the list of objects in both systems, on the System Synchronization tab, click the
Compare Systems button.
Objects found in the one system but missing in the other display in red. You can mark them for deletion.
Objects with different object names in each system display in blue.
Objects that differ in version number display in black italics.
Objects that differ in version number and name display in blue italics.
3. Optional. To mark an object for deletion, right click the object and click Delete.
4. On the System Synchronization tab, click the Execute Synchronization button.
32
System Administration
About System Administration
The System Administration enables you to create and administrate systems, to manage the dependencies between systems, and to create database connections.
Access System Administration
To access System Administration, complete the following step.
On the Administration tab, click the System Administration button.
Create a database connection
To create a database connection, complete the following steps.
, drag a New DB Alias module to the System Administration Editor window.
2. In the Create New DB Alias dialog box, type a name for the alias and click OK.
3. In the Connection Settings dialog box, complete the following substeps.
1. Under Data Provider, select the preferred data provider.
2. Click the ellipsis button to the right of the Connection String box.
3. Complete one of the following substeps.
For Native SQL
To specify connection settings for a Microsoft SQL Server, in the Connection Properties dialog box, complete the following steps.
1. On the Common tab, from the Select or enter a server name drop-down menu, select a server or type a server name.
2. Complete one of the following substeps.
To use Windows authentication, select the Use Windows Authentication option.
To specify user and password, complete the following substeps.
1. Select the Use SQL Server Authentication option.
2. In the User name box, type a user name.
3. In the Password box, type the password.
3. Complete one of the following substeps.
From the Select or enter a database name drop-down menu, select a database or type a database name.
To attach a database file, complete the following substeps.
1. Click the Browse button to the right of the Attach a database file box.
2. In the Select SQL Server Database File dialog box, select a database file and click
Open.
3. In the Logical name box, type a name.
4. Optional. To use encryption for the database connection, complete the following substeps.
Note On your MS SQL Server, you need to specify the appropriate settings for data encryption.
2.
1.
33
1. In the Connection Properties dialog box, click the Advanced tab.
2. Double-click the Encrypt entry.
3. In the Edit Property Value dialog box, from the Property Value drop-down menu, select True and click OK.
2. To check your settings, click the Test Connection button.
For Microsoft Oracle
1. On the Common tab, in the Enter a server name box, type a server name.
2. In the User name box, type a user name.
3. In the Password box, type a password
4. To check your settings, click the Test Connection button.
5. Optional. Click the Advanced tab and change the required settings.
2. Optional. In the Connection Settings dialog box, select the Encrypt Password check box.
3. To check your settings, in the Connection Settings dialog box, click the Check Connection button.
4. Click OK.
Create a new system
To create a new system, complete the following steps.
, drag a New System module to the System Administration Editor window.
2. In the Create New System dialog box, in the Name box, type a name for the system.
3. In the SystemObjectID box, type an object id for the system and click OK.
Note You can only edit the system object ID at this stage of creating the system. The ID must be unique.
4. To link the system to a DB alias, in the Editor window, move the pointer over the system, click the red dot and drag the pointer to a DB alias.
Notes
After saving a link to a DB alias, no further editing is possible.
You cannot move existing systems from one database to another.
On saving, the system is assigned a DefaultAliasTable and a DefaultLookupTable. Both tables are created in the new system.
Assign a Word template
By default, each system uses the Normal.dotm specified in the configuration file to open or generate documents.
Document Access or
Generation via...
Studio
Client
Custom Service
Configuration File
PDC.Studio.exe.config modus_MWS.exe.config
If WCF console is used: PDC.WCF.Console.exe.config.
Custom Service configuration file
For more information, refer to "Install a Windows service " in Perceptive
Document Composition Configuration Guide.
34
To use a different Normal.dotm for a specific system, assign a Word template to the system in the system administration.
To assign a Word template to a system, complete the following steps.
1. Open the system to which you want to assign the Word template.
2. Optional. Create a new Word template.
3. Open the system administration .
4. In the Editor window of the system administration, click the current system.
5. In the Object Inspector pane, click the Word Template property and click the ellipsis button next to the property.
6. In the Select an object dialog box, select the preferred Word template and click Select.
Modify a database connection
To modify the connection settings of a database connection, complete the following steps.
1. In the System Administration Editor window, double-click the database connection you want to modify.
2. In the Connection Settings dialog box, modify the settings.
Define a transfer system
Transfer systems enable you to copy objects from a source system to one or more target systems with
the Navigator function Add to new transfer job . You can also use Transfer Jobs.
Red arrows depict the transfer of one system to another.
To define a transfer system, complete one of the following steps.
In the System Administration Editor window, move the pointer over the source system, click the red dot and drag the pointer to the target system.
Complete the following substeps.
1. In the Editor window of the system administration, double-click the source system.
2. In the Transfer Targets dialog box, select one or more target systems and click OK.
Delete a system
To delete a system, complete the following steps.
1. Open the system administration .
2. In the Editor window of the system administration, click the system that you want to delete.
35
3. In the System Administration tab, click the Delete Object button.
Notes The selected system is first marked for deletion. After saving, the system is then deleted permanently.
You cannot delete the opened system.
Restore a system
Use the Restore Systems function to search for systems that are stored in the database but do not currently display in the system administration.
To search for systems in a database, complete the following steps.
1. Optional. If not already available, create a DB alias for the database you want to search and save the system administration.
2. In the System Administration tab, click the Restore Systems button.
3. In the Unconfigured Systems dialog box, select one or more systems that you want to add to the system administration and click Restore.
System properties
Property
DB Alias
Description
Database containing the system.
DefaultAliasTable
DefaultLookupTable
Default system alias table.
Default system lookup table.
Import Work Versions TRUE = Work versions are imported.
FALSE = Work versions are not imported.
Description
LastModified
Read-only Transfer
Optional explanatory text.
Date and time of last modification.
TRUE = Objects are transferred with write protection.
FALSE = Objects are transferred without write protection.
Tag
Word Template
ObjectName
SystemObjectID
Optional text. You can read the text specified here by a MonaLisa function at runtime.
Standard Word template for this system.
Unique system name.
Unique system ID.
36
Remote Control
About Remote Control
Remote Control enables you to monitor and control services, processes, and sub-processes on various computers. For information about configuration, refer to the Perceptive Document Composition Advanced
Design and Setup Guide.
Notes
The logged in Windows user must have sufficient rights to gain access to remote computers.
Users without Administrator rights should not be permitted to start the Remote Control module.
When working on operating systems with User Account Control (UAC), an error message indicating
"HTTP could not register URL" might occur due to missing permissions.
To resolve this issue, execute the following command as an administrator. Use the value specified in the error message as [Port]. netsh http add urlacl url=http://+:[Port]/ user=[DOMAIN]\[UserName]
Access Remote Control
To access Remote Control, complete the following step.
On the Administration tab, click the Remote Control button.
Control a hosted process
To control a hosted process, complete the following steps.
1. In the RuntimeRemoteControl window, click the process you want to start.
2. In the RuntimeRemoteControl Tools tab, click the Start Service button.
3. Optional. To refresh the view automatically after any status modification, complete the following substeps.
button. 1. In the RuntimeRemoteControl Tools tab, click the Activate automatic refresh
2. In the Editor window, observe the messages in the Status column.
RuntimeRemoteControl Tools
Icon Name
Start Service
Description
Starts the service.
Stop Service
Pause Service
Resume Service
Refresh
Clear Cache
Activate automatic refresh
Stops the service.
Pauses the service.
Resumes the service.
Refreshes the view.
Clears the repository cache.
The view refreshes automatically after any status modification.
37
Deactivate automatic refresh The view does not refresh automatically after any status modification.
38
Odin Import Procedure Manager
About Odin Import Procedure Manager
The Odin Import Procedure Manager enables you to create an SQL script that you can use to extend the stored procedure INSERT_JOB.
Note The stored procedure INSERT_JOB inserts job data into the table ODIN_JOB. This data is available for further processing.
Access Odin Import Procedure Manager
To access Odin Import Procedure Manager, complete the following step.
On the Administration tab, click the Odin Import Procedure Manager button.
Odin Import Procedure Manager .
Activate Odin Import Procedure Manager
If the Odin Import Procedure Manager is not available in the Administration tab, complete the following steps.
1. Close Composition Studio.
2. In the installation directory (%PDCdir%), open the studioprofile.xml file.
3. Find the following line.
<ModuleInfo
AssemblyFile="ModusSuite.Studio.OdinImportProcedureManager.dll" />
4. Remove the comment character <!-- at the beginning of the line and --> at the end of the line.
5. Save and close the file.
6. Start Composition Studio.
Extend the stored procedure INSERT_JOB
To extend the stored procedure INSERT_JOB, complete the following steps.
1. In the installation directory (%PDCdir%), open the odinparameter.config file.
2. At the end of the file, add one or more lines containing the parameter name, alias and, default value.
Example
<parameter name="
ODJ_ORDERNR
" type="string" direction="i" size="10" alias="
ORDER_NR
" defaultvalue=
"0
"/>
3. Save and close the file.
4. Open the database administration where the Odin tables are located, for example SQL Server
Management Studio.
5. Add one or more data fields to the ODIN_JOB table.
Note The data field names must be equal to the parameter names (parameter name) in the
odinparameter.config file.
6. In Composition Studio, on the Administration tab, click the Odin Import Procedure
Manager button.
7. In the Editor window of the Odin Import Procedure Manager, click the preferred database connection.
8. In the Path to OdinParameterConfig file box, type the path to the odinparameter.config file.
39
9. In the Output file box, type the path and the name of the output file, for example, C:\NewParam.sql.
10. To generate the SQL script defined in the previous step, on the Odin Import Procedure Manager tab, click the Generate button.
11. In the database administration where the Odin tables are located, run the SQL script.
Transfer data from a bundle to the ODIN_JOB table
To transfer customer-specific data for each document in a bundle to the ODIN_JOB table, complete the following steps.
1. Open the bundle from which you want to transfer data to the ODIN_JOB table.
2. In the Object Inspector pane, assign a script to the InitializePrintAndArchive event.
3. In the script, use the function SetArchiveAttribute to assign data for each data field you added in
Example
SetArchiveAttribute("ORDER_NR","1234567890")
Note The first parameter (in the ORDER_NR example above) must correspond to the alias used in
Transfer data from a document to the ODIN_JOB table
To transfer customer-specific data from a document to the ODIN_JOB table, complete the following steps.
1. Open the bundle that contains the respective document.
2. In the Editor window of the bundle, click the document.
3. In the Object Inspector pane, assign a script to the DefinitionArchiving event.
4. In the script, use the function SetArchiveAttribute to assign data for each data field you added in
Example
SetArchiveAttribute("
ORDER_NR
","1234567890").
Note The first parameter (in the example above
ORDER_NR
) must correspond to the alias used in the
40
User Rights
About user rights
You can manage Document Composition users either in the Windows user administration tool or in
LDAP.
A user must first authenticate before starting a Document Composition program. This is done by logging in using the Windows user or by typing the user name and password.
Fore more information, refer to Start parameter credentials
Profiles
About profiles
Profiles enable you to collate user-specific attributes.
If you use LDAP, the attributes of the LDAP user are mapped to the corresponding attributes.
Create a profile
To create a profile, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Profile.
2. In the Create New Profile dialog box, type a name for the profile and click OK.
Add an attribute to a profile
To add an attribute to a profile, complete the following steps.
1. On the Identity Editor Tools tab, click the Add Attribute button.
2. In the Create New Profile Attribute dialog box, type a name for the attribute and click OK.
Note You cannot add the attributes UserId and UserRoleNames to profiles because they are automatically created on authentication.
3. In the Object Inspector pane, click the Mapping property and type the name of the attribute from the Active Directory.
4. Optional. In the Object Inspector pane, type a value for the property Value.
Note This value is assigned to the attribute when the Mapping property is not populated or the entry defined there does not exist.
5. Optional. To define which profile is used, edit the UserRepository.config file.
For more information, refer to PDC.Configuration.chm.
6. To enforce your modifications, restart the service Modus_Core.
41
Roles
About roles
Roles enable you to assign rights and privileges.
Create a role
To create a role, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Role.
2. In the Create New Role dialog box, type a name for the role and click OK.
3. From the Navigator, drag the preferred profile to the Editor window.
4. Optional. To allow or deny a global right, in the Editor window, in the Global Rights tab, select or clear the corresponding check box in the Assign column.
Note You can use the context menu in the Global Rights tab to quickly allow or deny all rights.
5. Optional. To allow or deny an object right, in the Editor window, in the Object Rights tab, select or clear the corresponding check box in the columns Create, Read, Edit, and Delete.
Note You can use the context menu in the Object Rights tab to quickly allow or deny all rights.
6. Optional. To allow or deny access to a system, in the Editor window, in the System Rights tab, select or clear the corresponding check box in the Allowed column.
Note You can use the context menu in the System Rights pane to quickly allow or deny access to all systems.
7. To enforce your modifications, restart the service modus_Core.
Note To disable or to enable user role access control, edit the modus_core.exe.config file and the
Modus_MWS.exe.config file, and any existing Windows Service Host configuration file. For more information, refer to the Perceptive Document Composition Configuration Guide. With user role access control enabled, access is denied for each system for which a role is not configured explicitly to have access.
42
Role Mappings
About role mappings
Role mappings enable you to define user groups. The user group names must correspond to existing group names in Windows or LDAP.
Create a role mapping
To create a role mapping, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Role Mapping.
2. In the Create New Role Mapping dialog box, type a name for the role mapping and click OK.
3. To add a group, on the Identity Editor Tools tab, click the New Group button.
4. In the Create New Group dialog box, type a name for the group and click OK.
5. From the Navigator, drag the preferred role to the group in the Editor window.
6. Optional. To define which role mapping is used, edit the UserRepository.config file. For more information, refer to the Perceptive Document Composition Configuration Guide.
7. To enforce your modifications, restart the service Modus_Core.
Note If a user is assigned to several groups, the user's rights are an accumulation of the rights assigned to the respective groups.
43
Text Blocks
About text blocks
Text blocks are integral parts of a document. As a rule, they comprise of a text fragment containing both standard fixed text and/or text variables.
You can nest text blocks within each other to any depth.
Create a text block
To create a text block, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Text Block.
2. In the Create New Text Block dialog box, type a name for the text block and click OK.
3. Optional. To add text to the text block, perform the following substeps.
1. On the Editor Tools tab, click the Show Word Document
2. In Microsoft Word, type the content of the text block.
button.
3. In Composition Studio, save your changes.
Note To remove an existing data link, right-click and click Remove Data Link.
7. Optional. In the Object Inspector pane, edit the
8. Optional. To modify the status of the text block, right-click the text block and select one of the following menu items.
Always active. Sets the value of the TextInsertionRule property to required.
Activate. Sets the value of the TextInsertionRule property to activated.
Deactivate. Sets the value of the TextInsertionRule property to deactivated.
Disabled. Sets the value of the TextInsertionRule property to disabled.
For more information, refer to
Text block editor tools
Icon Name
Refresh
Open Text Block
Description
Refreshes text block structure if you modified child text blocks or selections while the text block is still open in editing mode.
If you made modifications to a text block the function remains deactivated, refresh is done on saving.
Opens the selected text block.
Add Variable Inserts a new variable at the current cursor position.
Apply Text Block and
Variable Properties
Apply text block and variable properties
44
Show Word Document
Switch View
Structure of a text block
Used data connections
Brings the Microsoft Word document of a text block to the foreground.
Switches between full screen mode and split screen mode with Word.
For details, refer to Text Block Structure .
For details, refer to Used Data Links .
45
Text Block Variables
About text block variables
Text block variables are containers for variable data, for example, name and address.
Apart from text data, text block variables contain either image data or dynamic data charts.
Variable type
Text
Content
Variable text data
Insertion method
As text block variable
in Composition Studio
in Microsoft Word
For more information, refer to Insert a text block variable
As text block variable with image variable property
in Composition Studio
in Microsoft Word
For more information, refer to Insert an image variable
Image
Chart
Path and file name of the image or
Link to the image as variable value.
For more information, refer to
Chart that draws at runtime depending on given data.
For more information, refer to
Insert a text block variable
As text block variable with image variable property and
ChartDefinition properties in Composition Studio
For more information, refer to Predefine a dynamic chart
Two methods are available to insert variables into a text block.
In Composition Studio
To insert a text block variable, complete the following steps.
1. Open the text block.
2. In the Editor window, below the bottom-right pane, click Text Block Variables.
3. Enter a name for the variable by completing one of the following options.
In the Text Block Variables pane, in the Variable Name box, type a name for the variable.
In the Text Block Variables pane, click the ellipsis button next to the Variable Name to open a dialog box where you can select a predefined variable.
For more information, refer to
4. Optional. Select the as Image Variable check box. For more information, refer to
5. Optional. In the Default Value box, type a default value for the variable. This value is used to populate the variable if no data field is defined.
6. Optional. To enter an input mask for the variable, complete one of the following options.
46
In the Input Mask box, type an input mask for the variable. For more information, refer to
Click the ellipsis button next to the Input Mask box to open a dialog box and select a predefined input mask.
7. Optional. To assign a value help, perform the following substeps.
1. Click the ellipsis button next to the Value Help box.
2. In the Select an Object dialog box, in the lower pane, click one of the listed value help objects.
3. Click Select.
For more information, refer to Value Helps.
8. Optional. Clear the Allow manual input check box. This specifies whether a text block variable can be overwritten or whether it has to be filled by selecting a predefined value from a value help.
9. Click the Insert button. The variable is inserted at the corresponding cursor position in the
Microsoft Word document.
10. Optional. To modify the order of variables, drag and drop the variable to the preferred position in the text block structure.
11. Optional. Check the position of the variable in Word and modify the position if necessary.
Note Modifying the variable position in Word has no effect on the variable position in the text block editor.
12. Optional. In the Object Inspector pane, edit the
13. Optional. To modify the status of the variable, right-click and select one of the following menu items.
Required. Sets the value of the VariableType property to required.
Optional. Sets the value of the VariableType property to optional.
Free. Sets the value of the VariableType property to free.
For more information, refer to
In Microsoft Word
To insert a text block variable, complete the following steps.
1. Open the text block.
2. On the Editor Tools tab, click the Show Word Document button.
3. In Word, position the cursor to where you want to insert the variable.
4. In Word, on the PDC tab, click the Insert Text Variable button.
5. In the Insert Text Variable dialog box, in the Variable Name box, type a name for the variable.
6. Optional. In the Default Value box, type a default value for the variable.
7. Click OK to confirm.
Format a text block variable
If the formatting of a variable in a text block should be passed to the document, complete the following steps.
1. In Word, select the content control of the variable.
47
2. Format the variable.
The following variable formats are passed on to the generated document.
Font style
Font color
Highlight color
Font style bold
Font style italic
Font style underlined
Font style strike through
Special Variable Contents
Apply a hyperlink as content of a variable
To apply a hyperlink as content of a standard variable, complete the following step.
Format the variable content as follows.
The visible content of the variable in the document|http://www.perceptivesoftware.com
Notes
The variable content consists of two parts, the visible content and the URL. The two parts are separated by a pipe sign ("|").
In the generated document, the user can open the link by the key combination CTRL + left mouse
button on the variable content.
Apply a line feed, tab, non-breaking hyphen or non-breaking space
The following keywords in variable contents enable you to insert line feeds, tabs, non-breaking hyphens and non-breaking spaces.
Variable content is converted to
\line Line feed
|CRLF| Line feed
\tab
\~
\_
Tab
Non-breaking space
Non-breaking hyphen
Define a special variable content in the property Formatting Mo de
You can also define the special variable contents in the variable property Formatting Mode as Type-
Specific Formatting.
To do this, complete the following steps.
1. In the Editor window, select the variable.
2. In the Object Inspector, click the property Formatting Mode and click the ellipsis button next to the input box.
3. In the Output Formatting dialog box, select the formatting mode Type-Specific Formatting.
48
4. In the field Rule, define the required formatting mode.
Example
To force a line feed after the variable content, type %s\line.
Note When using the WebClient, all line feed in variable content are displayed as #xA; when read from
XML files. This particular XML-Parser behavior complies with W3C recommendations for XML and is described there as Attribute-Value Normalization.
Define an input mask
Input masks are used to define input formats for variables, for example date.
An input mask is defined by the use of three parameters, separated from each other by a semicolon.
To define an input mask, complete the following steps.
1. In the Editor window, select the variable.
2. In the Object Inspector pane, type the input mask in the input box next to the property Input Mask.
3. The first value is used to define formatting characters.
The following table is a list of the characters that can be used to define an input mask and their meaning.
Formatting Characters
This table displays the characters that you can use to define an input mask.
A a
C c
0
9
\
L
I
#
:
/
;
_
Characters Description
! Specifies that optional characters display as leading spaces. If "!" character is not specified, optional characters display as trailing spaces in the mask.
>
<
<>
Converts all following characters to lower case until the end of the mask is reached or the character "<" is detected.
Converts all following characters to lower case until the end of the mask is reached or the character ">" is detected.
If both characters are used together, no case sensitivity check is made. The data specified is formatted in exactly the same way a user types it.
The character following "\" can be used as a placeholder in the input mask.
Valid entries are (A-Z, a-z). An entry is not compulsory.
Only alphanumeric characters are valid (A-Z, a-z, 0-9). An entry is not compulsory.
Any character is allowed. An entry is not compulsory.
Only a numeric character is allowed. An entry is not compulsory.
Only a numeric character or a plus or minus sign is allowed. An entry is not compulsory.
Used to separate hours, minutes, and seconds in defining a time.
Used to separate the date entries day, month, and year from each other.
Used to separate the three mask parameters from each other.
The underline character _ automatically inserts a space in the text. The cursor skips over these characters when you type data.
Notes
49
You can use any character which is not listed in the above table as a first parameter of the mask and as placeholder for input. These characters are inserted automatically and skipped by the cursor on data entry.
You can also use the special mask characters listed in above table as placeholders as long as you specify the "\" character first.
4. Following this, use the character 1 to specify that any defined separators, for example slash or space, be passed on to the document.
Using 0 means that separators specified in the formatting rule are not passed on.
5. As the third parameter, define the character to be used in the input box to display spaces or data not specified.
Mask Templates
To select a predefined input mask template, click the ellipsis field.
Define variable rules
button to the right of the Input Mask
To store frequently used input masks in a lookup table, complete the following steps.
System Administration
1. Open System Administration.
2. In the System Administration window, click the system for which you are defining the input masks.
3. In the Object Inspector pane, check which alias table is assigned to the property
DefaultAliasTable.
4. Optional. To modify the alias table, perform the following substeps.
1. In the Object Inspector pane, click the property DefaultAliasTable and then the ellipsis button next to the input box.
2. In the Select an Object dialog box, in the lower pane, click one of the listed alias table objects.
3. Click Select.
4. Save and close the System Administration.
Alias table
1. Open the alias table you have assigned as the DefaultAliasTable.
2. On the Lookup Alias Table tab, click the New Key button.
3. In the Create New Key dialog box, type variablestemplate as name of the key and click OK.
4. In the editor window, click the key variablestemplate.
5. On the Lookup Alias Table tab, click the New Reference button.
6. In the Select an Object dialog box, in the lower pane, select a lookup table.
Note You may have to create a new lookup table beforehand.
7. Save and close the alias table.
50
Lookup table
1. Open the lookup table which you assigned to the variablestemplate key.
2. Define the default variable rules in the following way.
VarName=VarDefault|"VarInput".
Example
Var1=Value1|"!\(999 99\) 99999;1;_"
Var2=Value2|">cc-99999;1;_"
Var3=Value3|"000\ 000\ 00;1;_"
3. Save and close the lookup table.
Now, when you insert a new variable and click the ellipsis button next to the field Variable Name, the entries in the lookup table display for selection.
Manual variables
An input dialog box is displayed for variables whose property Input Type allow a manual input during
document generation.
If a data source is assigned the values read from the source are displayed as a default value.
Variable properties
Conditions
Property Description
Condition If a condition is assigned and returns the result True, the variable inserts into the text block.
If the condition returns the result False, the variable does not insert into the text block.
For more information, refer to Assign a condition to an object.
Events
Event
AfterInsert
Description
This script executes after the variable is inserted into the text block.
Context: TextVariable
BeforeInsert This script executes before the variable is inserted into the text block.
Context: TextVariable
OnGetManualVariable When manual variables are queried, this event is executed for each variable.
Input Type: Always or DataConditional
Context: ManualVariable
Within the script, the settings of the value help assigned to the text block variable can be queried or changed to allow dynamic value help.
In order to pass dynamic value help objects to the client, the returned Manual Variable
XML must include the manvar2 element.
For more information, refer to the Perceptive Document Composition Configuration
Guide.
General
Property Description
51
Attribute Name Attribute name (database field or pool variable)
ChartDefinition
For more information, refer to Chart properties .
DataLink Path to the data object or the name of a variable pool.
DataSource
Value
None
Description
If the property InputType specifies manual input, the variable is populated with this result.
If the property InputType specifies no manual input, the variable is populated with the default value.
Pool
Data
Model
XPath
The variable is populated by the value from the pool variable assigned.
The variable is populated by the value from the data model assigned.
The variable is populated by the value returned by the XPath expression defined in the property XPathExpression.
DefaultValue
Formatting
Mode
Value applied if the variable is not populated.
Default values for a user
To populate a variable with values pertaining to the current user, use a default value according to the following syntax.
[ModusUser.AttributeName]
Using the value [ModusUser.UserId], for example, you can make the default value for an input field the name of the currently logged in user.
You can find an overview of already available attributes in the options dialog which is reached through the Main Menu button - Options - User Data.
The property InputType must be set to the value Always.
Defines the formatting of the variable in the document. The following two formatting types are available.
String Splitting
To fill the content of a variable with filling characters, for example leading zeros, to a required length, use the formatting mode String Splitting.
Start position and number of places play a role, when only a substring of the variable is to be used.
Start position=3 and number of places=2 would mean using 2 characters starting from the third character.
Define a character as the filling character that will be used to fill the string to the specified length.
The default value for a filling character is a space.
Typespecific Formatting
Typespecific formatting allows you to define rules as to how variables are formatted when they are inserted into a document.
So, for example, the value 123 can be formatted and inserted as $123.00.
Use the Data Type to define the type of variable.
You can use the field Rule to define the formatting rule.
The Formatting rule contains simple characters and format identifiers. Simple characters are inserted into the result string as is. Format identifiers begin with "%" and assign a specific format to the result.
A format identifier has the following syntax:
52
53
%[width].[prec] type
After the "%" sign, the following definitions may be made:
an optional width definition [width],
an optional precision definition, that is denoted by a leading period [.prec] and
a character that denotes the conversion type (type).
Width and precision are denoted by numbers (for example "%.10d). The width specification denotes the minimum length of the field for conversion.
If the result string is shorter than the minimum length. it is stocked up with spaces. As a rule, spaces are inserted before the value to produce a right alignment.
For all floating point formats, the characters for the decimal and thousand separators are taken from the DecimalSeparator and ThousandSeparator settings in the Windows
Control Panel.
Example:
for the value = 100 the formatting rule %.2m returns
$100.00 as the result.
Conversion type
The following character are available for the conversion type and irrespective of upper or lower case.
Conversion Characters
Character Meaning
d
Decimal
The argument must be an integer value. The value is converted to a String comprised of decimal numbers.
If the Format-String contains a precision specification, the resulting String must have at least the minimum number of decimal places.
If it has less, the String is padded to the left with zeros to reach the minimum length. e
. f
Scientific Notation
The argument must be a floating point value (float).
The value is converted to a String in the form of "-d,ddd...E+ddd". If the number is negative, the String begins with a minus sign.
A number is always set before a decimal separator.
The total number of places in the result String (including the number before the decimal comma) is determined by the precision specifier in the Format-
String.
If there is no specification, the default precision to 15 places is used.
A plus or minus sign and at least three decimal places always follow the exponent "E" in a String.
Fixed
The argument must be a floating point value (float).
The value is converted to a String according to the following convention: "ddd,ddd...".
If the number is negative, the String begins with a minus sign.
The number of decimal places is determined by the precision specification in
54 g n m s x the Format-String.
If there is no specification, the default precision to 2 decimal places is used.
General
The argument must be a floating point value (float).
The value is converted to the shortest decimal string according to the fixed or scientific notation format.
The number of significant places in the result string is defined by the precision specifier in the Format-String.
If there is no specification, the default precision to 15 places is used.
Trailing zeros are removed from the result string.
A decimal point is only displayed when needed.
The fixed-point format is used for the resulting string, if the number of digits before the decimal point lesser than or equal to the specified precision and the value is greater than or equal to 0.00001.
Scientific notation is used in all cases.
Number
The argument must be a floating point value (float).
The value is converted to a String according to the following convention:
"-d.ddd.ddd,ddd...".
Format "n" is the same as format "f", except that the result string contains a thousands separator.
Currency
The argument must be a floating point value (float).
The value is converted to a string that represents an amount of currency.
The conversion is based on the Windows global variables for
CurrencyString, CurrencyFormat, NegCurrFormat, ThousandSeparator,
DecimalSeparator und CurrencyDecimals.
These variables are initialized with the settings stored in the Windows
Control Panel tab Regional Settings, Currency.
N.B. If the Format-String contains a precision specifier, this will override the value in the global variable CurrencyDecimals.
String
The argument must be a character, a string or a PChar value.
The String or, as the case may be, the character, is inserted instead of the format identifier.
If the Format-String contains a precision specifier, this will determine the maximum length of the resulting strings.
If the argument is a string that exceeds the maximum length, the string is truncated.
Hexadecimal
The argument must be an integer value.
The value is converted to a String comprising of hexadecimal digits.
If the Format-String contains a precision specification, the resulting String must have at least the minimum number of digits.
If it has less digits, the String is padded to the left with zeros to reach the minimum length.
Define the formatting rule in the In the field Computation to specify a computation formula, for example *10.
The placeholder for the value in the computation formula is always %s, because it is passed on as a string to the computation.
Input Mask
Input Type
Prompt
ValueHelp
ValueHelpOver writable
Variable Type
XPathExpressi on
For more information, refer to Input Masks .
Value
None
Always
Description
No manual input
Manual input is possible
DataConditional If variable content is empty although a data source was assigned, manual is possible.
For more information, refer to Manual Variables .
Prompt text for manual variables.
For more information, refer to Value Helps.
Evaluated when a value help is assigned.
Value Description
True A value can be specified manually instead of making a selection from the value help.
False Only a value from the value help can be selected.
Value Description
Free Free variable
If this variable is not populated, it has no bearing on document generation.
Required Variable is required
If this variable is not populated, document generation is aborted.
Required variables with manual input are displayed in red in the input dialog.
Optional Variable is optional
If this variable is not populated, a log entry is made to this effect.
To assign an XPath expression, complete the following steps.
1. In the Object Inspector, click the XPatchExpression property and click the ellipsis button next to the property.
2. In the Open dialog box, select an XML file.
3. In the XPath Evaluator dialog box, in the Sample XML tree box, right-click the variable that you want to assign to the text block variable, then click Copy XPath.
4. In the XPath Expression box, right-click and click Paste.
5. Click the Evaluate button.
6. Check the result in the XPath Result box.
7. Click the Apply button.
Examples
Adding Values with XPath
The function Sum returns the sum of all values of a node.
Note The comma character is not recognized, that means a dot (decimal point) must be used as the decimal separator in the XML file (U.S. spelling).
Syntax:
Sum(PARTNER/ACCOUNTS/MOV_assets) sum(//ACCOUNT[1]/MOVEMENTS/MOV_assets)
55
// Only looks for the node ACCOUNT irrespective of the parent node, that means looks for the node wherever it is found.
There is no need to define the path to the node.
ACCOUNT[1] Only the first node with the name ACCOUNT is read.
/MOVEMENTS Child node
/MOV_assets Element (with values)
Several instances of the node ACCOUNT exist, but only the sum of the values of a node element for one ACCOUNT node is to be calculated.
The node ACCOUNT is only run through once, but all the child nodes (MOVEMENTS) are evaluated.
The values are read by a multiple text block (1:n relationship) in modus.
As such, the nodes all have the same structure and just different values.
The return value is a normal decimal value (for example $100.33) and therefore of the data type Double.
Other Useful Functions
Concat
()
Count(
)
Transl ate()
Charac ter: //
Allows you to combine strings to individually defined rules. Thus, contents read from elements can be combined with leading characters.
Example:
concat(Postbox ,PARTNER/ADDRESS/ADD_POB)
Return value:
Postbox 08 15
Counts the number of specified nodes found in the XML file.
This is useful for 1:n relationships, when several nodes of the same name are found (multiple text blocks).
Example:
Count(PARTNER/ACCOUNTS)
Replaces all lower cases with upper cases in the content read from the element name.
Example:
Translate(//ADD_country_name,abcdefghijklmopqrstuvwxyz
,ABCDEFGHIJKLMNOPQRSTUVWXYZ)
Reads the content of all elements of the specified name, irrespective of where the element is found in the XML file.
There is no need to define a particular path as only the element is looked for.
Example:
//MOV_liabilities
Lookup
Property Description
LookupFormattingType Output formatting after condition and lookup table evaluation. The following two formatting types are available.
String Splitting
To fill the content of a variable with filling characters, for example leading
56
zeros, to a required length, use the formatting mode String Splitting.
Start position and number of places play a role, when only a substring of the variable is to be used.
Start position=3 and number of places=2 would mean using 2 characters starting from the third character.
Define a character as the filling character that will be used to fill the string to the specified length.
The default value for a filling character is a space.
Typespecific Formatting
Typespecific formatting allows you to define rules as to how variables are formatted when they are inserted into a document.
So, for example, the value 123 can be formatted and inserted as $123.00.
Use the Data Type to define the type of variable.
You can use the field Rule to define the formatting rule.
The Formatting rule contains simple characters and format identifiers. Simple characters are inserted into the result string as is. Format identifiers begin with "%" and assign a specific format to the result.
A format identifier has the following syntax:
%[width].[prec] type
After the "%" sign, the following definitions may be made:
an optional width definition [width],
an optional precision definition, that is denoted by a leading period [.prec] and
a character that denotes the conversion type (type).
Width and precision are denoted by numbers (for example "%.10d). The width specification denotes the minimum length of the field for conversion.
If the result string is shorter than the minimum length. it is stocked up with spaces. As a rule, spaces are inserted before the value to produce a right alignment.
For all floating point formats, the characters for the decimal and thousand separators are taken from the DecimalSeparator and ThousandSeparator settings in the Windows Control Panel.
Example:
for the value = 100 the formatting rule %.2m returns
$100.00 as the result.
Conversion type
The following character are available for the conversion type and irrespective of upper or lower case.
Conversion Characters
57
58
Character Meaning
d
Decimal
The argument must be an integer value. The value is converted to a String comprised of decimal numbers.
If the Format-String contains a precision specification, the resulting String must have at least the minimum number of decimal places.
If it has less, the String is padded to the left with zeros to reach the minimum length. e
. f g n
Scientific Notation
The argument must be a floating point value (float).
The value is converted to a String in the form of "-d,ddd...E+ddd".
If the number is negative, the String begins with a minus sign.
A number is always set before a decimal separator.
The total number of places in the result String (including the number before the decimal comma) is determined by the precision specifier in the Format-String.
If there is no specification, the default precision to 15 places is used.
A plus or minus sign and at least three decimal places always follow the exponent "E" in a String.
Fixed
The argument must be a floating point value (float).
The value is converted to a String according to the following convention: "-ddd,ddd...".
If the number is negative, the String begins with a minus sign.
The number of decimal places is determined by the precision specification in the Format-String.
If there is no specification, the default precision to 2 decimal places is used.
General
The argument must be a floating point value (float).
The value is converted to the shortest decimal string according to the fixed or scientific notation format.
The number of significant places in the result string is defined by the precision specifier in the Format-String.
If there is no specification, the default precision to 15 places is used.
Trailing zeros are removed from the result string.
A decimal point is only displayed when needed.
The fixed-point format is used for the resulting string, if the number of digits before the decimal point lesser than or equal to the specified precision and the value is greater than or equal to
0.00001.
Scientific notation is used in all cases.
Number
The argument must be a floating point value (float).
The value is converted to a String according to the following convention:
"-d.ddd.ddd,ddd...".
Format "n" is the same as format "f", except that the result string contains a thousands separator.
m s x
Currency
The argument must be a floating point value (float).
The value is converted to a string that represents an amount of currency.
The conversion is based on the Windows global variables for
CurrencyString, CurrencyFormat, NegCurrFormat,
ThousandSeparator, DecimalSeparator und CurrencyDecimals.
These variables are initialized with the settings stored in the
Windows Control Panel tab Regional Settings, Currency.
N.B. If the Format-String contains a precision specifier, this will override the value in the global variable CurrencyDecimals.
String
The argument must be a character, a string or a PChar value.
The String or, as the case may be, the character, is inserted instead of the format identifier.
If the Format-String contains a precision specifier, this will determine the maximum length of the resulting strings.
If the argument is a string that exceeds the maximum length, the string is truncated.
Hexadecimal
The argument must be an integer value.
The value is converted to a String comprising of hexadecimal digits.
If the Format-String contains a precision specification, the resulting String must have at least the minimum number of digits.
If it has less digits, the String is padded to the left with zeros to reach the minimum length.
Define the formatting rule in the In the field Computation to specify a computation formula, for example *10.
The placeholder for the value in the computation formula is always %s, because it is passed on as a string to the computation.
LookupSource
LookupDefault
LookupKey
Object to be looked up in.
Default value when no value is found in the lookup table.
Key value to pass.
Note Use
%s to pass the content of the variable.
LookupValueCondition Condition evaluated after the look up.
If the condition returns the result True, the variable inserts into the text block.
If the condition returns the result False, the variable does not insert into the text block.
59
Image Variables
About Image Variables
Image variables contain the path and file name of the image or a link to the image as variable value.
This image will then insert into the text box dynamically when the user generates the document.
Examples
C:\Logo.jpg
http://www.shawnee-edc.com/images/EDC_PAGEPHOTOS/perceptive-software.jpg
Notes
If a variable contains a link value, the image inserts as a link (not embedded).
If the document created is then modified and saved, the image is downloaded and saved in the document (embedded).
Supported image file types
JPEG
GIF
TIFF
PNG
Insert an image variable
Two methods are available to insert image variables into a text block.
In Composition Studio
To insert an image variable, complete the following steps.
1. Open the text block.
2. In the Editor window, below the bottom-right pane, click Text Block Variables.
3. In the Text Block Variables pane, in the Variable Name box, type a name for the variable.
4. Select the as Image Variable check box.
5. Optional. In the Default Value box, type the path and file name of the image or a link to the image.
This value is used to populate the variable if no data field is defined.
6. Click the Insert button. In Microsoft Word, the variable is inserted in a text box that you can position freely.
7. Optional. Drag the variable to the preferred position in the text block structure to modify the order of variables.
8. Optional. In Word, modify the position of the variable if necessary.
Note Modifying the variable position in Word has no effect on the variable position in the text block editor.
9. Optional. In Composition Studio, in the Object Inspector pane, edit the properties of the
variable.
In Microsoft Word
To insert an image variable, complete the following steps.
60
1. Open the text block.
2. On the Editor Tools tab, click the Show Word Document button.
3. In Word, on the PDC tab, click Insert Text Variable > Image Variable.
4. In the Insert Image Variable dialog box, in the Variable Name box, type a name for the variable.
5. Optional. In the Default Value box, type the path and file name of the image or a link to the image. This value is used to populate the variable if no data field is defined.
6. Click OK to confirm. The variable is inserted in a text box that you can position freely.
7. Optional. In Composition Studio, drag the variable to the preferred position in the text block structure to modify the order of variables.
8. Optional. In Composition Studio, in the Object Inspector pane, edit the properties of the
variable.
Hyperlink in an image variable
If an image variable should contain a hyperlink, the variable content should be formatted as follows:
C:\Logo.jpg|http://www.perceptivesoftware.de
The variable content consists of two parts: the name and path of the image file and the URL. The two parts are separated by a pipe sign ("|"). Defining http:// is mandatory.
The link can be opened in the generated document by the key combination CTRL + left mouse button on the image.
Note The way characters in variable content display in generated documents is defined by the scope of the respective font being used. For this reason certain mathematical special characters cannot be displayed if they are not supported by the font used.
Base64 coded images
Here, instead of specifying the path to the image, you have to specify the actual Base64 coded string as the variable value.
To make sure the value is recognized as Base64, the string is embedded in an identification string as the following example shows.
ModBASE64Image*[Base64-Bildcode]*ModBASE64Image
The Base64 image code cannot contain line breaks.
Example
<?xml version="1.0" encoding="UTF-8"?>
<PARTNER xsi:noNamespaceSchemaLocation="Partner_Immobilie.xsd"
PAR_Par_Num="0816" PAR_Nachname="Bardot" PAR_Vorname="Berta" PAR_Zusatz=""
PAR_Familienstand="l" PAR_Titelcode="4" PAR_Anredecode="2" PAR_Telefon="0816
- 112233" PAR_Fax="0816 - 112230" PAR_Email="[email protected]">
<ADRESSEN ADR_Par_Num="0816" ADR_Lfd_Num="1" ADR_Gueltig="J" ADR_Typ="D"
ADR_Bezeichnung="Hauptadresse" ADR_Strasse="Hauptstraße 1a" ADR_Postfach=""
ADR_PLZ="70000" ADR_Ort="Stuttgart" />
<ANREDE ANR_Anredecode="2" ANR_Adressanrede="Frau" ANR_Briefanrede=" Frau"
ANR_Persoenlich="Frau" ANR_Adressanrede_E="Mrs." SAL_LetterSal_D="Frau"
Sal_Personal_D="Frau" ANR_Adressanrede_F="Mme" ANR_Briefanrede_F="Madame"
ANR_Persoenlich_F="Madame" />
<TITEL TIT_Titlecode="5" TIT_Description="Dr."
61
<RE_Code="220-D-986" IM_LivingSpace="200" IM_Location="Cannes"
IM_Price="1.000.000" IM_Title="Villa Konstantin"
IM_PictureFile="c:\PerceptiveSoftware\PDCSuite\data\XMLData\villa_konstantin.
jpg" />
<RE_Code="110-A-679" IM_LivingSpace="180" IM_Location="Nizza"
IM_Price="800.000" IM_Title="Villa Belle Vue"
IM_PictureFile="c:\PerceptiveSoftware\modusSuite\data\XMLData\villa_bellevue.
jpg"></Immobilien>
62
<RE_Code="132-D-684" IM_LivingSpace="230" IM_Location="Miami"
IM_Price="500.000" IM_Title="Villa Miami Beach"
IM_PictureFile="ModBASE64Image*/9j/4AAQSkZJRgABAQAAAQABAAD//gA7Q1JFQVRPUjogZ2
QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2NjIpLCBxdWFsaXR5ID0gNzcK/9sAQwAHBQYGBgU
HBgYGCAgHCQsSDAsKCgsXEBENEhsXHBwaFxoZHSEqJB0fKCAZGiUyJSgsLS8wLx0jNDg0LjcqLi8u
/9sAQwEICAgLCgsWDAwWLh4aHi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uLi4uL i4uLi4uLi4uLi4u/8IAEQgAlQDIAwEiAAIRAQMRAf/EABsAAQADAAMBAAAAAAAAAAAAAAAEBQYBAg
MH/8QAGgEBAAMBAQEAAAAAAAAAAAAAAAECBAMFBv/aAAwDAQACEAMQAAABpx6WUAAAAAAAAAAAA7X
1Zz6xrpgJAAAFnXQ6iQAABYeXC8Ry7UvtjGnYu+AqdXcdufzxusd0rGbmZW3zpc6S0YLv9AyNX0X5
V9XqOHT503OW08699C86zgUvVWrip+zp/P0e0Wx5+b9HOtM+kwV1zn7vTxxttPs5iZTXdLyvYYLe4
HtS81GW1XO0Dyq4to3vzj6P81h9LoNBnqXjS4cu1eLinuKziLWn0XmafNxz4uutTH1/k09nkmml1q fniG/zFONzN+com40eETH0fOZtE/Qfb5whr6CDNrbWxKaXxtxaK00VHXe1otKH19TQMK618ho5gAA
AAD0qtbCP28D1JXh17681nC7drxD85kaHWbA7RNM5ehlijrAAAAAC8rdPg08end52tzxyeB2mLVEk
TXuJZddNfHCj0sgAAADngW1jmLfDp0A83WjyOLVjyuO8T6cS0xF7SBTID0MmfG7gAAAAAtaq14dNE
PG9AB269ieL0AzDh62LPjvzAAAAAWhn66Tk8feBx6CJ/UvTxjkWzo9jF//EACsQAAICAQMCBQQCAw
AAAAAAAAIDAQQFABESMDMQEyAhMhQVIjEjNCRDYP/aAAgBAQABBQL/AIuIkpDFWSi3VOrPRClaOJj aegFUzg0MDX61hhgrdyxFZN639VPQD5x22dz11V8z25aNTJmwEwFKqlQvSt4WKaBufbKmm4pExKWQ
9GKUMTjaerVXjdVi64iWMqTFqqVV4/D7dV1YxaZCnWOy0MZVGGYusUPQaXVsWECePpQABwiP1oULf rEOab8qw1VYbYY3jltVPN8jjH3rIsJVSLNiNYoydduLY1GPqvrTmI/hj4Hbs+ePuOKiIjMvassQ5j
UXBicjZKV16rWsJf68Ldjy04X+zmv6eDAeF65NWazJanfbNZJZNqRWsTrFCSbtuXCj6zJatOuHEdu azyePsOIKCHMpYc4geKbhRGRsjLK9Kq8rDFkvW+/hfqb1cY9aHZK4h9bHW/piLIU9gyladXbEHcRl
UkM5GpGrdqDuIyqCH7jU1krarEryVXb7jU1bygyFOyVVhZGuxKryK9eOFo6+TDjORq6fdm0abNEV2 bH+SGTrSHWiJKYrM0ioZaq1eRAlcxdCAepfECgVggA1NTzNGHGetT22IoGBaK1bzoATM24mTj20f4
6Hbc3gAN/fVD5gMskNwmNonffSpkFN5uOFOjUpdqFsjRxGnR79WqmNeSvUCMeM94vYvRlB/PqIX5j
NuLPQfz/2JL8BKC8bIw1PUq2ASKneczxP3JPuIxucqjfyz1xbri3VqyyvPVoT+fjMb+Ad30ZX59Wh
3fSHd9GV+fVod30h3fRlfn1aHd9IR/Jt4c9S/bWRPmz/xAAlEQACAgEDAwQDAAAAAAAAAAAAAQIRA xIgIRATMgQwMUFCUXH/2gAIAQMBAT8B91K/b7cquukU0jS2OLRoYotmlolGxxaO2xRbMOG5cjVmaK
1C8RLi2P6J3ZH4LVUSH8o51H7PT5Eo0yzLbkauKFNocmzWxSY5tncZGOSfMUPUlyfwTbHKTNb3rkW btR0IlqkaGKDojBtmW1Lf6eH5dV1nC3vw5XenpJWhcIssyTalvw+a3ZfLfi8luy+R/8QAKBEAAgEC
BgIBBAMAAAAAAAAAAQIAAxEEEhMgITEQMwUiIzAyQlFx/9oACAECAQE/AfylgO4DfrbcHaMTSLZb8
+HYM95qqoi1A011hqqBBVDSm4XuCopF5rrGqAC8xuNCU7DsxaxUz4+u+jzGH3Iz/VlAi9mUbZeZU/ fiBTe8pW5vB0YSMgn9T5SgzNmXkQIephlVaQENMFs0akGN4tIA3mgsNJSLRaIBvNBY70qQsxg0yeD
P9hCgRUpqYKSnrexsI+H131GNooRJqLGqAmNUFuJRtkFt+Lq/xHk+aWJyLbfiaK5S3hTYw8nzRooV ud+J9Z3Yb1jfifWd2E9U/8QANxAAAgECAgcGAwYHAAAAAAAAAQIAAxESISIwMTJBUXEQEyAjM2GBk aEEFEJSYnJAQ2BjgpKi/9oACAEBAAY/Av6LAAuTLkqsXGQcXLVXFI294Ry1N7iZjsufwid5a8Q4MO
HUr1nwj/uOoz2CcrcRMziExFbRaiLZivOYKguJQooui18Wc3D855ZKmdxbTvaebdmnpfWfd6PGeZd zMkw9DEUm6k5GDpCSlyfeE0dFphGQG8ZmpbqZoAoYaLDPh7wNXuW5Qk07Ae8wLlftIqjREKPUJULs mKmxU32iBg7tU4T+Z/tE771OMJ/TeOyGzT13+cL1DibDClJsJMbvKgZTwlI/3BB0hPfNvQGVz+uU0
RyoPKN3jYrHbPsplR12hYe8qs3teX7TTQ6T7ekb9s/yEqVPxXtFHdF7xahTATwnVI6oLmei/wAoUq
DCxWE0Bd56X/Mpj7QmFcYtPhCBSbNoBK1vzym6qSoyNox4Ez7KJURdpWKDTZRxM0t383atRR5ijOF
6hsLTBTbSvGDi6N9Jctf4Q3uvKd/RbZsnmgo09SfeKN8uc8y6NPVlLu76LXMALEdRPUhSgMz+IzEM
14iOBcMRsMVBdnjV69bAw2CYa4IP5p6l/hBSpgrTGZ94Ffe4wvQY4OEGM2PEa+wE4S94xa0ps6g7V ygAXLlDcXMcgZ7JprfK8x0tnIy2vPObc4gXNxxl2F+spuFsrcjxi3OkuXWftgTjLE7xzhRN7ZLa4Q
KuVhmYELaDb0N9vtNxj8IyMDc7sS4UPPTyvc5zOm15mj/KC+0+2yX12mOF5uzJR2r0mIbQLzLwA60
CKv6fCkHSWtmuXgI4606F2mK1svARiZbC+XGY23jBLhiDPVaZVfpN8fKAZNf21xHgz7F8KdNceniX p4U6a49PEvhXp/CL27Ju/Xs//8QAKhABAAICAgAEBQUBAQAAAAAAAQARITFBUTBhcZEQgaHB0SBAs eHw8WD/2gAIAQEAAT8h/wDFuWRQEAeQmDOeV6P++DvBKQHbCM7tU+DUQc0wS4IqkqUktVIge8Aisb
PO7r8eD9D/AJmj/dT/AHO/Ap0c0qMZ4EPtZI5JnUXMNbZl7lt4ai/CwLT/AL2Kun5sm4OvCq+UXRF
FYeYoICtBLYY8xbojMRdpKAF+/BYQX2cVVQUU9F4Z/CrEOjvaRj5gGWUOqHoUWloJWkl2KGgZO9EF
Ax8vhmEC91MCDCcEa0TLIF4lIykELPePzLKtUgapr3qmuMA9Zi1lsJPCtsD7ynqEIhgLhhPLPvTFo
4iUBeNxWHJcMBlcIUCtquWKKsUeRmb7MkNQHN9oG3Z+Owx+TT46nKi+UQRd6Oon7k+JWh6D2mistd
5iFF0ZY4gw5w8PUH5wD5Ew5miMj45TG4LDgqebQyx6nQlbFdnmPJzDutwQiRc2Klmi+iA0R9I/V1F
36z3yxHSV1LdGlqoLptVtRQD5IzKI1Y2QqrAtXJCBzB2QS8/QgFRQpEBV5HJEOHtBhvcEWwwqCBdf aMuorRXpKI2Y7yOy1KJW0TIGLhRtOolMC4oWMCWLyEZGJLuk0EuBNUFE/KK6KaLp8e+JeiKLaeUsw
DNZ5iXU3Reo7ntNNOJXKxYL2ATo/LDYK1jqiGeV6ka4345OCXFjDAwJtjoP3lZiebfaFmwMxXeD2T pfDZMN7Bfz4mQqQZ6vmBUlZvpLLwYPEfBXPjc3uIa5AekaAvwvLFfR8q6JxHzWXpbY84sE9N7iZdt
AMxmVLb3Egr1ykJhguRVnohlWnnxmnK0ecB19U0wlBo+GFnLjR4EgiXo6+FzcpGUJ4rAEoAfpC69l
63
+0YGtcrh5cRRCxOE+DiDosFmPF2pMXep16R+i1xKwIKNzyvUp3kz1QQnV9D8T+9myrKut5YpBeaeM
3UC/wBACgJ5/D6R/c5n1z9zGfTP7NtvpKlSpUqZq+GeqJUaf2mZJBxVfif/2gAMAwEAAgADAAAAEP
PPPPPPPPPPPPPvfPPPMfPPPPfrn+/cP59tc41TJT59UlP9GQ3uAznTfTrjyF8S3jPPPPPPPwthLij
/ADzzzzzE8odtjLzzzzyzj6/r64/zzzzzyn777zwHzzzzzyKACN/wL//EACARAQACAgMAAgMAAAAA
AAAAAAEAESExECBBMIFRkfD/2gAIAQMBAT8Q+VNCIjT1RN9U8iuKSbl5ubiElEI5rGrUUrhQojm6E
GLWNtN4lK+k8k33HEDL4rgBY+Q/CapN/uVq4HsEQAqCUwkJsgFPArYalICljq9vYxnRlhMpwnc2qY gtPf72W7qC6IdWZYYEgad7FX1zuxK4Wyu6T44SgagwS3BYX8Qdc7PizqEJvn//xAAkEQEAAgIBBAE
FAQAAAAAAAAABABEhMXEQIEFRMGGBseHwkf/aAAgBAgEBPxD5d2qAL07TEHtUg08XBvMvDUBAGpfV
EGoaXzG6NxVh0PEy1mBk7jPDgPp7Zbink/DuICnbXEKhXqaAZb7DM7Dc1cOIstJkh+FCh5Y++v3PD
EMHiNcMwN7DPMALctjcpyKNwkvEoyPsZRIX7cwLbgPzBvGYajKsrg5ZmJBLWO+2ZYsD439P8hNDmI bYNpwQyV8BKgbmX00IPQh9e8Qbv99DuS4skolQuGfv3/25Opv4p/Tnqb66p//EACoQAQEAAgEEAQM
EAgMBAAAAAAERACExQVFhcaEwgZEgscHwENFA4fFg/9oACAEBAAE/EP8A4sqxBqq5YkFsqe8fKlbt aW/h9EFAVWAdcEKRaxMCEGS7jH6AKw2uFEKd1O+ThlhHnLxLs5Cai+i6v4cd2wqyr5wnLBOX0Q/qe zPhMf3Hf9DvrBeNYNxFwif76acuhgQI/TOcjQBDK+sscEgNBdLjmcpVU42YEvakoSbuuuK/L/75pM my7ebiq4QPC2X11xaqNDH1MRgPsCfOTW3GZeavTJ7j2OngMdOSBCfOP4UQlg0+cBbhB8YtjsUiteu
E6pb1u0eMYX2VOPb3ghDzuPtZh5D6Wl8jrHZClDReE/vRw5ZEPg65yigEUk++XoqO86BerLmqRDjh
/hvnb8T7Me5vfwSazhCPBjc2qHOLxOmGG23ofDh2s0FRdKHHiY0BSH4b843WxvNAZkbnfeTinc0rj
7XBZOWynczZmZbZzs94ogjj4TCQOQp+MAcJi4CJMfmhr7mHegM8LiAtexEAv3cILXmqJw4KZ2HXMa fu440R+yDMgZikjG8ey5YZbOpP83XH2clsXzH8581+5nJ/bnK+ABU2Bde78ZIGV0Dw4d4OCFVrsnY
95XcEqdXf+M3uczyALPtnYuNx++I/pGXnxjt5EK2twpuYhDmnP/eaB9FFGu70XConM/tmzDI0i91x
WBTT6MAEXQ6xVME8vJNI31p3jjUUNlBt48mAlBVrwLD9nDRDdZVEMWN6GIHjvuZLIZOHmFOjvyecK vvFzhBODyc02ELaX5BXF9lKVumMJ81NC3JsLeiLs7879GQ5pRWn5w3UmWe9DjNqxViAcmCspAKvce fjNZfFbkjb5Cpbq8YAmzWbe48/GDW/pYMEJIieN4KEC0dPC5ti9PEI1PUD1HVyd+6Gep6OE3QyNSc l74TSRnBd31MFi3YZsj7uO2l3sPw4t8gS4hkVmGOPB168ZbZtsc3XD2mAmy8NCC6fNwsa+Ohs8n1z
DnwFzbx7nCKEickFQ/HPxgpbIChPAl8/bBBwxI22g88/GBWVI6GhTEYOCPVdH5yCDUztXa/E++Jrd
XL5Wnlf2xWjKcAZad+euIgoZrv9dTZbynTHkISjl6YVFLJVYieUXWc210Rh3Aw/GC3S0gl6HlvwYJ
+5OStPwlyYSmScxp+ZjNncZaIpPEJiIsMSMGj1XJsSx7K7bkyYAbcxKe7z9/rQgKchyUBkJTQ1zcF
YCBzOi8zv4uD1SgeABOmUN5poD5MRgDpa6XwBMJDhG2BXAEpQdBwRfWPUJbDW/OCU2nKvSXNIMXAj
XI7FfeEJuoBL/ePrQyAEGQqfxhPU7uBZ6Aw4Afb/AAzohj2P/ZgerIHWLrATUqu5ip3yTSz3mhsH7
ZKQV0aXj+Pq0iFLnRUQXsP/AL+lNNRv4XDt6C+/OKfSQ57h9s6kMKHIYgVYY+drqmch7+ozUvG8ri
OVgG+Cf2GEOxqW3rfn9EEQDEjTV9nzktS3ogdQ6HX74bmpu7YpMRFZTIEHCDG4SnwT+0xCBlzu/Jc
RM8GgXw7+sknMXtn+v0eCECmAAAAHAdMr+3x/ww+Z/VGy3+F/StU4+s+U/Vyf7z9Lp9vrFGPHCuue
2e2e2FauV6RonjP7TJLblCbTHAVO/wD0yhEkAt6M/9k=*ModBASE64Image"></Immobilien>
</PARTNER>
The following constellations regarding image files are not supported.
Specifying a Base64 coded string in the dialog for manual variables, if the image variable is defined as a manual variable.
Specifying a Base64 coded string as a default value for an image variable
64
Dynamic Charts
About dynamic charts
Dynamic charts draw charts at runtime depending on the given data and insert them in the document.
data points.
Predefine a dynamic chart
To predefine a dynamic chart, complete the following steps.
1. Open the text block.
2. In the Editor window, below the bottom-right pane, click Text Block Variables.
3. In the Text Block Variables pane, in the Variable Name box, type a name for the chart container.
4. Select the as Image Variable check box.
5. Click the Insert button. In Microsoft Word, the chart container inserts as a text box that you can position freely.
6. Optional. In Word, resize the chart container and modify the position.
7. In Composition Studio, in the Object Inspector pane, in the General section, click the
ChartDefinition property and click the ellipsis button next to the property.
8. To update the ChartDefinition properties, complete the following substeps.
1. On the General tab, set the properties.
2. On the Area tab, add one or more areas and set the properties.
3. On the Series tab, add one or more series and set the properties.
Note The Chart Definition editor uses random values to depict the appearance of the chart.
4. On the Legends tab, set the properties
9. In the Object Inspector pane, assign a script to the BeforeInsert event.
10. In this script, assign the data points to the chart.
For more information, refer to "About the context TextVariable" and "Sample Script: Generate a
Chart".
Chart properties
General tab
Property Meaning
Title Chart title, font, and color.
Position
Alignment
Shadow
Gradient
Title position.
Title alignment.
Shadow offset and color.
Gradient style and color.
Gradient Style Meaning
Center Gradient from the center outwards.
DiagonalLeft
DiagonalRight
HorizontalCenter
Gradient diagonally from left to right.
Gradient diagonally from right to left.
Gradient horizontally from the center outwards.
65
Border
Dpi
LeftRight
None
TopBottom
VerticalCenter
Gradient from left to right.
No gradient.
Gradient from top to bottom.
Gradient vertically from the center outwards.
Border line style, width, and color.
Border Line Style Meaning
Dash Dashed line.
DashDot
DashDotDot
Dot
NotSet
Solid
DPI of the chart.
Line with a repeating dash-dot pattern.
Line a repeating dash-dot-dot pattern.
Line with a repeating dot pattern.
No line.
Solid line.
Area tab
Property
Chart Area xAxis
Alignment
Format yAxis
Alignment
Format
Display 3D
Rotate X
Rotate Y
Set xAxis Min /
Max xAxis min value xAxis max value
Interval
Meaning
Chart area.
X-axis title, font, and color.
X-axis alignment.
X-axis format, such as 0.00 $.
Y-axis title, font, and color.
Y-axis alignment.
Y-axis format, such as 0.00 $.
Displays the chart in 3D.
Rotates the chart at the X-axis.
Rotates the chart at the Y-axis.
Use the settings for minimum and maximum value and interval for the X-axis defined below.
Notes
If you select this option, data points outside the range of the minimum and maximum values do not display in the chart.
If you do not select this option, the width of the X-axis scales automatically.
X-axis minimum value.
X-axis maximum value.
Value interval for the X-axis.
Series tab
Property
Series
Type
Meaning
Series.
Series type and color.
Note Not all series types are combinable.
66
Series Type
Area
Bar
Meaning
Area chart type.
Bar chart type.
BoxPlot
Bubble
Candlestick
Column
Doughnut
ErrorBar
FastLine
FastPoint
Funnel
Kagi
Line
Pie
Point
PointAndFigure
Polar
Pyramid
Radar
Range
RangeBar
RangeColumn
BoxPlot chart type.
Bubble chart type.
Candlestick chart type.
Column chart type.
Doughnut chart type.
ErrorBar chart type.
FastLine chart type.
FastPoint chart type.
Funnel chart type.
Kagi chart type.
Line chart type.
Pie chart type.
Point chart type.
PointAndFigure chart type.
Polar chart type.
Pyramid chart type.
Radar chart type.
Range chart type.
RangeBar chart type.
RangeColumn chart type.
Renko
Spline
SplineArea
SplineRange
StackedArea
StackedArea100
StackedBar
StackedBar100
Renko chart type.
Spline chart type.
SplineArea chart type.
SplineRange chart type.
StackedArea chart type.
StackedArea100 chart type.
StackedBar chart type.
StackedBar100 chart type.
StackedColumn StackedColumn chart type.
StackedColumn100 StackedColumn100 chart type.
StepLine StepLine chart type.
Stock
ThreeLineBreak
Stock chart type.
ThreeLineBreak chart type.
Label Series label, font, and color.
Is visible in legend Series label displays in the legend.
67
Width
Drawing Styles
Series width.
Series drawing style.
Drawing Style Meaning
Cylinder Data points show as cylinders.
Emboss
LightToDark
Wedge
Data points show with an embossed effect.
Data points show with a light-to-dark effect.
Data points show with a wedge effect.
Default Data points show flat.
Legends tab
Property Meaning
Legend Legend title.
Position
Alignment
Legend position.
Legend alignment.
Use Legend Show the legend.
In Chart Area Show the legend in the chart area.
68
Assign a data model
Assign a selection to the text block to populate text block variables with values from a database table or
XML file.
To assign a data model to a text block, complete the following steps.
1. In the Editor window, below the bottom-right pane, click Data Model.
2. From the Navigator, drag the required selection to the left-hand pane of the text block window. The selection displays in the upper-right pane of the text block window.
Note If the text block already has a selection defined, this operation overwrites the link.
3. In the upper-right pane of the text block window, click one of the data objects in the selection. The variables of the data object display in the bottom-right pane.
4. Drag the variables of the data object to the appropriate text block variables.
5. Optional. To remove an existing data link, right-click the variable or the text block and click Remove
Data Link.
6. Optional. To delete the value of the AttributeName property, right-click the variable and click Reset
Attribute Name.
Insert a child text block
To insert a child text block, complete the following steps.
1. Open the text block the child text block is to be inserted in.
2. From the Navigator, drag the preferred text block to the Editor window.
Note If required, you can insert the same text block more than once.
3. Optional. In the Object Inspector pane, edit the properties of the child text block.
4. Optional. Check the position of the child text block in Microsoft Word and modify the position if necessary.
Note Right-click the text block, then click Select in Word to highlight the reference to the selected text block in the Word document.
5. Optional. To modify the status of the text block, in the Editor window, right-click the text block and select one of the following menu items.
Required. Sets the value of the TextInsertionRule property to required.
Activate. Sets the value of the TextInsertionRule property to activated.
Deactivate. Sets the value of the TextInsertionRule property to deactivated.
Disabled. Sets the value of the TextInsertionRule property to disabled.
For more information, refer to General text block properties .
6. Optional. In the Editor window, right-click the text block and click Inherit Attributes.
Note If this function is activated, the text block in the document inherits the properties of the original text block.
For more information, refer to Activate inheritance .
Insert a picture
Make sure the picture file has the preferred image size before you insert it.
To insert a picture, complete the following steps.
1. On the Editor Tools tab, click the Show Word Document button.
69
2. In Microsoft Word, on the Insert tab, under Illustrations, click the Picture
3. In the Insert Picture dialog box, select a picture file.
4. Click the Insert down arrow, then click Link to File.
button.
Apply text block and variable properties
If you have altered properties of a text block (or of one of its variables) already in use by a document or another text block and you now want to transfer these changes to all or some objects that use the text block, complete the following steps.
1. Open the text block from where you want to roll out property changes to text block references.
2. In the Editor window, select the root text block or a text block variable.
Note If you select the root text block, the Text Block Properties Wizard guides you through the following steps. You can only configure the properties application of the selected text block.
If you select a text block variable, the Variable Properties Wizard guides you through the following steps. You can only configure the properties application of the selected variable.
3. On the Editor Tools tab, click the Apply Properties button.
4. In the Wizard, on the Objects Selection page, complete the following substeps.
1. Select the text blocks and document templates whose child objects you want to update with the altered properties. To select or deselect all objects, right-click a check box and choose the appropriate option from the context menu.
objects with property AttributeInheritance=True.
Locked objects entries are disabled. The locking user is indicated in the Note column. To verify an object has been unlocked, on the left top of the object list, click the Refresh button.
2. Optional. To determine the creation of a new work version, behind an object, select the New
Work Version check box. In the New Version Label field, enter an optional version label.
Note These actions require an installed versioning license.
3. Click the Next button.
5. In the Wizard, on the Properties Selection page, complete the following substeps.
1. Select the properties to roll out. To select or deselect all properties, right-click a check box and choose the appropriate option from the context menu.
2. Click the Next button.
6. In the Wizard, on the Summary page, complete the following substeps.
1. Inspect the selected objects and properties.
2. Optional. To adjust your selections, use the Back button and the Next button to navigate to the previous pages and back to the Summary page.
3. Click the Finish button.
7. In the Wizard, on the Result page, inspect the indicated result.
8. To close the wizard, click the Close button.
70
Multiple Text Blocks
About multiple text blocks
Use multiple text blocks to model 1:n relationships in data structures in text blocks.
This enables you, for example, to insert several different bank account details in a document.
Notes
You cannot use a variable text block as a multiple text block.
Even with the property Multiple set to True, the text block only appears once in the document structure.
XPATH is not suitable for use with multiple text blocks.
When executing an XPATH expression, the following behavior displays.
If multiple nodes exist in the data XML that match the specified XPATH expression - as is usually the case with a multiple text block - the value of the first node found is always used as the value of the variable, whether it is the first or n-th iteration.
Solution
For variables of multiple text blocks, set the DataSource to DataModel and specify the corresponding
data link and attribute name.
Define a multiple text block
To define a multiple text block, complete the following steps.
1. Open the text block.
2. In the Editor window, below the bottom-right pane, click Data Model.
3. From the Navigator, drag the required selection to the left-hand pane of the text block window. The selection displays in the upper-right pane of the text block window.
4. From the upper-right pane of the text block window, drag the preferred 1:n node from the data structure onto the text block. The Multiple property changes to True.
When generating a document, the text block is inserted for each account found in the data structure.
Multiple insertions of a text block using a script
You can insert a text block as often as you want using a script.
To do this, complete the following steps.
1. Open the text block.
2. In the Object Inspector pane, complete the following steps.
1. Set the Multiple property to True.
2. Set the DataSource property to None.
3. Assign a script to the BeforeInsert or AfterInsert event.
3. In this script, set the Blockpool.Break variable to False.
4. To signal the end of insertion iterations, set the Blockpool.Break variable to True.
Note If you set the Blockpool.Break variable to False, be sure to reset the variable to True at a later stage. If not, the script runs in an infinite loop.
The following example shows when and how you insert a text block multiple times using a script.
Example
Insert a text block a predefined number of times
71
1. Open the document.
2. In the Object Inspector pane, assign a script to the Load event.
3. In this script, set a SYSTEMPOOL variable.
Example
System.Counter = 0
4. Open the text block.
5. In the Object Inspector pane, assign a script to the BeforeInsert event.
6. Modify the script according to the following example.
Example
Blockpool.Break = False if (System.Counter < 10)
System.Counter = System.Counter + 1 else
Blockpool.Break = True end-if
72
The Content Control EmptyLine
About the content control EmptyLine
The content control EmptyLine enables you to define an area in a text block or document that will be deleted on document generation if the variables contained within the section do not have values after data retrieval.
You can apply this practice to a single line, to several lines, or just to parts of a line.
If the content control contains an active text block, the whole content of the content control is visible.
If the text block contained in the content control is deactivated and none of the variables have values, the whole content control is removed from the document on generation.
Activate the Developer Tools in Microsoft Word
In Word, check if the Developer tab is available. If not, perform the following steps.
In Microsoft Word 2007
1. Click the Microsoft Office Button > Word Options.
2. In the Word Options dialog box, click Popular.
3. Select Show Developer tab in the ribbon.
In Microsoft Word 2010 and 2013
1. On the File tab, click the Options button.
2. In the Word Options dialog box, click Customize Ribbon.
3. In the Main Tabs list, select the Developer check box.
Insert an EmptyLine content control
To insert an EmptyLine content control, complete the following steps.
1. In Microsoft Word, position the cursor to the place where you want to insert the content control.
2. On the Developer Tools tab, in the Control Elements group, click the Rich Text button.
3. On the Developer Tools tab, in the Control Elements group, click the Properties button.
4. In the Content Control Properties dialog box, in the Title box, type a title.
5. In the Tag box, type mc:EmptyLine, then click OK.
6. Drag one or more variables into the content control.
Alternative method
1. Select a text segment that you want to enclose in the content control (including the final paragraph mark)
2. Create the content control as described above.
Variable pools
Variable pools can be used, for example, to store the results of calculations.
They can also be used to pass variables on to connected systems such as Odin.
The Pool MODUSUSER provides user-specific information.
73
The Contextpool BLOCKPOOL provides access to text block variables.
The DOCUMENTPOOL provides access to document variables.
The SYSTEMPOOL is available to bundles.
Typing Poolname.NewVariablename in a script creates a new variable.
74
Variable Text Blocks
About variable text blocks
Using scripts and conditions you can control whether a text block is inserted into a document.
In some cases, the text block to be inserted can be directly linked to a value in the data.
Example The text block to be inserted depends on the country of the recipient.
So that you do not have to predefine all text blocks that might possibly be required in the document structure and then activate or deactivate the required text block by way of conditions, it is possible to define a placeholder text block. This placeholder text block is replaced during document generation by the required text block depending on the data content.
Notes
To detect any variable text blocks that were not found, check the MissedObjects bundle property in a script. The content of MissedObjects is cleared before every document generation.
In general, the scripts assigned to the BeforeInsert and AfterInsert events of the placeholder text block are executed.
If no scripts are assigned to the placeholder text block for these events, then the scripts of the inserted text block are executed.
You can insert manual variables contained in the placeholder object in the input dialog box for manual entry and use these variables in scripts of the placeholder objects.
However, the variables are not inserted into the generated document.
You should not use manual variables in the text blocks to be inserted, because the input dialog box for manual entry does not display for variable objects.
However, the variables are inserted into the generated document.
Define a variable text block
To define a text block object as a variable text block, complete the following steps.
1. Open the text block.
2. In the Object Inspector pane, right-click the VariableObjectDefinition property and click Create.
3. In the Object Inspector pane, in the Object Definition section, click the plus to the left of
VariableObjectDefinition.
As a result, the following additional properties display below the object definition.
AttributeName
DataLink
DataSource
LookupSource
LookupKey
XPathExpression
Note These properties define the data field that contains the name of the text block to be inserted.
For more information, refer to Variable Properties .
4. Perform one of the following options.
In the Object Inspector pane, in the Object Definition section, type a value for the properties
AttributeName and DataLink.
Perform the following substeps.
75
1. In the Object Inspector pane, in the Object Definition section, click the XPathExpression property, then click the ellipsis button next to the property.
2. In the Open dialog box, select an XML file.
3. In the XPath Evaluator dialog box, in the Sample XML tree box, right-click the variable that you want to assign to the text block variable, then click Copy XPath.
4. In the XPath Expression box, right-click and click Paste.
5. Click the Evaluate button.
6. In the XPath Result box, check the result.
7. Click the Apply button.
5. Select a value for the property DataSource.
6. Optional. To define an alias table to look up the value retrieved, use the property LookupSource.
For more information, refer to Create an alias table.
76
Attribute Inheritance
About attribute inheritance
Modifications to a text block have no effect on the properties of the same text block when it is used as a child text block in a document or a parent block. A text block may possess different properties for each different usage. Only the structure of the text block is reused (that means text block variables and nested text blocks). Text blocks that inherit their properties are the exception to this rule.
The following rules apply if inheritance is active for a child text block.
The child text block symbol shows in red.
You can no longer modify the properties of the child text block.
The child text block always uses the properties of the original text block.
Activate inheritance
To activate inheritance, complete the following steps.
1. Open the document or the text block that contains the child text block.
2. In the Editor window, right-click the child text block that should inherit its properties and click Inherit
Attributes.
77
Property Transfer
About property transfer
You can transfer properties both between text blocks and between variables. Possible target objects are any objects of the same type at all levels.
You can transfer between objects inside the current object window as well as between any other object windows open. The objects must be of the same type.
Transfer properties
To transfer properties between objects, perform the following steps.
1. Press CTRL and drag the object whose properties you want to transfer onto the target object.
Note To arrange two opened text blocks side by side in the Editor Window, drag a text block tab into the center of the Editor Window, onto an arrow element of the Docking Manager.
2. Complete the following substeps if you selected text blocks with the same object IDs as source and target object. Only in this case the Selection dialog box appears.
1. In the Selection dialog box, select one of the options to specify the transferred items.
Only text block properties
Only properties of the text block variables
Properties of the text block and its variables
This option combines the two preceding options.
Properties of the text block and its child objects
This option equals the preceding option and extends it to all child objects of the text block.
2. Click the Apply button.
78
Reports
Generate the "Structure of a text block" report
Document Composition allows you to document the attributes and variables of a text block and its child text blocks as a DOCX file, using the DOCX file specified in the configuration file PDC.Studio.exe.config as a template.
To generate a text block structure report, complete the following steps.
1. Open the text block.
2. On the Editor Tools tab, under Reports, click the Generate report "Structure of document/text
block"
button.
3. In the Report Creation dialog box, select a file or type the name of the report file.
4. To generate the report, click the Save button.
5. In the following dialog box, decide whether to open the DOCX file immediately.
Generate the "Used data connections" report
Document Composition allows you to save used data links of a text block as a CSV file.
To document the used data links of a text block, complete the following steps.
1. Open the text block.
2. On the Editor Tools tab, under Reports, click the Generate report "Used Data
Links"
button.
3. In the Save Used Data Links Report dialog box, select a file or type the name of the report file.
4. To generate the report, click the Save button.
5. In the following dialog box, decide whether to open the CSV file immediately.
Note When the report is saved as a CSV file, a special character separates the cells of the CSV file from each other. To determine this character, Document Composition uses the list separator specified in the
Regional Settings section of the Windows Control Panel. We recommend not to change this setting.
79
Text block properties
Conditions
Property Description
Condition If a condition is assigned and returns the result True, the text block inserts into the document.
If the condition returns the result False, the text block does not insert into the document.
For more information, refer to Assign a condition to an object.
Data Model
Property Description
Selection Stores the associated selection.
Events
Event
AfterInsert
Description
The script defined here runs after the text block inserts into the document.
Context: TextComponent
BeforeInsert This script runs before the text block inserts into the document.
Context: TextComponent
General
Property
AttributeInher itance
Expandable
DataLink
DataSource
Multiple
Visible
TextBlockPro tection
Description
Can only be modified through the context menu of a text block during document editing.
For more information, refer to Inherit Text Block Attributes .
Defines if the user can see the text block structure and is allowed to activate or deactivate its objects.
Path to the data object.
Value
None
Description
No data assigned.
Pool Data retrieves from the pool assigned variable.
Data Model Data retrieves from the assigned data model.
Linking to a data object also controls the number of times the object is inserted.
If no data exists in the address specified, the text block does not insert.
XPath
Data retrieves from the expression defined in the XPathExpression property.
This returns a number of nodes that determine how often the text block inserts.
Is set automatically dependent on the assigned data object.
TRUE = 1:N relationship.
FALSE = 1:1 relationship.
For more information, refer to Multiple Text Blocks .
Defines whether the text block is visible to end users.
TRUE = Users cannot make any modifications to the text block.
FALSE = Users can make modifications to the text block.
80
TextInsertion
Rule
Title
Default inheritance value
XPathExpres sion
Value
Activated
Description
No abort is forced if the text block cannot be inserted during document generation.
Deactivated The text block is deactivated and the user cannot activate it.
Disabled The text block does not insert into the document.
Required Document generation aborts if the text block cannot be inserted.
The name of the text block the user sees in the client.
Value Description
True The text block inserts into a document or another text block with the property
AttributeInheritance=True
The properties of the inserted text block always correspond to those of the original text block and the user cannot modify the properties.
False The text block inserts into a document or another text block with the property
AttributeInheritance=False
The user can modify the properties of the inserted text block.
For more information, refer to Inherit Text Block Attributes .
To assign an XPath expression, complete the following steps.
1. In the Object Inspector, click the XPatchExpression property and click the ellipsis button next to the property.
2. In the Open dialog box, select an XML file.
3. In the XPath Evaluator dialog box, in the Sample XML tree box, right-click the variable that you want to assign to the text block variable, then click Copy XPath.
4. In the XPath Expression box, right-click and click Paste.
5. Click the Evaluate button.
6. Check the result in the XPath Result box.
7. Click the Apply button.
Examples
Adding Values with XPath
The function Sum returns the sum of all values of a node.
Note The comma character is not recognized, that means a dot (decimal point) must be used as the decimal separator in the XML file (U.S. spelling).
Syntax:
Sum(PARTNER/ACCOUNTS/MOV_assets) sum(//ACCOUNT[1]/MOVEMENTS/MOV_assets)
// Only looks for the node ACCOUNT irrespective of the parent node, that means looks for the node wherever it is found.
There is no need to define the path to the node.
ACCOUNT[1] Only the first node with the name ACCOUNT is read.
/MOVEMENTS Child node
/MOV_assets Element (with values)
81
Several instances of the node ACCOUNT exist, but only the sum of the values of a node element for one ACCOUNT node is to be calculated.
The node ACCOUNT is only run through once, but all the child nodes (MOVEMENTS) are evaluated.
The values are read by a multiple text block (1:n relationship) in modus.
As such, the nodes all have the same structure and just different values.
The return value is a normal decimal value (for example $100.33) and therefore of the data type Double.
Other Useful Functions
Concat
()
Count(
)
Transl ate()
Charac ter: //
Allows you to combine strings to individually defined rules. Thus, contents read from elements can be combined with leading characters.
Example:
concat(Postbox ,PARTNER/ADDRESS/ADD_POB)
Return value:
Postbox 08 15
Counts the number of specified nodes found in the XML file.
This is useful for 1:n relationships, when several nodes of the same name are found
(multiple text blocks).
Example:
Count(PARTNER/ACCOUNTS)
Replaces all lower cases with upper cases in the content read from the element name.
Example:
Translate(//ADD_country_name,abcdefghijklmopqrstuvwxyz,
ABCDEFGHIJKLMNOPQRSTUVWXYZ)
Reads the content of all elements of the specified name, irrespective of where the element is found in the XML file.
There is no need to define a particular path as only the element is looked for.
Example:
//MOV_liabilities
Object definitions
Property Description
VariableObjectDefinition Contains the settings for variable text blocks.
To create a variable object definition, complete one of the following steps.
Drop an alias table on the text block.
Right-click the VariableObjectDefinition property and click Create.
The following additional properties come into view. These properties determine which text block inserts.
AttributeName
DataLink
DataSource
LookupSource
82
LookupKey
XPathExpression
For more information, refer to Variable Objects .
83
Documents
About documents
There are two document types available to the user.
Dynamic documents
As a rule, dynamic documents are comprised of one or more text blocks.
Static documents
Static documents are documents that, when created as an object, are imported as finished documents and cannot be edited. Static documents refer to Word, PDF, TIFF, and XPS documents.
84
Dynamic Documents
Create a dynamic document
To create a dynamic document, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Document.
2. In the Create New Document dialog box, type a name for the document and click OK.
3. In the Select Document Type dialog box, select Dynamic Word Document and click OK.
4. Optional. To add text to the document, perform the following substeps.
1. On the Editor Tools tab, click the Show Word Document
2. In Microsoft Word, type the content of the document.
button.
3. In Composition Studio, save your modifications.
5. Optional. In the Object Inspector pane, edit the properties of the document.
Dynamic document editor tools
Icon Name
Refresh
Open Text Block
Description
Refreshes the document if child text blocks or selections have been modified while the document is still open in editing mode.
If modifications have been made to the document the function remains deactivated, refresh is done on saving.
Opens the selected text block.
Define New Group
For details, refer to Create a group .
Show Word
Document
Switch View
Compile
Brings the Word document of the document to the foreground.
Splits the screen to show both Composition Studio and Word windows.
Compiles the document.
Document
Composition Client
Structure of
Document
Used Data Links
Test the document using the integrated Document Composition Client.
For details, refer to Create the report "Structure of a document" .
For details, refer to Create the report "Used data connections" .
Insert a text block
To insert a text block in a document, complete the following steps.
1. Open the document in which the text block is to be inserted.
2. From the Navigator pane, drag the preferred text block to the Editor window.
Note If required, you can insert the same text block more than once.
3. Optional. In the Object Inspector pane, edit the properties of the text block.
85
4. Optional. In the Object Inspector pane, edit the properties of the text block variables.
5. Optional. Check the position of the text block in Microsoft Word and modify the position if necessary.
Note Right-click the text block, then click Select in Word to highlight the reference to the selected text block in the Word document.
6. Optional. To modify the status of the text block, in the Editor window, right-click the text block and select one of the following menu items.
Required. The value of the TextInsertionRule property is set to required.
Activate. The value of the TextInsertionRule property is set to activated.
Deactivate. The value of the TextInsertionRule property is set to deactivated.
Disabled. The value of the TextInsertionRule property is set to disabled.
7. Optional. In the Editor window, right-click the text block and click Inherit Attributes.
Note If this function is activated, the text block in the document inherits the properties of the original text block.
For more information, refer to Activate inheritance .
Insert a picture
Before inserting a picture, ensure the file has the preferred image size.
To insert a picture, complete the following steps.
1. On the Editor Tools tab, click the Show Word Document button.
2. In Microsoft Word, on the Insert tab, under Illustrations, click the Picture
3. In the Insert Picture dialog box, select a picture file.
4. Click the Insert down arrow and then click Link to File.
Assign a data model
button.
Assign a selection to the document to populate text block variables with values from a database table or
XML file.
To assign a data model to a document, complete the following steps.
1. In the Editor window, below the bottom-right pane, click Data Model.
2. From the Navigator pane, drag the required selection to the left-hand pane of the Editor window.
The selection displays in the upper-right pane of the Editor window.
Note If the document already has a selection defined, this operation overwrites the link.
3. In the upper-right pane of the Editor window, click one of the data objects in the selection. The variables of the data object display in the bottom-right pane.
4. Drag the variables of the data object to the appropriate text block variables.
5. Optional. To remove an existing data link, right-click the variable or the text block and click Remove
Data Link.
6. Optional. To delete the value of the AttributeName property, right-click the variable and click Reset
Attribute Name.
86
Property Transfer
About property transfer
You can transfer properties both between text blocks and between variables. Possible target objects are any objects of the same type at all levels.
You can transfer between objects inside the current object window as well as between any other object windows open. The objects must be of the same type.
Transfer properties
To transfer properties between objects with different object IDs, complete the following step.
Press CTRL and drag the object whose properties you want to transfer onto the target object.
To transfer properties between objects with the same object IDs, complete the following steps.
1. Press CTRL and drag the object whose properties you want to transfer onto the target object.
2. In the Selection dialog box, select one of the options.
3. Click the Apply button.
Test a document
Test a document
To test a document, complete the following steps.
1. Open a document template.
2. On the Editor Tools tab, under Test, click the Compile pane for success or failure messages.
button, and then check the Output
3. On the Editor Tools tab, under Test, click the Document Composition Client document opens as a test bundle in a new tab.
4. Optional. To toggle the status of a text block, perform the following substeps.
1. In the Editor window, in the left pane, click the document.
2. In the right-pane, right-click one of the text blocks and select Switch state.
button. The
5. Optional. From the Navigator pane, drag additional text blocks to the right pane of the Editor window.
6. Optional. To replace a text block, assign an external document .
7. On the Processes tab, click the Create Document
8. Double-click the document to open it.
button.
Assign an external document
Use this function to replace existing text blocks in a document with external documents.
Note You can only assign an external document to text blocks without child objects.
To replace a text block with an external document, complete the following steps.
87
1. In the left pane, click the document.
2. In the right pane, right-click the text block and click Assign external document.
3. In the Select external document dialog box, select a document and click Open.
The text (external document) displays to the right of the text block.
4. Optional. To remove the external document, right-click the text block and click Remove external
document.
Note Using the LoadExternalDocument function in a script overwrites the values set with this function for the corresponding object.
Use the document preview
To use the document preview, complete the following steps.
1. On the Editor Tools tab, under Test, click the Document Composition Client
The document opens as a test bundle in a new tab.
button.
2. On the Processes tab, click the Create Document
3. Double-click the document to open it.
button.
4. In Composition Studio, in the document template Editor window, below the bottom-right pane, click
Document Preview.
5. In the Document Preview pane, click the Refresh button.
6. Optional. In the Editor window, in the left pane, select a text block or variable in the document structure.
The corresponding text highlights by a colored background in the Document Preview pane.
7. Optional. To print the document on a local printer, in the Editor window, in the Document Preview pane, click the Print button.
8. Optional. To open an external Microsoft Word document in the Document Preview pane, in the
Editor window, in the Document Preview pane, click the Open File button.
Variable Documents
About variable documents
Using scripts and conditions you can control whether a document is inserted into a bundle.
In some cases, the document to be inserted can be directly linked to a value in the data.
Example The document to be inserted depends on the country of the recipient.
So that you do not have to predefine all documents that might possibly be required in the bundle structure and then activate or deactivate the required document by way of conditions, it is possible to define a placeholder document. This placeholder document is replaced during document generation by the required document depending on the data content.
Notes
To detect any variable documents that were not found, check the MissedObjects bundle property in a script. The content of MissedObjects is cleared before every document generation.
88
In general, the scripts assigned to the BeforeInsert and AfterInsert events of the placeholder document are executed.
If no scripts are assigned to the placeholder document for these events, then the scripts of the inserted document are executed.
Define a variable document
To define a document as a variable document, complete the following steps.
1. Open the document template.
2. In the Object Inspector pane, right-click the property VariableObjectDefinition and click Create.
3. In the Object Inspector pane, click the plus to the left of VariableObjectDefinition.
As a result, the following additional properties display below the object definition.
AttributeName
DataLink
DataSource
LookupSource
LookupKey
XPathExpression
Note These properties define the data field that contains the name of the document to be inserted.
For more information, refer to Variable Properties .
4. Perform one of the following actions.
In the Object Inspector pane, type a value for the properties AttributeName and DataLink.
Perform the following substeps.
1. In the Object Inspector pane, click the XPathExpression property and then click the ellipsis button next to the property.
2. In the Open dialog box, select an XML file.
3. In the XPath Evaluator dialog box, in the Sample XML tree box, right-click the variable that you want to assign to the text block variable and then click Copy XPath.
4. In the XPath Expression box, right-click and click Paste.
5. Click the Evaluate button.
6. Check the result in the XPath Result box.
7. Click the Apply button.
5. In the Object Inspector, select a value for the property DataSource.
6. Optional. To assign an alias table to look up the value retrieved, use the property
LookupSource. For more information, refer to Create an alias table.
The Content Control CopyLabel
About the content control CopyLabel
The content control CopyLabel enables you to define an area in a document template to insert the value
of the property CopyLabel when a document copy is generated.
Activate the Developer Tools in Microsoft Word
In Word, check if the Developer tab is available. If not, perform the following steps.
89
In Microsoft Word 2007
1. Click the Microsoft Office Button > Word Options.
2. In the Word Options dialog box, click Popular.
3. Select Show Developer tab in the ribbon.
In Microsoft Word 2010 and 2013
1. On the File tab, click the Options button.
2. In the Word Options dialog box, click Customize Ribbon.
3. In the Main Tabs list, select the Developer check box.
Create the content control CopyLabel
To insert a CopyLabel content control, complete the following steps.
1. In Microsoft Word, place the cursor where you want to insert the content control.
2. On the Developer Tools tab, under Control Elements, click the Rich Text button.
3. On the Developer Tools tab, under Control Elements, click the Properties button.
4. In the Content Control Properties dialog box, in the Title box, type a title.
5. In the Tag box, type mp:CopyLabel and then click OK.
6. Reposition the control to your preferred location.
Groups and Actions
About groups and actions
and Actions restrict business user actions by way of predefined rules.
Groups
A group consists of two or more text blocks. The relationship type defines how many text blocks in the group the user can activate.
Actions
Actions define relationships between a primary text block and one or more secondary text blocks.
The status of secondary text blocks depends on the status of the primary text block.
Example
The primary text block has the status Activated.
The secondary text block has the status Deactivated.
If the user toggles the primary text block to Activated, the status of the secondary text block automatically changes to Deactivated.
Create a group
When you create a group, make sure that using multiple groups does not result in mutual exclusion. You risk mutual exclusion when using the same object in several groups. Also, do not apply a group rule that may compromise another rule.
90
To create a new group, complete the following steps.
1. Open a document template.
2. In the Editor window, below the bottom-right pane, click the Groups/Actions tab.
3. In the upper-right pane of the Editor window, right-click and click New Group.
4. To define the relationship, right-click the group and then click one of the following menu items.
Minimum one text block. At least one text block in the group must be activated.
Exactly one text block. Only one text block in the group can be activated.
Maximum one text block. Only one or no text block in the group can be activated.
5. From the Editor window, from the left pane, drag two or more text blocks to the group.
Create an action
When you create an action, make sure that the action does not compromise prevailing group logic when you combine it with other defined actions.
To create a new action, complete the following steps.
1. Open a document template.
2. In the Editor window, below the bottom-right pane, click the Groups/Actions tab.
3. In the Editor window, from the left pane, drag the primary text block to the bottom-right pane.
4. In the Editor window, from the left pane, drag the dependent text blocks on the first text block in the bottom-right pane.
5. In the bottom-right pane, right-click the text blocks and select one of the following menu items.
Activated
Deactivated
Required
Disabled
Reports
Generate the "Structure of a document" report
Composition Studio allows you to save a record of the text blocks, child text blocks, attributes, and variables of a document as a DOCX file, using the DOCX file specified in the configuration file
PDC.Studio.exe.config as a template.
To generate a document report, complete the following steps.
1. Open the document.
2. On the Editor Tools tab, under Reports, click the Generate report "Structure of document/text
block"
button.
3. In the Report Creation dialog box, select a file or type the name of the report file.
4. To generate the report, click the Save button.
5. In the following dialog box, decide whether to open the DOCX file immediately.
91
Generate the "Used data connections" report
Composition Studio allows you to save used data links of a document as a CSV file.
To document the used data links of a document, complete the following steps.
1. Open the document.
2. On the Editor Tools tab, under Reports, click the Generate report "Used Data
Links" button.
3. In the Save Used Data Links report dialog box, select a file or type the name of the report file.
4. To generate the report, click the Save button.
5. In the following dialog box, decide whether to open the CSV file immediately.
Note When the report is saved as a CSV file, a special character separates the cells of the CSV file from each other. To determine this character, Document Composition uses the list separator specified in the
Regional Settings section of the Windows Control Panel. We recommend not to change this setting.
92
Static Documents
Create a static document
Static documents cannot contain text blocks. You can edit static Word documents.
To create a static document, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Document.
2. In the Create New Document dialog box, type a name for the document and click OK.
3. In the Select Document Type dialog box, select one of the static document types and click OK.
4. Perform one of the following substeps.
To load a document permanently, perform the following steps.
1. On the Editor Tools tab, click the Load Document button.
2. In the Open dialog box, select a file and click Open.
To load a document during bundle generation, perform the following steps.
1. Create a new script.
2. Assign the Context TextDocument to the script.
3. Use the statement LoadExternalDocument to specify the document that you want to load.
4. Compile and save the script.
5. In the Editor window of the document, in the Object Inspector pane, click the Load property and then click the ellipsis button next to the property.
6. In the Select an Object dialog box, select the script that you just created and then click the
Select button.
5. Optional. In the Object Inspector pane, edit the properties of the document.
6. Optional. On the Editor Tools tab, click the Show Word Document static Word document.
Static Word documents
button and edit the
Before importing static Word documents, indicate whether to apply its existing document styles or the document template used by Document Composition.
To apply the styles of the specified Word template to the static document, complete the following steps.
1. In Microsoft Word, open the static document.
2. On the Developer Tools tab, under Templates, click the Document Template button.
3. In the Templates and Add-ins dialog box, select the Automatically update document styles check box.
4. Save and close the file.
5. In Composition Studio, open the static document.
6. On the Editor Tools tab, click the Load Document button.
7. In the Open dialog box, select the document and click Open.
93
Note With the Automatically update document styles option activated, Document Composition Web
Client will not properly display the updated styles in static DOCX documents. This limitation only affects the Web Client view. The printed DOCX documents will show the updated styles.
Static TIFF documents
Specific settings regarding page width, page height, X and Y position and scaling of static TIFF documents can be made at the bundle property level.
This is done using the function SetArchiveAttribute to set the archive variable tifflayout.
The variable is passed on to the column ODJ_TIFFLAYOUT in the table ODIN_JOB for further processing in Odin.
The Odin-Rendition component uses the settings when converting to XPS.
Syntax
SetArchiveAttribute("tifflayout", "Page Width/Page Height/X-Position/Y-
Position/Scaling Factor")
Parameter
Parameter Meaning
Page Width Width in pixels
Page Height
X-position
Height in pixels
X-Position of the TIFF
Y-position Y-Position of the TIFF
Scaling Factor Optional specification of the scaling factor defined in percent.
If no specification is made, the default factor of 100 is used.
Example
SetArchiveAttribute("tifflayout", "794.0/1123.0/0.0/0.0/90")
Static document editor tools
Icon Name
Load document
Description
Opens a dialog window to select a finished document.
Save document to file Allows you to save the static Word document as a DOCX file.
Show Word document Shows the static Word document.
94
Global Variables
About global variables
You can use global document variables in all scripts that have access to the pool DOCUMENTPOOL.
Create a global variable
To create a global variable, complete the following steps.
1. In the Editor window, below the bottom-right pane, click Global Variables.
2. In the right pane of the Editor window, right-click and click New Variable.
3. In the Create New Global Variable dialog box, type a name for the global variable and click OK.
4. Optional. In the Object Inspector pane, edit the properties of the global variable.
Properties of global variables
Property
DefaultValue
Manual
Description
Value applied, if the variable is empty.
TRUE = Manual input is possible.
FALSE = Manual input is not possible.
Variable Type Possible values
Boolean
Float
Long
String
95
Document properties
Conditions
Property Description
Condition
If a condition is assigned and returns the result True, the document inserts into the bundle.
If the condition returns the result False, the document does not insert into the bundle.
For more information, refer to Assign a condition to an object.
Notes
The script defined here is interpreted after the BeforeInsert script executes.
The condition has access to document data collected by the corresponding DataReference.
Data Model
Property Description
Selection Stores the associated selection.
Events
Event
AfterInsert
BeforeInsert
DefinitionArch iving
Description
This event is set for document references in a bundle. The script runs after the document is inserted into the bundle.
Context: TextDocumentReference
This event is set for document references in a bundle. The script runs before the document is inserted into the bundle.
If InsertObject is True after the script has run, processing continues with the evaluation of the condition.
Context: TextDocumentReference
This event is set for document references in a bundle and executes after the DefinitionGrouping event.
You can use the script to set attributes for archiving. Use the SetArchiveAttribute function to define
1-n archive attributes that pass on to Odin for each job.
The following two alternative ways of defining the archive attributes are supported.
Alternative 1
The attributes to be used are assigned in a string in the following form, for example: by building a string list and converting it to a string as an archive attribute string assigned to the Content variable.
Name=Value <CR><LF>Name=Value
In doing so, each individual attribute inserts into the archive dictionary.
Example
StringlistAdd("List", "ArchiveAttribute1=Value1")
StringlistAdd("List", FormatStr("%s%s", "ArchivCity=", SYSTEM.CITY
)
Content = String("List")
Alternative 2
All scripts executed in the context TextDocumentReference can call the SetArchiveAttribute function to insert attributes into the archive dictionary. The attributes of the archive dictionary pass to Odin for each job.
Example
96
DefinitionGro uping
DefinitionSorti ng
Load
Unload
SetArchiveAttribute("MyArchiveVar1","Value1")
SetArchiveAttribute("MyArchiveVar2","Value2")
Context: TextDocumentReference
For more information, refer to Identical archive attributes for all documents in a bundle
and Transfer data from a document to the ODIN_JOB table .
This event is set for document references in a bundle and executes after the DefinitionSorting event.
You can use the script to set attributes for grouping. A sorting criterion is defined here as a string with a maximum of 256 characters. This passes on to Odin as the Grouping attribute for each job.
Two alternative ways of defining the group string are supported.
Alternative 1
The group string to be used is assigned to the Content variable. In this way, the Grouping property of the TextDocumentReference context assigns to the corresponding value.
Example
Content = FormatStr("%s%s", "myGrouping: ", SelVariable("PARTNER",
"PAR_FirstName", ""))
Alternative 2
All scripts executed in the TextDocumentReference context have read and write access to the
Grouping property.
The content of this property passes on to Odin as the attribute grouping for each job.
As in Alternative 1, it thereby is possible to extend or overwrite a predefined grouping criterion in subsequent events.
Example of extending the grouping criterion
dummy_Group = Grouping
Grouping = FormatStr("%s%s", "MyGroupimgAdd + ", dummy_Group)
Context: TextDocumentReference
This event is set for document references in a bundle and executes after documents are created.
You can use the script to set attributes for sorting. A sorting criterion is defined here as a string with a maximum of 256 characters. This passes on to Odin as the Sorting attribute for each job.
Two alternative ways of defining the sort string are supported.
Alternative 1
The sort string to be used is assigned to the Content variable.
The Sorting property of the TextDocumentReference context is assigned the corresponding value.
Example
Content = FormatStr("%s%s", "mySorting: ", SelVariable("PARTNER",
"PAR_FirstName", ""))
Alternative 2
All scripts executed in the TextDocumentReference context have read and write access to the
Sorting property.
The content of this property passes on to Odin as the Sorting attribute for each job.
As in Alternative 1, it thereby is possible to extend or overwrite a predefined sort criterion in subsequent events.
Example of extending the sort criterion
dummy_Sort = Sorting
Sorting = FormatStr("%s%s", "MySortingAdd + ", dummy_Sort)
Context: TextDocumentReference
This script executes when a document is loaded.
Context: TextDocument
This script executes after inserting all text blocks and before the DefinitionSorting event.
97
Context: TextDocument
General
Property
Archive
Description
Specifies if the document is archived after it has been created.
This property is available to documents in bundles.
CopyLabel The text defined here inserts into the CopyLabel content control of a document copy.
This property is available to document copies in bundles.
For more information, refer to Create the Content Control CopyLabel .
CustomIndex
CustomUIReference The assigned Word User Interface.
This property is available to documents in bundles.
DataID
The value can be freely defined and used for subsequent queries.
This property is available to documents in bundles.
This property stores the associated selection.
This property is available to documents in bundles.
DocumentReference Name of the document.
Expandable Defines whether the user can see the document structure and is allowed to activate or deactivate its objects.
NumberOfCopies
OriginalID
Password
PrintDefinition
Number of copies of this document to create.
This property is available to documents in bundles.
Unique ID of the object.
This property is available to document copies in bundles.
If a password is defined, users can only edit text blocks with the property
TextComponentProtection=TRUE if they know the password. This property is available to documents in bundles.
Use this property to define the printer, form and print time for the document.
Specification of printer and form is optional.
If the fields are not set, they must be defined by the business user in the PDC Client.
In this case, activate the option Changes allowed and also the print time unknown.
By choosing local as printing time, you set up the document
1. for direct printing
2. and in addition, for local printing.
In the PDC Client, you are prompted to select printer and forms when choosing
Print and Archive.
This property is available to documents in bundles.
TextInsertionRule
Title
Visible
Rule
Activated
Effect
If the document cannot be inserted during generation, no abort is forced.
Deactivated The document is deactivated and the user cannot activate it.
Disabled
Required
The document does not be insert into the bundle.
Bundle generation aborts if the document cannot be inserted.
The value defined here is the name of the document the user sees in the PDC Client.
Defines whether the document is visible to end users.
98
Object definitions
Property Description
VariableObjectDefinition Contains the settings for variable documents.
To create a variable object definition, complete one of the following steps.
Drop an alias table on the document.
Right-click the VariableObjectDefinition property and click Create.
The following additional properties come into view. These properties determine which document inserts.
AttributeName
DataLink
DataSource
LookupSource
LookupKey
XPathExpression
For more information, refer to Variable objects .
99
Bundles
About bundles
Bundles are logical collations of related documents. Collating business process related documents into a single object enables you to generate and archive documents in one common processing step.
In addition, you have the option to process copies of the original documents in this same single processing step mentioned above.
Create a bundle
To create a bundle, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Bundle.
2. In the Create New Bundle dialog box, type a name for the bundle and click OK.
3. Optional. From the Navigator, drag the preferred documents to the Editor window.
4. Optional. To modify the status of the document, in the Editor window, right-click the document and select one of the following menu items.
Required. Sets the value of the TextInsertionRule property to required.
Activate. Sets the value of the TextInsertionRule property to activated.
Deactivate. Sets the value of the TextInsertionRule property to deactivated.
Disabled. Sets the value of the TextInsertionRule property to disabled.
5. Optional. Create a document copy .
6. Optional. Assign a data model .
Bundle editor tools
Icon Name
Open Document Template
Description
Opens the selected document template.
Create Copy Inserts a copy of the selected document template.
Define New Group
Compile
For details, refer to Groups .
Compiles the bundle.
Document Composition
Client
Test the bundle using the integrated Document Composition
Client.
Create a document copy
To create a copy of a document in a bundle, complete the following steps.
1. Open the bundle.
2. In the Editor window of the bundle, click the document.
100
3. In the Editor Tools tab, click the Create Copy bottom.
Result
A copy of the document appears in the bundle, marked with a C.
Assign a data model
A bundle can use several different selections. You can also assign an individual selection to each document in a bundle.
To assign a selection to a bundle, complete the following steps.
1. Open the bundle.
2. From the Navigator, drag the preferred selection onto the bundle in the Editor window.
Note If the bundle already has a selection defined, this operation overwrites the link.
3. Optional. To remove an existing data link, right-click the bundle and click Remove Data Link.
To assign a selection to a document in a bundle, complete the following steps.
1. Open the bundle.
2. From the Navigator, drag the preferred selection onto a document in the Editor window.
Note If the document already has a selection defined, this operation overwrites the link.
3. Optional. To remove an existing data link, right-click the document and click Remove Data Link.
Prevent a user from printing a bundle
To prevent a user from printing a bundle created by the user, complete the following steps.
1. Create a new script.
2. In the Object Inspector pane, click the Context property, then click the down arrow next to the property and select TextDocumentCollection.
3. In the script, set the BlockBundle property to True.
4. Optional. In the script, set a value for the DestinationGroup property.
5. Optional. In the script, set a value for the DestinationUser property.
6. Compile and save the script.
7. Open the bundle.
8. In the Object Inspector pane, assign the script to one of the following events.
AfterCreatingDocuments
AfterDataRetrieval
BeforeCreatingDocuments
BeforePrintingAndArchiving
InitializeDocumentCreation
InitializePrintAndArchive
Sample Script
BlockBundle = true
DestinationGroup = "Adminrole"
101
DestinationUser = "Administrator"
Result
When you click the Print and Archive button in a Document Composition Client, the Forwarding dialog box displays. There, you can select a user group and/or a single user as the target for the bundle.
If you select a user group and a user, the system forwards the bundle to both the group and the individual user.
If DestinationGroup and/or DestinationUser properties are set in the script, an information message box opens and the system automatically forwards the process to the specified group and/or user.
102
Groups and Actions
About groups and actions
Groups and Actions restrict business user actions by way of predefined rules.
Groups
A group consists of two or more documents. The relationship type defines how many documents in the group the user can activate.
Actions
Actions define relationships between a primary document and one or more secondary documents.
The status of secondary documents depends on the status of the primary document.
Example
The primary document has the status Activated.
The secondary document has the status Deactivated.
If the user toggles the primary document to Activated, the status of the secondary document automatically changes to Deactivated.
Create a group
When you create a group, make sure that using multiple groups does not result in mutual exclusion. You risk mutual exclusion when using the same object in several groups. Also, do not apply a group rule that may compromise another rule.
To create a new group, complete the following steps.
1. Open the bundle.
2. In the Editor window, below the bottom-right pane, click the Groups/Actions tab.
3. In the upper-right pane of the Editor window, right-click and click New Group.
4. To define the relationship, right-click the group and select one of the following menu items.
Minimum one document. At least one document in the group must be activated.
Exactly one document. Only one document in the group can be activated.
Maximum one document. Only one or no document in the group can be activated.
5. From the Editor window, from the left pane, drag two or more documents to the group.
Create an action
When you create an action, make sure that the action does not compromise prevailing group logic when you combine it with other defined actions.
To create a new action, complete the following steps.
1. Open the bundle.
2. In the Editor window, below the bottom-right pane, click the Groups/Actions tab.
3. In the Editor window, from the left pane, drag the primary document to the bottom-right pane.
4. In the Editor window, from the left pane, drag the dependent documents onto the first document in the bottom-right pane.
5. In the bottom-right pane, right-click each document and select one of the following menu items.
103
Activated
Deactivated
Required
Disabled
104
Dynamic Bundles
About dynamic bundles
In a dynamic bundle, the documents to be inserted and their respective properties are defined during the actual bundle creation step.
Create a dynamic bundle
To create a dynamic bundle, complete the following steps.
1. Create a new script.
2. In the Object Inspector pane, click the Context property, then click the down arrow next to the property and select TextDocumentCollection.
3. To specify the documents you want to insert into the bundle, use the statements
AddDocumentByName or AddDocumentByObjectId.
4. Compile and save the script.
5. Open the bundle.
6. In the Object Inspector pane, in the section Events, click the AfterDataRetrieval property and then click the ellipsis button next to the property.
7. In the Select an Object dialog box, select the script that you just created and then click the Select button.
105
Test a Bundle
Test a bundle
To test a bundle, complete the following steps.
1. Open the bundle.
2. On the Editor Tools tab, under Test, click the Compile panefor success or failure messages.
button and then check the Output
3. On the Editor Tools tab, under Test, click the Document Composition Client bundle opens in a new tab.
button. The
4. Optional. To toggle the status of a document, in the Editor window, right-click the document and click Switch state.
5. Optional. To toggle the status of a text block, complete the following substeps.
1. In the left pane, click the document.
2. In the right-pane, right-click one of the text blocks and click Switch state.
6. Optional. From the Navigator, drag additional documents to the left pane of the Editor window.
7. Optional. From the Navigator, drag additional text blocks to the right pane of the Editor window.
8. On the Processes tab, click the Create Document button.
Notes
Generating the bundle creates all activated original documents.
Copies are not created until the documents are printed or passed on to Odin.
9. Double-click a document to open it.
10. Optional. To save a generated document to a specific directory, right-click the document and click
Save Document As.
Assign an external document
You can use this function to
replace active text blocks without child objects with external documents.
replace active static documents in the bundle with external documents.
To replace a text block with an external document, complete the following steps.
1. In the left pane, click the document.
2. In the right pane, right-click the text block and click Assign external document.
3. In the Select External Document dialog box, select a document and click Open.
The text (external document) displays to the right of the text block.
4. Optional. To remove the external document, right-click the text block and select Remove external
document.
To replace a static document with an external document, complete the following steps.
1. In the left pane, right-click the static document and click Assign external document.
2. In the Select External Document dialog box, select a document and click Open.
The text (external document) displays to the right of the document.
106
Note Documents in a bundle can be replaced by external documents of the same type.
3. Optional. To remove the external document, right-click the document and click Remove external
document.
Note Using the LoadExternalDocument function in a script overwrites the values set with this function for the corresponding object.
Identical archive attributes for all documents in a bundle
If all documents in a bundle are to be given the same archive attributes, you can use the bundle event
InitializePrintAndArchive to do this in a single step.
The 1:n archive attributes defined there are passed to Odin for each of the jobs in the bundle.
Two alternative ways of defining the archive attributes for all documents are supported.
Alternative 1
The attributes to be used are defined as a string in a script assigned to the bundle event
InitializePrintAndArchive, in the form of
Name=Value <CR><LF>Name=Value
which is then assigned as the archive attribute string of the variable ArchiveData(Content).
In doing so, each individual attribute is inserted into the archive dictionaries of all documents.
The string can be created, for example, by building a string list and converting it to a string.
Example
StringlistAdd("List", FormatStr("%s%s", "CreatorUser=", ModusUser.UserId)
StringlistAdd("List", FormatStr("%s%s", " MyArchiveVar2=", "Value2")
ArchiveData = String("List")
Alternative 2
All scripts executed in the context TextDocumentCollection can call the SetArchiveAttribute function to insert attributes into the archive dictionaries of all documents.
The archive attributes are then passed to Odin for each of the jobs in the bundle.
The event BeforePrintingDocument is not suitable for this procedure, because, unlike other bundle events, this event is not just executed once but for each individual document in the bundle.
Example
SetArchiveAttribute("CreatorUser", ModusUser.UserId)
SetArchiveAttribute("MyArchiveVar2","Value2")
Transfer properties
To transfer properties between documents, complete the following step.
Press CTRL and drag the document whose properties you want to transfer onto the target object.
107
Bundle properties
General
Property Description
DataID Selection assigned to a bundle.
Bundle scripts can access data collected by the selection.
Events
In these scripts you can access both the data of the data references assigned to the bundle and also the properties and functions of the TextDocumentCollection context.
Event
AfterCreatingDocuments
Description
This event executes at the end of bundle processing after all documents are created.
Context: TextDocumentCollection
AfterDataRetrieval
BeforeCreatingDocuments
The script defined here executes after data retrieval.
Context: TextDocumentCollection
The script defined here executes once at the start of a bundle.
If, after the script has been executed, the InsertObject property is True, bundle processing continues with the InitializeDocumentCreation event.
If it is False, bundle processing terminates without creating documents.
Context: TextDocumentCollection
BeforePrintingAndArchiving The script defined here executes once before printing and archiving the bundle begins.
If, after the script has been executed, the AllowPrint property is False, a predefined logical error is thrown.
Context: TextDocumentCollection
BeforePrintingDocument The script defined here executes before the printing of each individual document.
Context: TextDocumentReference
InitializeDocumentCreation The script defined here executes after the BeforeCreatingDocuments event and before document generation.
If, after the script has been executed, the InsertObject property is True, processing continues with the step generate documents.
If it is False, bundle processing terminates without creating documents.
Context: TextDocumentCollection
InitializePrintAndArchive The script defined here executes once after the BeforePrintingAndArchiving event and adds archiving information defined in the variable content by the script to all documents contained in the bundle.
For more information, refer to Identical archive attributes for all documents in a bundle
and Transfer data from a bundle to the ODIN_JOB table .
Context: TextDocumentCollection
108
Reports
About reports
Document Composition not only provides text block reports and document reports related to single objects. It also provides a number of global reports.
To create global reports, the user must have the Reports (38) right.
When you save a report as a CSV file, a special character separates the cells of the CSV file from each other. To determine this character, Document Composition uses the list separator specified in the
Regional Settings section of the Windows Control Panel. We recommend that you do not change this setting.
Generate the Text Blocks report
This report displays a tree structure representing existing documents that indicate the text blocks used in each of them.
To generate the Text Blocks report, complete the following steps.
1. On the Reports tab, click the Text Blocks button.
2. On the Text blocks used within documents tab, click the Generate Report
3. Optional. To collapse all nodes, in the Editor window, click the Collapse all link.
button.
4. Optional. To expand all nodes, in the Editor window, click the Expand all link.
5. Optional. To expand or collapse the node of a specific document, in the Editor window, click the plus or minus sign to the left of the document.
6. Optional. To save the report, complete the following substeps.
1. Click the Export Report as CSV file button.
2. In the Save Report dialog box, type a name for the CSV file and click Save.
3. In the Report Generation dialog box, decide whether to open the CSV file immediately.
CSV file structure
Column Content
DocumentName Document name
TextBlock Text block used in document
Generate the Unused Objects report
This report displays unused objects, grouped by the following object types.
Text block
Document
Condition
Script
The report displays all objects for which the following conditions are not true.
109
The object is a child object of another object.
Example
A text block is used by another text block.
The object is referenced by another object.
Example
A script is executed by a text block event.
To generate the Unused Objects report, complete the following steps.
1. On the Reports tab, click the Unused Objects button.
2. On the Unused Objects tab, click the Generate Report button.
3. In the Generate Report on 'Unused Objects' dialog box, specify the object types you want to display in the report and then click Generate report.
Notes
Objects used in no other way than being called by a MonaLisa script at runtime display as unused.
The folder symbol indicates that a folder references the object.
The transfer job symbol indicates that a transfer job references the object.
4. Optional. To collapse all nodes, in the Editor window, click the Collapse all link.
5. Optional. To expand all nodes, in the Editor window, click the Expand all link.
6. Optional. To expand or collapse the node of a specific object, in the Editor window, click the plus or minus sign to the left of the object.
7. Optional. To save the report, complete the following substeps.
1. Click the Export Report as CSV file button.
2. In the Save Report dialog box, type a name for the CSV file and click Save.
3. In the Report Generation dialog box, decide whether to open the CSV file immediately.
CSV file structure
Column
ObjectType
ObjectName
Content
Object type
Object name
VersionNumber
UsedByFolder
Version number
Value is 1 if the object is used by a folder
UsedByTransferjob Value is 1 if the object is used by a transfer job
Context
ObjectID
Context (of scripts or conditions)
Object ID
LastModifiedAt
LastModifiedBy
CreatedAt
CreatedBy
Date of last modification
Last modified by
Date of last generation
Created by
110
Generate the Used Data Connections report
This report displays the existing documents indicating the data links used in each of them.
To generate the Used Data Connections report, complete the following steps.
1. On the Reports tab, click the Data Connections button.
2. On the Used data connections tab, click the Generate Report button.
3. Optional. To collapse all nodes, in the Editor window, click the Collapse all link.
4. Optional. To expand all nodes, in the Editor window, click the Expand all link.
5. Optional. To expand or collapse the node of a specific document, in the Editor window, click the plus or minus sign to the left of the document.
6. Optional. To save the report, complete the following substeps.
1. Click the Export Report as CSV file button.
2. In the Save Report dialog box, type a name for the CSV file and click Save.
3. In the Report Generation dialog box, decide whether to open the CSV file immediately.
CSV file structure
Column Content
DocumentName Document name
ObjectType
ObjectName
DataSource
DataLink
AttributeName
Object type
Object name
Data source
Data link
Attribute name
111
Scripts and Conditions
About scripts and conditions
The script language MonaLisa offers a wide range of possibilities to enhance the functional scope of
Composition Studio.
Scripts
Scripts enable you to solve specific tasks and to implement requirements that the use of standard objects alone cannot fully cover. With scripts, you gain full access to all available business logic stored in the various variable pools.
The scripting language encompasses function calls to various contexts and offers control structures such as loops and branching.
For more information on script language syntax, refer to the MonaLisa Functions section in this guide.
Conditions
Conditions are scripts that, in connection with the process of document generation, check the validity of a statement.
A simple condition, for example, checks whether a field contains a specific value. The outcome passed to the variable Result is either True or False.
Conditions enable you to activate or deactivate variables, text blocks, or documents according to the value returned.
Create Scripts and Conditions
Create a script
To create a script, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Script.
2. In the Create New Script dialog box, type a name for the script and click OK.
3. In the Object Inspector pane, click the Context property.
4. Click the down arrow next to the property and select the context for your script.
Note The context determines which objects the script can be assigned to and which properties and functions are available.
5. In the Editor window, type the script.
6. On the Script Note Editor Tools tab, under Control, click the Compile
7. Observe success or failure messages in the Output pane.
button.
Create a condition
To create a condition, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Condition.
2. In the Create New Condition dialog box, type a name for the condition and click OK.
3. In the Object Inspector pane, click the Context property.
112
4. Click the down arrow next to the property and select the context for your condition.
Note The context determines which objects the condition can be assigned to and which properties and functions are available.
5. In the Editor window, type the condition.
6. Optional. To access variables of the data model, complete the following substeps.
1. On the Script Note Editor Tools tab, under Show, click the Selection Browser button.
2. In the upper-right pane of the Editor window, click the Selection box, and then click one of the displayed selections.
3. Next to the Selection box, click the arrow button.
4. In the upper-right pane of the Editor window, click a data object. The data object variables display in the bottom-right pane.
5. Optional. From the bottom-right pane, drag variables to the left pane. This creates the command
SelVariable in the Editor window.
7. Assign a boolean value to the variable Result as the result of the conditional statement.
Example
Result = true
8. On the Script Note Editor Tools tab, under Control, click the Compile
9. Observe the Output pane for success or failure messages.
button.
Syntax
You can use operators to link a number of logical expressions together in a condition.
Enclose combined expressions in brackets to maintain their logical intent.
You can nest logical expressions.
Example
Result = (( SelVariable("PARTNER", "PAR_TITLECODE") = "1" ) OR (
SelVariable("PARTNER", "PAR_TITLECODE") = "2" ) )
Operators
The following operators are available.
Operator Meaning
= The attribute must be identical to the value
<>
<
>
<=
>=
<>""
AND()
OR()
The attribute must not be identical to the value
The attribute must be less than the value
The attribute must be greater than the value
The attribute must be less than or equal to the value
The attribute must be greater than or equal to the value
The attribute cannot be empty
Logical AND
Logical OR
113
Script and condition editor tools
Icon Name
Export Script
Description
Allows you to save a script in a file.
Debug Service
Compile
Execute
Debug
Enables you to add the opened script to the debug service, or remove it as the case may be.
Scripts and conditions have to be compiled. The corresponding button is available in the toolbar.
To run a script or condition, click the button Execute.
Code is executed in the background.
Scripts that only contain MonaLisa standard functions can be executed directly in debug mode, if the context
None is assigned.
For more information, refer to Test Scripts and
Opens the Selection Browser in the Editor window.
Selection
Browser
Encrypt
Password
Activating SOAP
Web Service
Tool
Edit
Opens a dialog window where you can encrypt a password and copy it to the clipboard.
Opens the SOAP Web Service Tool allowing inspection of a SOAP web service. To activate the tool, click the button. Clicking again closes the tool.
For more information, refer to Inspect a SOAP Web
Provides a number of functions for editing script code.
Code completion
For ease of use, short cut key combinations can be used while writing code.
Standard Functions
The key combination CTRL + Space opens a list of all MonaLisa standard functions.
This list also shows information about the function of the statement and its parameters.
Using ENTER or a double-click you can insert the command into the script editor.
Properties, functions and pools
The key combination CTRL + ALT + Space opens a list of properties, functions and pools available in the current context.
Control Structures
Control structures can be accessed by the key combination CTRL + K + X .
114
Alternatively you can press the Tab key for one of the listed keywords to display the corresponding command structure.
For more information, see chapter Control Structures .
Other key combinations
Shortcut
ALT + right arrow or
CTRL + Space
Effect
Displays word completion.
CTRL + K + C
CTRL + K + U
CTRL + K + F
SHIFT + ALT + T
CTRL + U
Marks the current code line as a comment.
Remove the comment syntax from the current code line.
Indents the code line selected like the surrounding code lines.
Moves a line with the cursor below the next line.
Converts selected text to lowercase.
CTRL + SHIFT + U Converts selected text to uppercase.
CTRL + SHIFT + Space Shows information about the current parameter.
CTRL + DEL Deletes the word to the right of the cursor.
CTRL + Backspace
CTRL + F
CTRL + H
F3
Deletes the word to the left of the cursor.
Displays the search dialog.
Displays the search and replace dialog.
Continues the search down the text.
SHIFT + F3
CTRL + A
CTRL + W
Continues the search up the text.
Selects the whole content.
Selects the word where the cursor is positioned or the word to the right of the cursor.
Set a bookmark
Use the Bookmarks feature to skip to specific lines in source code more quickly.
To set a bookmark, complete the following steps.
1. In the Editor window of the script or the condition, place the cursor in the line where you want to set a bookmark.
2. Press CTRL + K + a number between 1 and 9.
To delete a bookmark, complete the following step.
Press CTRL + K + the number of the bookmark.
To skip through to a defined bookmark, complete the following step.
Press CTRL + the number of the bookmark.
Display context information
The context information shows you the available variable pools and process components for the context you specified.
To view the context information, complete the following step.
115
Below the Editor window, click the Context Information tab.
Create a script parameter
You can specify script parameters and standard values when another script calls the script with the parameter passing function.
To create a script parameter, complete the following steps.
1. Below the Editor window, click the Parameter tab.
2. Click the New Parameter button.
3. In the Parameter Name box, type a name for the parameter.
4. Optional. In the Standard Value box, type a standard value.
For more information, refer to CallSystem .
Add a comment
To add a comment for a script, complete the following steps.
1. Below the Editor window, click the Comment tab.
2. In the Editor window, type your comment.
Assign a script to an object
You can assign scripts to events of variables, text blocks, documents, and bundles. You can also assign scripts to process designer blocks and components.
To assign a script to an event of a variable, a text block, a document, a bundle, or a process component, complete the following steps.
1. Open the object.
2. In the Editor window, click the object to which you want to assign the script.
3. In the Object Inspector pane, in the Events section, click the event property and click the ellipsis button next to the property.
4. In the Select an object dialog box, select the preferred script and click the Select button.
Notes
In the Select an object dialog box, only scripts with the appropriate context are available for selection.
In the Editor window, a line appears above the box next to the object after you assign a
BeforeInsert script. A line appears below the box signals after you assign an AfterInsert script. .
In the Object Inspector pane, double-click an event to open the assigned script. If you double click an event with an empty event property, the Create New Script dialog box opens. The script automatically receives the context that fits.
Assign a condition to an object
116
You can assign conditions to variable, text block and document events. You can also assign conditions to process designer blocks and components.
To assign a condition to a variable, a text block or a document, complete the following steps.
1. Open the object.
2. In the Editor window, click the object to which you want to assign the condition.
3. In the Object Inspector pane, in the Condition section, click the condition property and click the ellipsis button next to the property.
4. In the Select an object dialog box, select the preferred condition and click the Select button.
Notes
In the Select an object dialog box, only conditions with the appropriate context are available for selection.
In the Editor window, a question mark appears next to an object when you assign a condition.
In the Object Inspector pane, double-click on the condition property to open the assigned condition.
If you double-click a condition with an empty condition property, the Create New Condition dialog box opens. The condition automatically receives the context that fits.
117
Debug
Debug a script or a condition
Scripts and conditions that do not need a context for execution
In the debug mode, you can run scripts and conditions that do not use any specific context.
To debug a script or a condition, complete the following steps.
1. Open the script or condition.
2. In the Object Inspector, set the Context property to the value None.
3. In the Script Note Editor Tools tab, under Control, click the Execute in Debug
Mode
button.
The script opens in a new debug mode window.
4. Run the script using the buttons in the
Scripts and conditions that need a context for execution
In the debug mode, you cannot run scripts and conditions that use a specific context. Instead, run these scripts and conditions in the corresponding context.
To debug a script or a condition, complete the following steps.
1. In the Navigator, right-click the script or the condition and click Add to Debug Service.
2. Open the document or the process which uses the script and start the document creation or start the process.
As soon as the script executes, the debugger window opens.
3. Run the script using the buttons in the
To disable execution in debug mode for a script or a condition, complete the following step.
In the Navigator, right-click the script or the condition and click Remove from Debug Service.
Debugger Tools
Icon Name
Run (CTRL + F9)
Run (F9)
Set / Remove
Breakpoint (F5)
Description
Executes the complete script and closes the Debugger.
Does not takes into account any breakpoints.
Executes the complete script but does not close the Debugger.
If breakpoints have been set, the script will stop at the corresponding code line and can be continued from this position.
Sets or removes a breakpoint at the current position.
Step Into (F7)
Procedure Step (F8)
Executes the current code line.
If this statement is CallSystem the Debugger branches into the script being
called.
Executes the current code line.
Stop (CTRL + F2) Ends the script and closes the Debugger.
118
Quick Monitoring Shows the current variable values.
119
SOAP Web Service
Inspect a SOAP web service
The SOAP Web Service Tool allows you to explore the available API of a SOAP web service and to generate the appropriate MonaLisa Script code for calling a chosen function.
To inspect the web service and its available functions, complete the following steps.
1. Open the script.
2. In the Script Note Editor Tools tab, under Show, click the Call Web Service button.
3. In the Editor window, in the right pane, in the Namespace box, check and modify the namespace if you work with the MLObjects class.
Note The specified value transfers to the Namespace property of the MLWsClient class.
4. In the WSDL-URI box, type the URL of the web service.
To generate and process MonaLisa Script code, complete the following steps.
1. In the Editor window, in the right pane, click the Generate Code button.
The appropriate MonaLisa script code displays in the output pane to the bottom-right of the Editor window.
The code is copied directly to the clipboard.
2. Optional. In the output pane to the bottom-right of the Editor window, edit the code and click the
Copy to Clipboard link.
5. To the right of the WSDL-URI box, click the Load WSDL button.
The Script Editor displays the web service code.
6. Select a method from the Method drop-down menu.
SOAP web service pane
Box
WSDL-URI
Method
Signature
Parameter
Local variable
Content
URL of the SOAP web service.
List of functions provided by the web service.
Signature of the selected function, providing information about type, return type, and parameters of the function.
List of function parameter names and types.
Trailing special character
Parameter type
&
[] out or reference array
Name of the variable used in a Monalisa script for accessing the MLWsClient Extension object.
Script options check boxes
GetObject / FreeObject
CallMethod
When selected
Generate statements for creating and disposing a MLWsClient Extension object.
Generate code for setting the parameters and calling the selected web service
120
WebProxy Definition
WSDL-URI function.
Generate code statement to define a Webproxy used for accessing the web service.
Generate code for setting the Web Service URI in the Monalisa Script, using the
URL of the web service provided in the UI.
MonaLisa Functions
Migrating scripts from modus 4
If you have imported scripts from modus4, adjustments must be made to the following commands:
Function OnError - Raise
This function is to be replaced by one of the Try
– Finally control structures.
For more information, refer to
Function Parse
The parse information must be enclosed by quotation marks.
For more information, refer to
Function Check
The check variable can now be specified without quotation marks.
For more information, refer to
Function GetLookUpValue
The number of parameters has changed.
For more information, refer to
Initialize Events, InitializeGUI and OnProcessEnd
These events are no longer available.
Functions Input, MessageDialog and DropDownbox
These FatClient functions are no longer available.
Function GoTo
This function is no longer available.
121
Data Types
MonaLisa works with the data types Integer, BigInteger, Float and String.
Value ranges of the data types
DataType
I
Integer (int32)
Min
-2147483648
L
BigInteger (int64/long) -9223372036854775808
F
Float (double)
S
String
Max
2147483647
9223372036854775807
-1.7976931348623157E+308 1.7976931348623157E+308
Result data types
The following table lists the result data types according to data operations.
Operands Result data type
Operand 1 Operand 2 Operator + Operator - Operator * Operator /
S
I
L
F
S
I
L
F
S
I
L
F
S
I
L
F
S
S
S
S
I
I
I
I
L
L
L
L
F
F
F
F
S
S
S
S
S
I / L
L
F
S
L
L
F
S
F
F
F
Error
Error
Error
Error
Error
I / L
L
F
Error
L
L
F
Error
F
F
F
Error
Error
Error
Error
Error
I / L
L
F
Error
L
L
F
Error
F
F
F
Error
Error
Error
Error
Error
F
F
F
Error
F
F
F
Error
F
F
F
122
Control Structures
About control structures
Control structures enable you to control the flow of scripts and conditions. For example, control structures allow you to respond to different data contents.
CheckEvery
Checks a variable for its validity. If the first parameter passed is EVERY, more than one agreement is possible.
The variable to be checked is passed as the second parameter.
Value checks the value passed for validity.
Using when allows you to check further conditions.
The statements after when-any are executed when one or more of the conditions are met.
The statements after when-all are executed when all of the conditions are met.
The statements after when-none are executed when none of the conditions are met.
Example
a = 11 erg = 0 c = false
;
Check("every", a)
value(1)
erg = erg + 1 ; if a is equal to 1
when(c = true)
erg= erg + 1 ; if c is TRUE
When-Any
message = "any" ; if a is equal to 1 OR c is TRUE
When-All
message = "all" ; if a is equal to 1 AND c is TRUE
When-None
message = "none" ; if a is not equal to 1 AND c is not TRUE end-check
CheckFirst
Checks a variable for its validity. If the first parameter passed is FIRST, only the statements after the first agreement are executed.
The variable to be checked is passed as the second parameter.
Value checks the value passed for validity.
Using when allows you to check further conditions.
The statements after when-any are executed when one or more of the conditions are met.
The statements after when-all are executed when all of the conditions are met.
The statements after when-none are executed when none of the conditions are met.
Example
a = 11
123
erg = 0 c = false
Check("FIRST", a)
value(1)
erg = 1 ; if a is equal to 1
when(c = true)
erg=2 ; if a is not equal to 1 AND c is TRUE
When-Any
Erg=3 ; if a is equal to 1 OR c is TRUE
When-All
Erg=4 ; if a is equal to 1 AND c is TRUE
When-None
Erg=5 ; if a is not equal to 1 AND c is not TRUE end-check
If-Condition
Checks whether the condition in brackets is valid. If so, the following commands up to End-if are executed.
If the condition in brackets is not valid, the script is continued after the End-if command.
Each individual condition must be enclosed in brackets.
Multiple conditions, linked by and or or must be enclosed by additional brackets.
Examples
if (a < 10)
b = 0 end-if if ( (a = 10) and (b = 30) )
c = 0 end-if
IfElse-Condition
Checks whether the condition in brackets is valid. If so, the following commands up to Else are executed.
The script then continues with the statements following the respective End-If command.
If the condition in brackets is not valid, the commands between Else and the respective End-If are executed.
Example
if (a < 10)
b = 0 else
b = 1 end-if
While-Loops
Executes the statements in a loop as long as the condition in parentheses is TRUE.
The condition is evaluated before the statements are executed.
Example
124
while (a < 100)
a = a + 1 end-while
Region
Defines a section of a script that you can display or hide using the + or - symbols.
This helps make large scripts more manageable.
Example
#region InfoText
...
#endregion
125
Exception Handling
About exception handling
You can catch exceptions that occur during script execution by using the Try - Finally control.
TryFinally
If an error occurs while executing a statement, a script will typically terminate with an exception.
If the statement is inside a try-block, the statements in the finally-block are executed before the script is ended.
Example
try
InitDatabase("ODIN") finally
Protocol("Inside Finally-block", 9) end-try
TryOnError
If an error occurs while executing a statement in a try-block, use the command Raise to skip to the error label defined in OnError.
Only the first matching OnError block in a try-block will execute.
Choose the right order of OnError blocks so that specific OnError blocks are executed before more general ones.
Example
TryOnErrorFinally
If an error occurs while executing a statement in a try-block, use the command Raise to skip to the error label defined in OnError.
The code in the finally block is executed after the OnError block has been processed.
Example
;the special object "Error" contains information about the last error
;If no error occurred - all attributes contain an empty string
;
;Error.Category: the category identifies the sub-systems that threw the error
(for example: "OdinBusinessFacade")
;Error.Token: the token is a one-word identifier for the error. Can be specified if you use the Raise function
;Error.Message: contains the error message
Protocol("before try: category '{0}'; error token: '{1}'; error message:
'{2}'; ", 0, Error.Category, Error.Token, Error.Message)
;
;modify this value to play with the different OnError code-blocks a = 10 try
126
if(a < 10)
;This exception will be caught in the OnError("BUSINESS_ERR") block
Raise("BUSINESS_ERR","a cannot be less than 10 sein")
end-if
;
;This exception will be caught in the OnError() block
;because there is no OnError("Err") block
Raise("Err", "Test-Raise")
;
;
OnError("BUSINESS_ERR")
;this code is executed if the exception token is "BUSINESS_ERR"
;the exception token is the first parameter of the Raise function
Protocol("BUSINESS_ERR: {0}", 0, Error.Message)
;
;you can also rethrow the error
ReRaise()
;
OnErrorCategory("OdinBusinessFacade")
;this code is executed if the category of the exception is
"OdinBusinessFacade"
Protocol("odin error caught", 0)
;
OnError()
;this code is executed if no matching OnError() was found up to this line
;information about the exception can be retrieved from the Error object
Protocol("error category: '{0}'; error token: '{1}'; error message: '{2}';
", 0, Error.Category, Error.Token, Error.Message)
;
Finally
;
;code in the finally block is ALWAYS executed
;this is the right place to free resources (database connections, file handles)
Protocol("Inside Finally-block", 9)
End-try
;
Protocol("after finally: error category: {0}; error token: '{1}'; error message: '{2}'; ", 0, Error.Category, Error.Token, Error.Message)
127
Standard Functions
Append
Inserts a dataset and fills fields with values.
Append
SYNTAX
ARGUMENTS
EXAMPLE
Append(datasetName,fields: String[]) datasetName Name of the dataset. fields Field values in the correct order.
Append("Table","Name","3","26.10.2011")
Beep
Sends out the standard system signal tone.
Parameter Definition
frequency Frequency of the signal
BigInteger
Converts a value to a BigInteger value. The variable content must be a number format.
BigInteger
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
BigInteger(valueToConvert) valueToConvert The variable to convert.
Defining an empty string as parameter value results in an exception at run time.
BigInteger value of the returned variable.
Var = 100
Var = BigInteger(Var)
Bof
Determines whether the cursor is at the start of the dataset.
Bof
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Bof(datasetName) datasetName Name of the dataset.
TRUE = The cursor is at the start of the dataset.
FALSE = The cursor is not at the start of the dataset.
Begin = Bof("Table")
CallSystem
Calls a script from the same system.
128
Syntax
CallSystem(scriptName: String)
CallSystem(scriptName: String ,inputVariables: String)
CallSystem(scriptName: String ,inputVariables: String ,outputVariables:
String)
Note about inVars/outvars:
Only those variables are passed that actually exist.
CallSystem
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Name of the script to be executed scriptName inputVariables
Name of the script you want to execute.
Comma-separated list with the names of the variables you want to pass
(call by value). outputVariables Comma-separated list with the names of the variables you want to pass
(call by value), these variables are also those returned.
Comma-separated list with the names of the variables to be passed (call by value)
Calling a script with no variable passing
CallSystem("callTestScript")
Calling a script passing input variables
Amount1 = 1
Amount2 = 2
CallSystem("callTestScript", "Amount1,Amount2")
Here the script callTestScript is called from the system and the variables Amount1 and
Amount2 are available in the called script.
Calling a script passing input variables and defining target variables
Amount1 = 1
Amount2 = 2
CallSystem("callTestScript", "Amount1=Number1,Amount2=Number2")
Here the script callTestScript is called from the system and the variables Amount1 and
Amount2 are available as the variables Number1 and Number2 in the called script.
Calling a script passing input variables and output variables
Amount1 = 1
Amount2 = 2
CallSystem("callTestScript", "Amount1,Amount2", "Sum")
Protocol("Sum of Amount1 and Amount2: {0} ", 0, Sum)
Here the script callTestScript is called from the system and the variables Amount1 and
Amount2 are available in the called script.
After the script is called, the variable Sum from the called script is passed back to the calling script and is available for further processing.
Close
Closes an open dataset.
Close
129
SYNTAX
ARGUMENTS
EXAMPLE
Close(datasetName) datasetName Name of the dataset.
Close("DSName")
CloseDatabase
Closes the connection to a database.
CloseDatabase
SYNTAX CloseDatabase(aliasName: String)
ARGUMENTS
EXAMPLE aliasName Name of the database alias.
CloseDatabase("DBAliasName")
CloseSQL
Closes an open dataset.
CloseSQL
SYNTAX
ARGUMENTS
EXAMPLE
CloseSQL(datasetName) datasetName Name of the dataset.
CloseSQL("DSName")
Commit
Permanently stores all changes to data made in the current transaction. The current transaction closes.
The current transaction is the last transaction started by calling the StartTransaction function.
Commit
SYNTAX
ARGUMENTS
EXAMPLE
Commit(datasetName) datasetName Name of the dataset.
Commit("DSName")
Contains
Checks whether the source string contains the search string.
Contains
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Contains(sourceString, searchString) sourceString The string you want to search through. searchString The string you want to search for.
TRUE = The source string contains the search string.
FALSE = The source string does not contain the search string. source_string = "Perceptive Software" search_string = "Soft"
130
ok=Contains(source_string ,search_string)
Contains_Exactly
Case sensitive check whether the source string contains the search string.
Contains_Exactly
SYNTAX Contains_Exactly(sourceString, searchString)
ARGUMENTS sourceString The string you want to search through. searchString The string you want to search for.
RETURN
EXAMPLE
TRUE = The source string contains the search string.
FALSE = The source string does not contain the search string. source_string = "Perceptive Software" search_string = "ware" ok=Contains_Exactly(source_string ,search_string)
Count
Determines the number of records in a dataset.
Count
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Count(datasetName) datasetName The name of the dataset.
Number of datasets. num = Count("DSName")
CreateGuid
This function creates a Globally Unique Identifier (GUID) and returns a string representation of it, according to the provided format specifier.
A GUID is a global 128 bit number and is an implementation of the Universally Unique Identifier-
Standards (UUID).
A GUID is a typical represented in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX in which each 'X' is a placeholder for a hexadecimal character (0-9 or A-F).
For example, 936DA01F-9ABD-4D9D-80C7-02AF85C822A8.
CreateGuid
SYNTAX
ARGUMENTS
CreateGuid(format) format A single-format specifier that indicates how to format the value of this GUID. The format parameter can contain the following format specifiers. All digits in the return value are hexadecimal. Each character 'x' represents a hexadecimal digit; each hyphen ('-'), bracket ('{', '}'), and parenthesis ('(', ')') appears as shown.
N: 32 digits
(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
D: 32 digits separated by hyphens
131
RETURN
EXAMPLE
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
B: 32 digits separated by hyphens, enclosed in brackets
{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
P: 32 digits separated by hyphens, enclosed in parentheses
(xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
If format is an empty string (""), "D" is used.
The value of this GUID, represented as a series of lowercase hexadecimal digits in the specified format. retString = CreateGuid("N")
CreatePool
Creates a new MonaLisa variable pool.
CreatePool
SYNTAX
ARGUMENTS
EXAMPLE
CreatePool(poolName) poolName Name of the pool.
CreatePool("MyPool")
Decimal
Converts a value to floating point value (decimal).
Notes
If the parameter for Decimal() is a string or a constant, the period is always the decimal separator.
The thousands separator is always a COMMA.
If, on the other hand, a MonaLisa variable is passed to Decimal(), the content is interpreted according to the regional Windows settings for DecimalSeparator and ThousandSeparator.
Decimal
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Decimal(valueToConvert) valueToConvert The value you want to convert.
Note An empty string as parameter value results in an exception at run time.
Floating point value b = Decimal(a)
Delete
Deletes the record with the specified record number.
Delete
SYNTAX Delete(datasetName, rowNum)
132
ARGUMENTS
EXAMPLE datasetName Name of the dataset. rowNum Row number of the record you want to delete.
Delete("DSName",1)
DeletePool
Deletes the specified MonaLisa pool.
The following pools cannot be deleted.
BAUSTEIN (not applicable to English version)
BLOCKPOOL
DOCUMENTPOOL
DOKUMENT (not applicable to English version)
MODUSUSER
SYSTEM
SYSTEMPOOL
ZUSATZVARIABLEN (not applicable to English version)
DeletePool
SYNTAX
ARGUMENTS
EXAMPLE
DeletePool(poolName) poolName Name of the pool.
DeletePool("MyPool")
EndsWith
Determines if the end of the input string matches the specified string.
EndsWith
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
EndsWith(inString, value, ignoreCase) inString value
The input string to check.
The string value to compare with the end of the ignoreCase TRUE = Ignore case in the search.
FALSE = Consider case in the search. inString
value.
TRUE = A string match is found.
FALSE = No string match is found. retPosition = EndsWith("ABCxyz","xyz",false)
Eof
Determines whether the cursor is at the end of the dataset.
Eof
SYNTAX Eof()
133
ARGUMENTS
RETURN
EXAMPLE datasetName Name of the dataset.
TRUE = Eof reached.
FALSE = Eof not reached.
End = Eof("DSName")
Execute
Executes a program.
Execute
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Execute(commandLine,commandShow) commandLine Path commandShow Win32 API parameter, defining how the window opens.
ProgramHandle
PrgHandle = Execute("C:\Tools\ProgramName.EXE",1)
Note for 64 bit operating systems
Perceptive Document Composition is a 32-bit program.
If you use the ExecuteSynchron command to start a program from the directory %windir%\System32, you must define the the directory %windir%\Sysnative instead.
If you use the ExecuteSynchron command to start a program from the directory C:\windows\System32, you must define the the directory C:\windows\Sysnative instead.
Refer to the Microsoft Developer Network website for more information on the File System Redirector.
Find
Searches the current index for a record that matches exactly the values specified.
Find
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Find(datasetName,idxFields) datasetName Name of the dataset. idxFields Field contents of the current index.
TRUE = Dataset found.
FALSE = Dataset not found. found = Find("odin", "3899")
FindValue
Reads field values from a dataset according to a defined filter.
FindValue
SYNTAX
ARGUMENTS
FindValue(datasetName,filter,formattingRule,resultFields) datasetName filter
Name of the dataset.
Filter criteria as comma separated string. Two alternatives are supported.
134
RETURN
EXAMPLE
With definition of the string FILTER
If filter contains the string FILTER as first value, the rest of the value is interpreted as an expression and evaluated accordingly.
An example of a possible expression is ACC_Par_Num = '0815'.
Without definition of the string FILTER
Specify filter values here in a comma separated filterString.
The names of the corresponding column names derive from the dataset.
Observe the order of the columns in the dataset when you define filter values. formattingRule Formatting rule for example "PartnerNr: %s, AccountType = %s, Balance =
%s"
If no formatting rule is used, the result values from the columns store without separators in the result string. resultFields Definition of the column names whose values the result string contains.
Values found.
InitDatabase("DataDbAlias")
InitDataSet("testSet","DataDbAlias","dbo.Accounts")
;Alternative1: with definition of FILTER --> independent of column order
StringListAdd("filterString", "FILTER")
StringListAdd("filterString", "KTO_Par_Num = '0815' ") ; Column name with search value for 1. column of the dataset
StringListAdd("filterString", "AND ")
StringListAdd("filterString", "KTO_Type = 'N'") ; Column name with search value for 5. column filter = String("filterString")
; no FormatRule result = findValue("testSet", filter, "", "KTO_Par_Num",
"KTO_Type", "KTO_Balance")
Protocol(result, 10, "") ; should be : 0815N24,34 --> Value from the first dataset found
; with FormatRule formatRule = "PartnerNr: %s, AccountType: %s, Balance: %s" result = FindValue("testSet", filter, formatRule, "KTO_Par_Num",
"KTO_Type", "KTO_Balance")
Protocol(result, 10, "") ; should be : PartnerNr: 0815,
AccountType: N, Balance: 24,34 --> Values from the first dataset found
;
;Alternative2: no definition of FILTER --> column order must be adhered to in filter
StringListClear("filterString")
StringListAdd("filterString", "0815") ; Filter value for 1. column of the dataset
StringListAdd("filterString", "2") ; Filter value for 2. column
StringListAdd("filterString", "55378924") ; Filter value for 3. column filter = String("filterString")
135
; no FormatRule result = findValue("testSet", filter, "", "KTO_Par_Num",
"KTO_Type", "KTO_Balance")
Protocol(result, 10, "") ; should be : 0815N24,34 --> Value from the first dataset found
; with FormatRule formatRule = "PartnerNr: %s, AccountType: %s, Balance: %s" result = findValue("testSet", filter, formatRule, "KTO_Par_Num",
"KTO_Type", "KTO_Balance")
Protocol(result, 10, "") ; should be : PartnerNr: 0815,
AccountType: N, Balance: 24,34 --> Values from the first dataset found
First
Positions the dataset cursor on the first record in the dataset.
First
SYNTAX
ARGUMENTS
EXAMPLE
First(datasetName) datasetName Name of the dataset.
First("DSName")
Float
Converts a value to a floating-point variable. The value used must be in a number format.
Notes
Float
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Float(valueToConvert) valueToConvert The variable to convert.
Notes
If the parameter is a string or a constant, the period is always the decimal separator. The thousands separator is always a comma.
If, on the other hand, a MonaLisa variable is passed to Float(), the content is interpreted according to the Windows regional settings for
DecimalSeparator and ThousandSeparator.
An empty string as parameter value results in an exception at run time.
Floating-point variable.
FloatVar = Float("9.15") ;FloatVar = 9.15
FloatVar = Float("9,000.15") ;FloatVar = 9000.15
FloatVar = Float("11,0.15") ;FloatVar = 110.15
;
Test = "9.15"
FloatVar = Float(Test) ;result depends on the windows regional settings, in Germany FloatVar = 915
;
136
Test = "9,15"
FloatVar = Float(Test) ;result depends on the windows regional settings, in Germany FloatVar = 9,15
Format
Enables you to combine strings and at the same time extract a specific substring of a string. You can format the result to a specific length and fill it with the appropriate characters.
Format
SYNTAX
ARGUMEN
TS
RETURN
EXAMPLE
Format(startPosition, numberCharacters, resultLength, formatRule, fillCharacter,formatParams) startPosition Startposition beginning from 1. numberCharacters Number of characters from the start position to cut off. resultLength formatRule
Maximum length of the result string. 0 means the result string has no length restriction.
L = left aligned
R = right aligned
Z = centered fillCharacter formatParams
Filling character (fill character) if the result string does not have the required length.
Data strings to link together.
Formatted text.
Date = "1.7.2014"
Day = Format(3, 1, 2, "R", "0",Date) ; Day ==> "07"
Month = Format(1, 1, 2, "R", "0",Date) ; Month ==> "01"
Year = Format(5, 4, 4, "R", "0",Date) ; Year ==> "2014"
;------------------------------------------------------------------
---------
Name = "John James Miller"
; subst without padding
Name1 = Format(6, 50, 0, "L", "_", Name); Name1 = "James Miller"
Name2 = Format( 1, 10, 0, "L", "_", Name); Name2 = "John James"
Name3 = Format(6, 5, 0, "L", "_", Name); Name3 = "James"
; subst with padding, text left aligned
Name4 = Format(6, 50, 20, "L", "_", Name); Name4 = "James
Miller________"
; subst with padding, text right aligned
Name5 = Format(6, 50, 20, "R", "_", Name); Name5 = "________James
Miller"
; subst with padding, text centered
Name6 = Format(6, 50, 20, "Z", "_", Name); Name6 = "____James
Miller____"
FormatStr
Formats a string by concatenating the strings variable1 to variableN according to the defined format rule.
If the result should contain a '%' character, you must define it as '%%' in the formatRule parameter.
137
FormatStr
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
FormatStr(formatRule,formatParams: Variable1, Variable2, ..., VariableN) formatRule Format rule. formatParams Strings to format.
Formatted text. d = "01" m = "02" dm = FormatStr("Day: %s, Month: %s", d, m) ;Result: dm = "Day:
01, Month: 02"
; y ="2014"
Date = FormatStr("%s/%s/%s", m, d, y) ;Result Date = "02.01.2014"
; Percent sign in the result string:
Percentage = "5"
Res = FormatStr("Percentage: %s %% p.a.", Percentage) ; Res =
Percentage: 5 % p.a.
FreeObject
Frees up a run time OLE object instance.
FreeObject
SYNTAX
ARGUMENTS
EXAMPLE
FreeObject(varName) varName Name of the instance.
FreeObject("Reg")
GetBlobField
Reads the content of a BLOB field.
GetBlobField
SYNTAX GetBlobField(datasetName,fieldName)
ARGUMEN
TS datasetName Name of the dataset fieldName Field name.
RETURN
EXAMPLE
The content of the BLOB field.
;Read BLOB field "Data" using the function GetBlobField() and save to file
System.IO.File.WriteAllBytes("D:\Temp\SystemRequirements_modus_Vers ion_5_DB2.rtf", GetBlobField("dataset", "Data"))
GetConnection
Returns the database connection object currently in use.
GetConnection
138
SYNTAX
ARGUMENTS
EXAMPLE
GetConnection(varName,aliasName) varName Name of the variable in which the database connection object is stored. aliasName Name of the database alias.
InitDatabase("DataDbAlias")
GetConnection("con", "DataDbAlias") con_s = con.ConnectionString
GetField
Reads a field value.
GetDirectories
SYNTAX GetField(datasetName, fieldName)
GetField(datasetName, fieldName, destList, dataType)
ARGUMENTS datasetName Name of the dataset. fieldName destList dataType
Field name.
Name of the target string list for the read value if the data type is "L".
Data type.
S = String
I = Integer
F = Float
L = String list
RETURN
EXAMPLE
Field value of the type String, Integer or Float, depending on the given data type.
VN = GetField("DSName","Forename")
VN = GetField("DSName","Forename", SListe, "L")
GetLookupValue
Reads values in a lookup table.
GetLookupValue
SYNTAX GetLookupValue(objectName,key)
ARGUMENTS objectName Name of the lookup table. key Lookup key.
RETURN
EXAMPLE
Lookup value.
VarContent="001" res = GetLookupValue("LookupTab", VarContent)
Error handling in case lookup table or key does not exist
try
TestVariable = GetLookupValue("TestLookUp", "LookUpKey")
OnError("LookupValueNotFound")
;Either the key within the lookup table or the lookup table itself was not found, therefore the variable is set to a default value
139
TestVariable = "DefaultValue"
End-try
GetObject
Creates an instance of the specified object.
GetObject
SYNTAX
ARGUMENTS
EXAMPLE
GetObject(varName, className) varName Name of the instance. className Name of the DLL or class.
GetObject("date","MLDate")
GetObject("Reg", "MSLReg_Ini_Lib.MSLRegistry")
GetVariable
Checks whether the specified variable exists and if so, returns its value. If the variable does not exist, no further action is taken and no error message results.
GetVariable
SYNTAX
ARGUMENTS
GetVariable(varName) columnName Name of the variable.
RETURN
EXAMPLE
Value of the variable.
Forename = GetVariable("ModusUser.Forename")
GetSystemOId
Returns the SystemOID of the system in which the script executes.
GetSystemOId
SYNTAX GetSystemOId()
RETURN
EXAMPLE
SystemOID
MyOID = GetSystemOID()
Index
Creates an index on the dataset.
Index
SYNTAX
ARGUMENTS
EXAMPLE
Index(datasetName,idx) datasetName Name of the dataset idx Comma separated list of fields used in the index.
Index("DSName", "ACC_Account_Nr,ACC_BIC"
140
InitDatabase
Creates a connection to a database.
InitDatabase
SYNTAX InitDatabase(aliasName)
ARGUMENTS aliasName Name of the database alias.
RETURN
EXAMPLE
TRUE = Connection established.
FALSE = Connection not established.
OK = InitDatabase("odinTest")
InitDataset
Creates a new dataset for the specified instance.
InitDataset
SYNTAX
ARGUMENTS
EXAMPLE
InitDataset(datasetName, aliasName)
InitDataset(datasetName, aliasName, tableName) datasetName Name of the dataset. aliasName Name of the database alias. tableName Name of the database table. If the parameter is set, the table is read using
Select *.
InitDataSet("modusorder", "ORDERDATA")
InitDataSet("modusorder", "ORDERDATA", "modus_xml_job")
Insert
Inserts a dataset and fills fields with values.
Insert
SYNTAX
ARGUMENTS
EXAMPLE
InitDataset(datasetName, aliasName, tableName) datasetName Name of the dataset. fields Field values in the correct order.
Insert("DSName","Perceptive Software","3","11.11.2011")
Integer
Converts a string to an integer variable. Variable content must be a number format.
Integer
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Integer(valueToConvert) valueToConvert The variable to convert. Defining an empty string as parameter value results in an exception at run time.
Integer value of the variable.
Var = "10"
141
Var = Integer(Var)
Last
Positions the dataset cursor at the last record of the dataset.
Last
SYNTAX
ARGUMENTS
EXAMPLE
Last(datasetName) datasetName Name of the dataset.
Last("DSName")
Max
Returns the highest value found in a string list or list of variables.
Max
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Max(stringList)
Max(values) stringList Name of the string list. values Values to check.
Highest value.
MaxVarL=Max(StrListe) v1=10 v2=30 v3=50
MaxVar=Max(v1,v2,v3)
Min
Returns the lowest value found in a string list or list of variables.
Min
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Min(stringList)
Min(values) stringList Name of the string list. values Values to check.
Lowest value.
MinVarL=Min(StrListe) v1=10 v2=30 v3=50
MinVar=Min(v1,v2,v3)
142
Move
Moves the dataset cursor n steps on from the current position.
Move
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Move(datasetName, relativeIndex) datasetName Name of the dataset. relativeIndex Relative position from the current position.
Lowest value.
Move("DSName",3)
Move("DSName",-3)
Next
Positions the dataset cursor on the next record in the dataset.
Next
SYNTAX
ARGUMENTS
EXAMPLE
Next(datasetName) datasetName Name of the dataset.
Next("DSName")
OpenSQL
Executes the statement defined under SetSQL.
OpenSQL
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
OpenSQL(datasetName) datasetName Name of the dataset.
TRUE = Successful
FALSE = Not successful.
OpenSQL("DSName")
Parse
Allows you to process texts with special functions, for example, date, time, calendar days, or hex values.
Parse
SYNTAX
ARGUMENTS
RETURN
Parse(formattedContent)
FormattedContent The string to parse.
Formatted text.
143
Special function ^D[mm,dd,yy,yyyy] to insert the date
Arguments Definition
mm Current month dd yy yyyy
Current day
Current year (two figures)
Current year (four figures)
Example
Test = Parse("^Ddd.mm.yyyy;")
;-->Test = "05.08.2011"
;
Test = Parse("Current date: ^Ddd.mm.yy;")
;-->Test = "Current date: 05.08.08 "
Special function ^U[hh,mm,ss] to insert the time
Arguments Definition
HH Current hour, 24 hour format hh mm ss
Current hour, 12 hour format
Current minute
Current second
Example
Test = Parse("^Uhh:mm:ss;")
;-->Test = "10:23:55"
;
Test = Parse("Date: ^Ddd.mm.yy; Time: ^UHH:mm:ss;")
;--Test = "Date: 21.04.09 Time: 19:19:48"
Special function ^K to insert a calendar week number
Example
Test = Parse("^K;")
;-->Test = "32"
Special function ^H[Hexvalue] to insert hexadecimal values
Argument
Hexadecimal value
Example
Test = Parse("^H3F;")
;-->Test = "?"
PrepareSQL
Fills a query with parameters.
PrepareSQL
144
SYNTAX
ARGUMENTS
EXAMPLE
PrepareSQL(datasetName, paramDescls) datasetName Name of the dataset. paramDescls Name of the string list containing the description of the SQL parameters.
The parameters used in the SQL statement are described in this string list.
You need to specify the parameter descriptions in the same order as in the
SQL statement.
Each parameter must exist in the form ParameterName=ParameterType.
A corresponding local MonaLisa variable with the value of the parameter must exist for each ParameterName defined.
For the parameter type b (binary), the variable must contain path and file name of the data to insert.
The parameter type consists of two characters.
The first character determines the direction of the parameter.
The following characters are supported.
Parameter Definition
b Bi-directional (input and output parameter) i o
Input parameter
Output parameter r Return value (stored procedure)
If an unsupported character is defined, the parameter i is used.
The second character determines the format of the parameter.
The following characters are supported.
Parameter Definition
b Binary (BLOB field) i s d f t
Date
Float
Integer
String
Time
@ Date time
If an unsupported character is defined, the parameter s is used.
StringListClear ("ParamDescList")
StringListSetValue("ParamDescList", "MyParam", "is")
SetSQL(myDataSet, SQL)
PrepareSQL(myDataSet, "ParamDescList" )
Prev
Positions the dataset cursor on the previous record in the dataset.
Prev
SYNTAX Prev(datasetName)
145
ARGUMENTS
EXAMPLE datasetName Name of the dataset.
Prev("DSName")
Protocol
Writes an entry into the ModusSuite_Log.txt trace file in the installation directory.
Protocol
SYNTAX
ARGUMENTS
EXAMPLE
Protocol(traceMessage, traceLevel, formatParams) traceMessage Trace message. traceLevel Trace level.
Possible values
0 = Error
1-4 = Warning
5-9 = Information
10 = Verbose formatParams Parameters set for each placeholder. Placeholders are {0},{1}, ... .
ErrorNumber = "001"
Protocol("Error message {0} ", 0, ErrorNumber)
PutField
Inserts a value into a field.
PutField
SYNTAX
ARGUMENTS
EXAMPLE
PutField(datasetName, fieldName, fieldValue) datasetName Dataset name. fieldName fieldValue
Field name.
New content of the field.
PutField("DSName","CompanyName","Perceptive Software")
Raise
Triggers an error and then skips to the error label defined in OnError.
Raise
SYNTAX
ARGUMENTS
EXAMPLE
Raise(errorTypeToken, errorMessage) errorTypeToken The value passed on to the LastError variable when the Raise function executes. errorMessage Detailed error message.
Raise("ERR1","Error 1 thrown")
146
Read
Reads a complete dataset and returns the result.
Read
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Read(datasetName, fieldList, destList, delimiter, quote) datasetName Name of the dataset. fieldList Name of the string list containing the column names to read.
If the string list is empty, all fields are read. The string list must exist. destList delimiter
Name of the string list in which the results store.
If the specified string list does not exist, it is created. If an empty string is passed, only the result string returns.
Contains the separator for field contents. A comma is used for an empty string. quote Defines the character that encloses the result value.
If you define an empty string, none of the individual result values are enclosed.
Data fields read in a string.
InitDatabase("DataDbAlias")
InitDataSet("testSet","DataDbAlias","dbo.Accounts")
;
; fieldList Alternative 1: fieldList = Empty List --> all column values are in the result
StringListClear("fieldList") ; clears the string list or creates a new one if not found
; dummy_s = Read("testSet", "fieldList", "", ",", "") ;no destList defined --> only result string
Protocol("fieldList Alternative 1: fieldList = Empty List;
Set1",10,"")
Protocol(dummy_s, 10, "") ; Expected result:
0815,1,69924420,60050000,H,MainAccount,1,23
;
Next("testSet")
; dummy_s = Read("testSet", "fieldList", "", ",", "") ;no destList defined --> only result string
Protocol("fieldList Alternative 1: fieldList = Empty List;
Set2",10,"")
Protocol(dummy_s, 10, "") ; Expected result:
0815,2,55378924,62045000,H,SecondAccount,1,23
;
First("testSet") ;move to first record of dataset
;
;fieldList Alternative 2: fieldList contains the columns wanted in the result
StringListAdd("fieldList", "KTO_Par_Num")
StringListAdd("fieldList", "KTO_Type")
StringListAdd("fieldList", "KTO_Balance")
147
dummy_s = Read("testSet", "fieldList", "", ",", "") ;no destList defined --> only result string
Protocol("fieldList Alternative 2: fieldList contains the columns wanted in the result; Set1",20,"")
Protocol(dummy_s, 10, "") ; Expected result: 0815,H,1,23
;
Next("testSet")
; dummy_s = Read("testSet", "fieldList", "", ",", "") ;no destList defined --> only result string
Protocol("fieldList Alternative 2: fieldList contains the columns wanted in the result; Set2",20,"")
Protocol(dummy_s, 10, "") ; Expected result: 0815,N,24,34
;
First("testSet") ;move to first record of dataset
;
;destList Alternative 1: only destList-Name defined --> List must be created automatically dummy_s = Read("testSet", "fieldList", "destList", ",", "")
Protocol("destList Alternative 1: only destList-Name defined;
Returnstring",10,"")
Protocol(dummy_s, 10, "") ; Expected result: 0815,H,1,23
Protocol("destList Alternative 1: only destList-Name defined;
StringList 1.Zeile",10,"")
Protocol(StringListLine("destList", 0), 10, "")
;
Next("testSet")
;destList Alternative 2: destList already exists with entry -->
List must be automatically appended dummy_s = Read("testSet", "fieldList", "destList", ",", "") destListString = String("destList")
Protocol("destList Alternative 2: extend existing destList;
Returnstring",10,"")
Protocol(dummy_s, 10, "") ; Expected result: 0815,N,24,34
Protocol("destList Alternative 2: extend existing destList;
StringList 1.Row",10,"")
Protocol(StringListLine("destList", 0), 10, "")
Protocol("destList Alternative 2: extend existing destList;
StringList 2.Row",10,"")
Protocol(StringListLine("destList", 1), 10, "")
RegisterLib
Registers a function library (DLL) for the system.
RegisterLib
SYNTAX
ARGUMENTS
EXAMPLE
RegisterLib(dllFileName) dllFileName Name and path to the DLL.
RegisterLib("C:\Winnt\System\MSLDB_LIB.DLL")
148
ReRaise
Use this function inside an OnError block to pass the exception back to the calling context.
ReRaise
SYNTAX ReRaise()
Rollback
Discards all modify, insert, and delete actions of the current transaction and closes the transaction.
Rollback
SYNTAX
ARGUMENTS
EXAMPLE
Rollback(datasetName) datasetName Name of the dataset.
Rollback("DSName")
Round
This function rounds a floating point number to an integer value. If the floating number belongs to the number range of 2147483647 to -2147483648, you must type cast the return value to integer. If the floating number belongs to the number range of 2147483648 to 9223372036854775807 and -
2147483649 to -9223372036854775808, you must type cast the return value to big integer.
Round
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Round(double) double Floating point number.
Rounded value. v1=10.25 i=Integer(Round(v1))
;--> i=10 y=922337203685477580.001
Round(y)=922337203685477580
Search
Looks for a dataset corresponding to the criteria defined in the parameter.
Search
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Search(datasetName, expression) datasetName Name of the dataset expression Field contents of the current index
TRUE = Dataset found
FALSE = No dataset found found = Search("odin","ODJ_ID=3899")
149
SelFirstRecord
Positions the cursor on the first record of a data object.
SelFirstRecord
SYNTAX SelFirstRecord(nodeName)
ARGUMENTS
EXAMPLE nodeName Node in the data object
Example
"VSH.RI.ADR"
SelFirstRecord("VSH.RI.ADR")
SelNextRecord
Positions the cursor one record further in a data object.
SelNextRecord
SYNTAX SelNextRecord(nodeName)
ARGUMENTS
EXAMPLE nodeName Node in the data object
Example
"VSH.RI.ADR"
SelNextRecord("VSH.RI.ADR")
SelRecordCount
Returns the number of records in a data object.
SelRecordCount
SYNTAX SelRecordCount(nodeName)
ARGUMENTS nodeName Node in the data object
Example
"VSH.RI.ADR"
RETURN
EXAMPLE
Number of datasets
NumberOfRecords=SelRecordCount ("PARTNER.ACCOUNTS")
SelRecordNumber
Returns the current record number of a data object.
SelRecordNumber
SYNTAX SelRecordNumber(nodeName)
ARGUMENTS nodeName Node in the data object
Example
"VSH.RI.ADR"
RETURN
EXAMPLE
Record number of the data object
RecordNumber=SelRecordNumber ("PARTNER.ACCOUNTS")
150
SelVariable
Determines the variable value in a data object of the current selection.
SelVariable
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
SelVariable(dataObject,dataAttribute)
SelVariable(dataObject,dataAttribute,defaultValue) dataObject Complete path to the data object dataAttribute Attribute name defaultValue Default return value if the data object or attribute does not exist
Variable value as a string
If the data object has a parent data object, as in the following example, the complete path must be specified.
STR = SelVariable("ADDRESS","STREET,"")
ExRate = SelVariable("PARTNER.CONTRACT.CURRENCY_CODE",
"CUR_EXCHANGE_RATE", "")
SelVariableEx
Determines the variable value in a data object of the current selection.
SelVariableEx
SYNTAX SelVariableEx(dataObject,dataAttribute)
SelVariableEx(dataObject,dataAttribute,defaultValue)
ARGUMENTS dataObject Complete path to the data object dataAttribute Attribute name defaultValue Default return value if the data object or attribute does not exist
RETURN
EXAMPLE
To determine the return data type, the following checks perform. The first check that applies determines the type.
If the value read is a valid integer, the result is a MonaLisa variable of the type Integer.
If the value read is a valid floating-point number, the result is a MonaLisa variable of the type
Float.
Otherwise, the result is a MonaLisa variable of the type String.
If the data object has a parent data object, as in the following example, the complete path must be specified.
STR = SelVariableEx("ADDRESS","STREET,"")
151
ExRate = SelVariableEx("PARTNER.CONTRACT.CURRENCY_CODE",
"CUR_EXCHANGE_RATE", "")
SelVariableXPath
This function selects an attribute value from the specified XML data object using the XPath expression and converts the returned value to the MonaLisa variable. When there is no parameter as defaultValue and the XPath expression does not select a node, the function returns an empty string.
SelVariableXPath
SYNTAX SelVariableXPath(xpath)
SelVariableXPath(xpath, defaultValue)
ARGUMENTS xpath The xpath expression to execute defaultValue The value to return if no data exists
RETURN
EXAMPLE
An instance of the MonaLisa variable postbox = SelVariableXPath("concat('PostBox number is:
',/ORDER/CUSTOMER/@Zipcode)") desc = SelVariableXPath("/ORDER/ORDER_LINE[2]/@Description","Description not found.")
SelVariableXsDateTime
Returns a Long format or a date or time value of an XML attribute that has a date or time format of
Coordinated Universal Time (UTC). You can further process or convert this value using the MonaLisa class MLDate.
SelVariableXsDateTime
SYNTAX SelVariableXsDateTime(dataObject, attributeName, convertToLocalTime)
SelVariableXsDateTime(dataObject, attributeName, convertToLocalTime, defaultValue)
ARGUMENTS dataObject The path to the data object, such as the node name
Example
"VSH.RI.ADR" attributeName Attribute name
Example
"CODE"
RETURN
EXAMPLE convertToLocalTime TRUE = Convert the date and time value to local time.
FALSE = Do not convert the date and time value to local time. defaultValue The value to return if no data exists
The date and time expressed in Long format or local time format. datetimeint =
SelVariableXsDateTime("ORDER","DateTime",false,"0001-01-
01T01:01:01Z")
GetObject("date","MLDate")
DateIntToStr = date.Int64ToDateString("MM.dd.yyyy", datetimeint) days = date.DayOfWeek(datetimeint)
152
SelVariableXsFloat
Selects an attribute value from the specified XML data object and converts the returned value to MonaLisa Double variable.
SelVariableXsFloat
SYNTAX SelVariableXsFloat(dataObject, attributeName)
SelVariableXsFloat(dataObject, attributeName, defaultValue)
ARGUMENTS dataObject The path to the data object, such as the node name
Example
"VSH.RI.ADR" attributeName Attribute name
Example
"CODE" defaultValue The value to return if no data exists
RETURN
EXAMPLE
The MonaLisa variable of type MDouble. totalamount = SelVariableXsFloat("ORDER", "Total_amount")
SetExecSQL
Executes an SQL command without a result.
If the SQL statement contains parameters (%s or :Param), it only executes if these parameters can be resolved or are recognized. This is realized by means of the paramsDescls list.
If the list is already passed with SetExecSQL, the function executes. If not, the parameters must be resolved or made available by calling PrepareSQL and passing the list. Following that, the ExecSQL function must be executed.
SetExecSQL
SYNTA
X
SetExecSQL(datasetName, sqlList)
SetExecSQL(datasetName, sqlList, paramDescls)
ARGU
MENTS datasetName Name of the dataset sqlList Name of the string list containing the SQL statement paramDescls Name of the string list containing the description of the SQL parameters
The parameters used in the SQL statement are described in this string list
You need to specify the parameter descriptions in the same order as in the SQL statement.
Each parameter must exist in the form ParameterName=ParameterType.
A corresponding local MonaLisa variable with the value of the parameter must exist for each ParameterName defined.
For the parameter type b (binary), the variable must contain path and file name of the data to insert.
The parameter type consists of two characters.
The first character determines the direction of the parameter.
The following characters are supported.
Parameter Definition
b Bi-directional (input and output parameter)
153
EXAMP
LE i o
Input parameter
Output parameter r Return value (stored procedure)
If an unsupported character is defined, the parameter i is used.
The second character determines the format of the parameter.
The following characters are supported.
Parameter Definition
b Binary (BLOB field) d f i s
Date
Float
Integer
String t Time
@ Date time
If an unsupported character is defined, the parameter s is used.
Example
InitDatabase("DataDbAlias")
InitDataSet("testSet","DataDbAlias")
#region Testpreparation
;first delete any existing test datasets
StringListClear("SqlDefList")
StringListAdd("SqlDefList", "Delete from dbo.ACCOUNTS")
StringListAdd("SqlDefList", "where (ACC_Par_Num = '6666') ")
StringListAdd("SqlDefList", "OR (ACC_Par_Num = '9999') ")
SetExecSQL("testSet", "SqlDefList")
;
#region create Testddataset1
StringListClear("SqlDefList")
StringListAdd("SqlDefList", "INSERT INTO dbo.Accounts")
StringListAdd("SqlDefList", "(ACC_Par_Num, ")
StringListAdd("SqlDefList", "ACC_Num, ")
StringListAdd("SqlDefList", "ACC_Acc_Num, ")
StringListAdd("SqlDefList", "ACC_BIC, ")
StringListAdd("SqlDefList", "ACC_Type, ")
StringListAdd("SqlDefList", "ACC_Label, ")
StringListAdd("SqlDefList", "ACC_Balance)")
StringListAdd("SqlDefList", "VALUES")
StringListAdd("SqlDefList", "(6666, ")
StringListAdd("SqlDefList", "1, ")
StringListAdd("SqlDefList", "066066066, ")
StringListAdd("SqlDefList", "62093210, ")
StringListAdd("SqlDefList", "H, ")
StringListAdd("SqlDefList", "'MyAccount', ")
StringListAdd("SqlDefList", "66.66)")
154
155
SetExecSQL("testSet", "SqlDefList")
#endregion
;
#region create Testddataset2
StringListClear("SqlDefList")
StringListAdd("SqlDefList", "INSERT INTO dbo.Accounts")
StringListAdd("SqlDefList", "(ACC_Par_Num, ")
StringListAdd("SqlDefList", "ACC_Num, ")
StringListAdd("SqlDefList", "ACC_Acc_Num, ")
StringListAdd("SqlDefList", "ACC_BIC, ")
StringListAdd("SqlDefList", "ACC_Type, ")
StringListAdd("SqlDefList", "ACC_Label, ")
StringListAdd("SqlDefList", "ACC_Balance)")
StringListAdd("SqlDefList", "VALUES")
StringListAdd("SqlDefList", "(9999, ")
StringListAdd("SqlDefList", "1, ")
StringListAdd("SqlDefList", "099099099, ")
StringListAdd("SqlDefList", "62999999, ")
StringListAdd("SqlDefList", "H, ")
StringListAdd("SqlDefList", "'MyAccount2', ")
StringListAdd("SqlDefList", "99.99)")
SetExecSQL("testSet", "SqlDefList")
#endregion
#endregion
;
;-----------------------------------
;-----------------------------------
StringListClear("SqlDefList")
StringListAdd("SqlDefList", "Delete from dbo.Accounts")
StringListAdd("SqlDefList", "where (ACC_Par_Num = %s) ")
StringListAdd("SqlDefList", "AND (ACC_Type = :MyType) ")
;Store parameter descriptions in a string list
StringListClear("ParamDescList")
StringListSetValue("ParamDescList", "MyVar", "is") ; Alternative to St ringListAdd("ParamDescList", "MyVar=is")
StringListSetValue("ParamDescList", "MyType", "") ; Empty string as Va lue: by default takes is
;
;---------------------------------------------------------------------
-------------------
;Alternative1: Call SetExecSQL passing the paramsDescList: Delete test
dataset1
;---------------------------------------------------------------------
-------------------
MyVar = "6666"
MyTyp ="H"
SetExecSQL("testSet", "SqlDefList", "ParamDescList")
;Store SqlStatement in a string list
156
StringListClear("SqlDefList")
StringListAdd("SqlDefList", "Delete from dbo.Accounts")
StringListAdd("SqlDefList", "where (ACC_Type = :MyTyp) ")
StringListAdd("SqlDefList", "AND (ACC_Par_Num = %s) ")
;
;Store parameter descriptions in a string list
StringListClear("ParamDescList")
StringListSetValue("ParamDescList", "MyType", "") ; Order of parameter s must be identical to the order
StringListSetValue("ParamDescList", "MyVar", "is") ; in the SQL statem ent!
;---------------------------------------------------------------------
--------------------------------------------
;Alternative2: Alternative ExecSQL call
For this, SetExecSQL without passing the paramsList (or SetSql) and Pr epareSQL calls must already have been completed:
Delete test dataset2
;---------------------------------------------------------------------
--------------------------------------------
MyVar="9999"
SetExecSQL("testSet", "SqlDefList")
PrepareSQL("testSet", "ParamDescList")
ExecSQL("testSet")
Example: Insert RTF files in a BLOB field
InitDatabase("Odin")
InitDataSet("dataSet","Odin")
StringListClear("SqlDefList")
StringListAdd("SqlDefList", "Insert into dbo.Data (AutoIndex, Datatype
, Data) Values (:AutoIndex,:Datatype,:Data)")
StringListClear("ParamDescList")
StringListSetValue("ParamDescList", "AutoIndex", "ii") ; integer
StringListSetValue("ParamDescList", "Datatype", "ii") ; integer
StringListSetValue("ParamDescList", "Data", "ib") ; binary
AutoIndex = 4711
Datatype = 1
Data = "D:\Temp\SystemRequirements.rtf"
SetExecSQL("dataSet", "SqlDefList", "ParamDescList")
Example: Read BLOB field and save to file (string list)
InitDatabase("Odin")
InitDataSet("dataset","Odin")
StringListClear("SqlDefList")
StringListAdd("SqlDefList", "Select Data from Data where Autoindex = 4
711") SetSQL("dataset", "SqlDefList")
;read BLOB field "Data" and save to file
GetField("dataset", "Data", "D:\Temp\SystemRequirements.rtf", "")
; read blob-field "Data" into stringlist "test"
GetField("dataset", "Data", "test", "L")
;read BLOB field "Data" using the method GetBlobField() and save to fi le
System.IO.File.WriteAllBytes("D:\Temp\SystemRequirements.rtf", GetBlob
Field("dataset", "Data"))
SetPoolVariable
Sets the value of a pool variable.
If the variable does not exist, it is created. If the variable already exists, it is overwritten.
SetPoolVariable
SYNTAX SetPoolVariable(poolName, varName, value)
ARGUMENTS poolName Pool name
EXAMPLE varName Variable name value The value to set
VarName = "Var_" i = 10 while (i < 10)
PoolVarName = VarName + i
SetPoolVariable("System", PoolVarName, i)
i = i + 1 end-while
SetSQL
Executes an SQL command.
SetSQL
SYNTAX
ARGUMENTS
EXAMPLE
SetSQL(datasetName,sqlList) datasetName Dataset name sqlList Name of the string list containing the SQL definition
StringlistAdd("SQL","Delete from dfd.db")
InitDataset("Tabelle","AllSQL")
SetSQL("Tabelle", "SQL")
Sleep
Pauses script execution for the specified period of time.
Sleep
SYNTAX Sleep(sleepTime)
157
ARGUMENTS
EXAMPLE sleepTime Pause in milliseconds
Sleep(1000)
SplitStr
Obtains a specific partial expression from a string.
SetSQL
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
SetValue(columnName, newValue) data String splitedStr Number of the partial expression beginning from 1 seperator Delimiter for individual partial expressions errorText Result string returned when a partial expression does not exist
Partial expression of the string dbvar = "T06M07J08" s1 = SplitStr(dbvar, 1, "TMJX", "")
;s1 = "06"
; s2 = SplitStr(dbvar, 2, "TMJX", "")
;s2 = "07"
; s3 = SplitStr(dbvar, 3, "TMJX", "")
;s3 = "08"
; s4 = SplitStr(dbvar, 4, "TMJX", "-")
;s4 = "-"
StartTransaction
Starts a new transaction.
StartTransaction
SYNTAX StartTransaction(datasetName)
ARGUMENTS
EXAMPLE datasetName Name of the dataset
StartTransaction("DSName")
StartsWith
Determines if the beginning of the input string matches the specified string.
StartsWith
SYNTAX
ARGUMENTS
StartsWith(inString, value, ignoreCase) inString value
The input string to check
The string value to compare with the beginning of the inString value
158
RETURN
EXAMPLE ignoreCase TRUE = Case is ignored during the search.
FALSE = Case is included in the search.
TRUE = A string match is found.
FALSE = No string match found. retPosition = StartsWith("ABCxyz","ABC",false)
StoredProcedure
Executes a stored procedure.
StoredProcedure
SYNTAX StoredProcedure(aliasName, procName)
StoredProcedure(aliasName, procName, paramDescls)
ARGUMENTS aliasName Name of the database alias
EXAMPLE procName Name of the stored procedure paramDescls Parameter for the stored procedure in the right order.
For more information, refer to SetExecSQL .
StoredProcedure("DSName","ProcedureName","John","Miller")
StrCompare
This function compares two specified string objects, ignoring or honoring their case, and returns an integer that indicates their relative position in the sort order.
StrCompare
SYNTAX StrCompare(strA, strB, ignorecase)
ARGUMENTS strA The first string to compare strB The second string to compare ignoreCase TRUE = Case is ignored during the search.
FALSE = Case is included in the search.
RETURN
EXAMPLE
A 32-bit signed integer that indicates the lexical relationship between the two comparands.
< 0 = strA is less than strB.
= 0 = strA is equal to strB.
> 0 = strA is greater than strB.
;Compare retvalue = StrCompare("String to compare.","String to compare.",true) if(retvalue <> 0)
Raise("Error", "StrCompare() The result should be 0.") end-if
;Case sensitive test retvalue = StrCompare("Cat","cat",false) if(retvalue = 0)
Raise("Error", "StrCompare() The result should not be 0.")
159
end-if
StrDelChar
Deletes a specific character from a string.
StrDelChar
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
StrDelChar(inString,delChar) inString String or variable delChar Character to delete
Result string var1="a b c d" var2=StrDelChar(var1, " ")
;var2=abcd
StrIndexOf
Reports the index, beginning from 1, of the first occurrence of a source string.
StrIndexOf
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
StrIndexOf(searchString, sourceString, startIndex, ignoreCase) searchString The string to search for sourceString The source string beginning from 1 startIndex ignoreCase
The search starting position
TRUE = Case is ignored during the search.
FALSE = Case is included in the search.
The index position, beginning from 1, of the value parameter if that string exists, or -1 if it does not exist. retvalue = StrIndexOf("m","animal",2,true) if(retvalue <> 4)
Raise("Error", "StrCompare() The result should be 4 but it is
" + retvalue) end-if
StrLastIndexOf
This function reports the index, beginning from 1, of the last occurrence of a source string.
StrLastIndexOf
SYNTAX StrLastIndexOf(searchString, sourceString, ignoreCase)
ARGUMENTS searchString The string to search for. sourceString The source string. ignoreCase TRUE = Case is ignored during the search.
FALSE = Case is included in the search.
160
RETURN
EXAMPLE
The index position beginning from 1, of the value parameter if the string exists, or -1 if it does not exist. retvalue = StrLastIndexOf("N","Dot Net Perls",true) if(retvalue <> 5)
Raise("Error", "StrLastIndexOf() The result should be 5 but is
" + retvalue) end-if
String
Converts a variable to the string format.
You can also use this function to revert a string list back to a string. The elements of the list are separated by [CRLF].
String
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
String(valueToConvert) valueToConvert The variable to convert (alphanumeric, numeric or a string list)
Converted string i=5 s=String(i)
;
StringlistAdd("StrList","Perceptive Software","Konrad-Zuse-Str.
9","74172 Neckarsulm")
Address=String("StrList")
StringListAdd
Adds strings to a string list.
StrDelChar
SYNTAX
ARGUMENTS
EXAMPLE
StringListAdd(stringList, stringParameters) stringList Name of the string list stringParameters Strings to add
Street = "Konrad-Zuse-Str. 9"
Code = "74172"
City = "Neckarsulm"
;
StringlistAdd(SListe, Street, Code, City)
Address = String(SListe)
;-->Address = "Konrad-Zuse-Str. 9,74172,Neckarsulm"
StringListClear
Removes all elements from a string list. If the specified string list does not exist, it is created.
StringListClear
161
SYNTAX
ARGUMENTS
EXAMPLE
StringListClear(stringList) stringList Name of the string list
StringListClear(SListe)
StringListCount
Counts the rows in a string list.
StringListCount
SYNTAX StringListCount(stringList)
ARGUMENTS stringList Name of the string list
RETURN
EXAMPLE
Number of rows i = StringListCount(StrList)
StringListGetCommaText
Returns all rows of a string list in a comma separated string.
StringListGetCommaText
SYNTAX StringListGetCommaText(stringList)
ARGUMENTS stringList Name of the string list
RETURN
EXAMPLE
Content of the string list
Commatext = StringListGetCommatext(StrList)
StringListGetText
Returns the text of a string list. Each row ends with CRLF.
StringListGetText
SYNTAX StringListGetText(stringList)
ARGUMENTS stringList Name of the string list
RETURN
EXAMPLE
Content of the string list
SLText = StringListGetText(StrList)
StringListGetValue
Reads the value of a name within a string list in the form of "Name=Value".
StringListGetValue
SYNTAX StringListGetValue(stringList, aName)
ARGUMENTS stringList Name of the string list aName Identifier of the value to read
RETURN The value assigned to the identifier
162
EXAMPLE
SLValue = StringListGetValue(StrList,Name)
StringListIndexOf
Returns the position of the first element in the line of the string list that contains the specified value.
StringListIndexOf
SYNTAX StringListIndexOf(stringList,aLine)
ARGUMENTS stringList Name of the string list aLine Search value
RETURN
EXAMPLE
Position of the element
StringlistAdd("Title", "Mr.","Mrs.","Company","Family")
Pos = StringListIndexOf ("Title","Company")
;-->Pos=2
StringListItemValues
Reads the value after the specified index and writes the comma separated text in the target string list.
StringListItemValues
SYNTAX StringListItemValues(stringList, lineIndex,destList)
ARGUMENTS stringList Name of the string list
RETURN
EXAMPLE lineIndex Line index of the string list beginning with 0 destList Name of the target string list
Value name
StringlistAdd("test","Valuelist=1,2,3,4,5") name = StringListItemValues("test",0,"Values")
;--> Name = "Valuelist"
; value = StringListLine("Values",0)
;--> value = "1 "
; value = StringListLine("Values",1)
;--> value = "2 "
StringListLine
Reads the content of a line in a string list.
StringListLine
SYNTAX StringListLine(stringList,lineIndex)
ARGUMENTS stringList Name of the string list lineIndex Number of the line to read beginning from 0
RETURN Line content
163
EXAMPLE line = StringListLine("SListe",0)
StringListLoad
Loads a list of strings from a file.
StringListItemValues
SYNTAX StringListLoad(stringList,fileName)
StringListLoad(stringList,fileName,sectionName)
ARGUMENTS stringList Name of the string list fileName Name of the file from which the list loads sectionName Name of the section from which the data loads. This parameter is optional.
RETURN
EXAMPLE
Value name.
StringlistLoad("SListe", "c:\Temp\Test.lst")
StringlistLoad("SListe", "c:\Temp\Test.lst","Section1")
StringListParams
Configures the parameters of the string list.
StringListParams
SYNTAX StringListParams(stringList, sortList, duplicateState)
ARGUMENTS stringList Name of the string list
EXAMPLE sortList TRUE = The string list is sorted
FALSE = The string list is not sorted duplicateState 0 = Ignore - ignore duplicates
1 = Accept - allow duplicates
2 = Error - error message when inserting duplicates. Setting parameters for duplicates has no effect on double strings already included in the list.
StringlistAdd("SListe", "Mr.","Mrs.","Company","Family")
StringListParams("SListe",true,2)
StringlistAdd("SListe", "Company")
StringListSave
Saves a list of strings in a file.
StringListItemValues
SYNTAX StringListSave(stringList, fileName)
StringListSave(stringList, fileName, encoding)
ARGUMENT
S stringLis t
Name of the string list fileNam Name of the file to which the list saves
164
165 e encodin g
IBM500
ASMO-708
DOS-720 ibm737 ibm775 ibm850 ibm852
IBM855 ibm857
IBM00858
IBM860 ibm861
DOS-862
IBM863
IBM864
IBM865 cp866 ibm869
IBM870 windows-874 cp875 shift_jis gb2312 ks_c_5601-1987 big5
IBM1026
864
865
866
869
870
874
875
932
936
949
950
1026
857
858
860
861
862
863
775
850
852
855
500
708
720
737
You can use the following values as encoding parameters.
Empty string. In this case, the default encoding (ANSI code page of the operating system) is used.
Code page, for example, "1252"
Name, for example, "windows-1252"
Friendly name, for example, "Western European" (Windows)
Possible encoding parameters
Code page Name
37 IBM037
Friendly name
IBM EBCDIC (USA-Canada)
437 IBM437 OEM USA
IBM EBCDIC (International)
Arabic (ASMO 708)
Arabic (DOS)
Greek (DOS)
Baltic (DOS)
Western European (DOS)
Eastern European (DOS)
OEM Cyrillic
Turkish (DOS)
OEM Multilingual Latin I
Portuguese (DOS)
Icelandic (DOS)
Hebrew (DOS)
French, Canada (DOS)
Arabic (864)
Nordic (DOS)
Cyrillic (DOS)
Greek, modern (DOS)
IBM EBCDIC (Multilingual Latin-2)
Thai (Windows)
IBM EBCDIC (Greek, modern)
Japanese (Shift-JIS)
Simplified Chinese (GB2312)
Korean
Chinese (Traditional) (Big5)
IBM EBCDIC (Turkish, Latin-5)
166
1047
1140
1141
1142
1143
1258
1361
10000
10001
10002
10003
1252
1253
1254
1255
1256
1257
10004
10005
10006
10007
10008
10010
10017
1144
1145
1146
1147
1148
1149
1200
1201
1250
1251
IBM01047
IBM01140
IBM01141
IBM01142
IBM01143
IBM01144
IBM01145
IBM01146
IBM01147
IBM01148
IBM01149 utf-16 unicodeFFFE windows-1250 windows-1251
Windows-1252 windows-1253 windows-1254 windows-1255 windows-1256 windows-1257 windows-1258
Johab macintosh x-mac-japanese x-mac-chinesetrad x-mac-korean x mac-arabic x-mac-hebrew x-mac-greek x-mac-cyrillic x-mac-chinesesimp x-mac-romanian x-mac-ukrainian
IBM Latin-1
IBM EBCDIC (USA-Canada-European)
IBM EBCDIC (Germany-European)
IBM EBCDIC (Denmark-Norway-
European)
IBM EBCDIC (Finland-Sweden-
European)
IBM EBCDIC (Italian-European)
IBM EBCDIC (Spain-European)
IBM EBCDIC (Great Britain-European)
IBM EBCDIC (France-European)
IBM EBCDIC (International-European)
IBM EBCDIC (Icelandic-European)
Unicode
Unicode (Big Endian)
Central European (Windows)
Cyrillic (Windows)
Western European (Windows)
Greek (Windows)
Turkish (Windows)
Hebrew (Windows)
Arabic (Windows)
Baltic (Windows)
Vietnamese (Windows)
Korean (Johab)
Western European (Mac)
Japanese (Mac)
Chinese traditional (Mac)
Korean (Mac)
Arabic (Mac)
Hebrew (Mac)
Greek (Mac)
Cyrillic (Mac)
Chinese simplified (Mac)
Romanian (Mac)
Ukrainian (Mac)
167
20106
20107
20108
20127
20261
20269
20273
20277
20001
20002
20003
20004
20005
20105
10021
10029
10079
10081
10082
12000
12001
20000
20278
20280
20284
20285
20290
20297
20420
20423
20424
20833
20838
20866 x-mac-thai x-mac-ce x-mac-icelandic x-mac-turkish x-mac-croatian utf-32 utf-32BE x-Chinese-CNS x-cp20001 x-Chinese-Eten x-cp20003 x-cp20004 x-cp20005 x-IA5 x-IA5-German x-IA5-Swedish x-IA5-Norwegian us-ascii x-cp20261 x-cp20269
IBM273
IBM277
IBM278
IBM280
IBM284
IBM285
IBM290
IBM297
IBM420
IBM423
IBM424 x-EBCDIC-
KoreanExtended
IBM-Thai koi8-r
Thai (Mac)
Central European (Mac)
Icelandic (Mac)
Turkish (Mac)
Croatian (Mac)
Unicode (UTF-32)
Unicode (UTF-32-Big Endian)
Chinese traditional (CNS)
TCA Taiwan
Chinese traditional (Eten)
IBM5550 Taiwan
TeleText Taiwan
Wang Taiwan
Western European (IA5)
German (IA5)
Swedish (IA5)
Norwegian (IA5)
US-ASCII
T.61
ISO-6937
IBM EBCDIC (Germany)
IBM EBCDIC (Denmark-Norway)
IBM EBCDIC (Finland-Sweden)
IBM EBCDIC (Italy)
IBM EBCDIC (Spain)
IBM EBCDIC (Great Britain)
IBM EBCDIC (Japanese Katakana)
IBM EBCDIC (France)
IBM EBCDIC (Arabic)
IBM EBCDIC (Greek)
IBM EBCDIC (Hebrew)
IBM EBCDIC (Korean, extended)
IBM EBCDIC (Thai)
Cyrillic (KOI8-R)
168
IBM871
IBM880
IBM905
IBM00924
EUC-JP x-cp20936 x-cp20949 cp1025 koi8-u iso-8859-1 iso-8859-2 iso-8859-3 iso-8859-4 iso-8859-5 iso-8859-6 iso-8859-7 iso-8859-8 iso-8859-9 iso-8859-13 iso-8859-15 x-Europa iso-8859-8-i iso-2022-jp csISO2022JP iso-2022-jp iso-2022-kr x-cp50227 euc-jp
EUC-CN euc-kr hz-gb-2312
GB18030 x-iscii-de x-iscii-be
20871
20880
20905
20924
20932
28603
28605
29001
38598
50220
50221
50222
28594
28595
28596
28597
28598
28599
20936
20949
21025
21866
28591
28592
28593
50225
50227
51932
51936
51949
52936
54936
57002
57003
IBM EBCDIC (Icelandic)
IBM EBCDIC (Cyrillic, Russian)
IBM EBCDIC (Turkish)
IBM Latin-1
Japanese (JIS 0208-1990 and 0212-
1990)
GB2312-80 Chinese (simple)
Korean Wansung
IBM EBCDIC (Cyrillic, Serbian-Bulgarian)
Cyrillic (KOI8-U)
Western European (ISO)
Central European (ISO)
Latin 3 (ISO)
Baltic (ISO)
Cyrillic (ISO)
Arabic (ISO)
Greek (ISO)
Hebrew (ISO-Visual)
Turkish (ISO)
Estonian (ISO)
Latin 9 (ISO)
Europe
Hebrew (ISO-Logical)
Japanese (JIS)
Japanese (JIS, 1 Byte Kana allowed)
Japanese (JIS, 1 Byte Kana allowed -
SO/SI)
Korean (ISO)
ISO-2022 Chinese (simplified)
Japanese (EUC)
Chinese simplified (EUC)
Korean (EUC)
Chinese simplified (HZ)
GB18030 Chinese simplified
ISCII Devanagari
ISCII Bengali
EXAMPLE
57004
57005
57006
57007
57008
57009
57010
57011
65000
65001 x-iscii-ta x-iscii-te x-iscii as x-iscii-or x-iscii-ka x-iscii-ma x-iscii-gu x-iscii-pa utf-7 utf-8
ISCII Tamil
ISCII Telugu
ISCII Assamese
ISCII Oriya
ISCII Kannada
ISCII Malayalam
ISCII Gujarati
ISCII Punjabi
Unicode (UTF-7)
Unicode (UTF-8)
StringlistSave("SListe", "c:\Temp\Test.lst")
StringListSetCommaText
Writes a comma-separated value in a string list.
StringListSetCommaText
SYNTAX StringListSetCommaText(stringList, commaText)
ARGUMENTS stringList Name of the string list
EXAMPLE commaText Comma separated values to save in the string list, for example, "A, B, C"
StringListSetCommatext ("List1", "A,B,C")
StringListSetValue
Sets the value of a name within a string list in the form of: "Name=Value".
StringListSetValue
SYNTAX StringListSetValue(stringList, aName, aValue)
ARGUMENTS stringList Name of the string list
EXAMPLE aName Identifier of the value to set aValue Value to assign to the identifier
StringListSetValue ("List1", "Lastname", "Miller")
StringListSort
Sorts the string list.
StringListSort
SYNTAX StringListSort(stringList)
169
ARGUMENTS
EXAMPLE stringList Name of the string list
StringListSort("StrList")
StrLeft
Left-aligned formatting of a string.
StrLeft
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
StrLeft(inString) inString String or variable
Left aligned string
Var = " 1234"
VarL = StrLeft(Var)
;--> VarL = "1234 "
StrLen
Calculates the length of a string.
StrLen
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
StrLen(inString) inString String or variable
String length
Var = "1234"
Len = StrLen(Var)
;-->Len = 4
StrLower
Converts a string to lower case.
StrLower
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
StrLower(inString) inString String or variable
String in lower case
Var = "PERCEPTIVE SOFTWARE"
VarLow = StrLower(Var)
; VarLow = "perceptive software"
StrPos
Finds a string in a string.
StrPos
170
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
StrPos(searchStr, sourceStr, ignoreCase) searchStr sourceStr
String to find
String to search through ignoreCase TRUE = Case sensitive
FALSE = Not case sensitive
Position of the word in the string or 0 if the search string does not exist
SourceStr = "Monday Tuesday Wednesday"
SuchStr = "Tuesday" res = StrPos(SuchStr, SourceStr, TRUE)
;-->res=8
StrReplace
Replaces characters in a string with other characters.
StrReplace
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
StrReplace(inString, oldValue, newValue) inString oldValue
String or variable
Character to replace newValue Character to insert
Altered string
Example - Replace Characters
var1 = "10/11/2011"
Var2 = StrReplace(Var1, "/", ".")
Var3 = StrReplace(Var1, "/", " - ")
;--> Var2 = "10.11.2011"
;--> Var3 = "10 - 11 - 2011"
Example - Replace Quotes with Parse
Var1 = """John"",""Peter"""
;--> Var1 = "John","Peter" qoute = Parse("^H22;")
Var2 = StrReplace(Var1, quote, "")
;--> Var2=John,Peter
For more information, refer to
StrReverse
Reverses the string.
StrReverse
SYNTAX
ARGUMENTS
RETURN
StrReverse(inString) inString String or variable
Reversed string
171
EXAMPLE
Var = "PERCEPTIVE SOFTWARE"
VarR = StrReverse(Var)
;--> VarR = "ERAWTFOS EVITPECREP"
StrRight
Formats a string right-aligned.
StrRight
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
StrRight(inString) inString String or variable.\
Right aligned string
Var = "1234 "
VarR = StrRight(Var)
; VarR = " 1234"
StrTok
Splits a string after a specified delimiter and returns the extracted string in front of the delimiter as the result.
StrTok
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
StrTok(varName,delimiter) varName String or variable delimiter Separator character
Extracted string
Variable = "1;2;3;4;"
V = StrTok("Variable", ";") ;--> V="1" Variable="2;3;4;"
V = StrTok("Variable", ";") ;--> V="2" Variable="3;4;"
V = StrTok("Variable", ";") ;--> V="3" Variable="4;"
V = StrTok("Variable", ";") ;--> V="4" Variable=""
V = StrTok("Variable", ";") ;--> V="" Variable=""
StrToLen
Reduces a string to a specific length.
StrToLen
SYNTAX
ARGUMENTS
StrToLen(inString, maxLen, fillChar, doRight) inString String or variable maxLen Result length
If the value of this parameter is less than the length of the string, the string truncates at this position.
Otherwise, the string fills to the required length with the defined filling character. fillChar Filling character
172
RETURN
EXAMPLE
If no filling character is defined, the default character is a space. doRight TRUE = Insert filling characters at the beginning.
FALSE = Insert filling characters at the end.
Altered string.
Var = "1234"
Var10 = StrToLen(Var, 10, "0", TRUE)
;--> Var10="0000001234"
Var10 = StrToLen(Var, 10, "0", FALSE)
;--> Var10="1234000000"
StrUpper
Converts a string to upper case.
StrUpper
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
StrUpper(inString) inString String or variable
String in uppercase
Var = "perceptive software"
VarUp = StrUpper(Var)
; VarUp = "PERCEPTIVE SOFTWARE"
StrWord
Extracts the part of a string that is separated by the delimiter.
StrWord
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
StrWord(inString, wordNumber, delimiter) inString String or variable wordNumber Word number beginning with 1 delimiter Separator character
Extracted substring.
Var = StrWord("W1.w2.W3",2,".")
;--> Var = "w2"
StrWordCount
Calculates the number of words according to the specified delimiter.
StrWordCount
SYNTAX StrWordCount(inString, delimiter)
ARGUMENTS inString String or variable delimiter Separator character
RETURN Number of words.
173
EXAMPLE
Var = StrWordCount("W1.w2.W3",".")
;--> Var = 3
SubString
This function retrieves a substring from the given input string. The substring starts at a specified position and has a specified length.
SubString
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
SubString(inString, startIndex, length) inString The string from which a part is extracted startIndex The starting position beginning from 1 length The number of characters in the substring. If you pass the value zero for this parameter, all characters starting from the start Index to the end of the given input string return.
A string of the given length that begins at the start index of the given input string retString = SubString("abc",2,1)
Trim
Removes all leading and trailing white space characters from the input string object.
Trim
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Trim(inString) inString The input string to trim
The string that remains after all white space characters are removed from the start and end of the given input string retString = Trim(" abc XYZ ")
; Result: retString = "abc XYZ"
TrimEnd
Removes all trailing white space characters from the input string.
TrimEnd
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
TrimEnd(inString) inString The input string to trim
The string that remains after all white space characters are removed from the end of the given input string retString = TrimEnd(" abc XYZ ")
; Result: retString = " abc XYZ"
TrimStart
This function removes all leading white space characters from the input string.
174
TrimStart
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
TrimStart(inString) inString The input string to trim
The string that remains after all white-space characters are removed from the start of the given input string retString = TrimStart(" abc XYZ ")
; Result: retString = "abc XYZ "
Trunc
This function truncates the decimal places of a floating point number. If the floating number belongs to the number range of 2147483647 to -2147483648, you must type cast the return value to integer. If the floating number belongs to the number range of 2147483648 to 9223372036854775807 and -
2147483649 to -9223372036854775808, you must type cast the return value to big integer.
Trunc
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Trunc(value) value Floating point number.
Integer d = 1.9 i = Integer(Trunc(d))
;--> i = 1 d = 9999999999.001 i = BigInteger(Trunc(d))
;--> i = 9999999999
UnRegisterLib
Unregisters a function library (DLL).
UnRegisterLib
SYNTAX UnRegisterLib(dllFileName)
ARGUMENTS
EXAMPLE dllFileName Name and path to the DLL
UnRegisterLib("C:\Winnt\System\MSLDB_LIB.DLL")
Update
Alters a dataset and fills fields with values.
Update
SYNTAX
ARGUMENTS
Update(datasetName,rowNum,fields) datasetName Name of the dataset rowNum Row number after which data inserts fields Field values in the correct order
175
EXAMPLE
Update("DSName",1,"Perceptive Software","3","08/10/2013")
VerifyPool
Checks if the specified pool exists and throws an exception if not.
VerifyPool
SYNTAX
ARGUMENTS
EXAMPLE
VerifyPool(poolName) dllFileName Name of the pool to check
VerifyPool("MyPool")
Version
Determines the version of the MonaLisa interpreter.
Version
SYNTAX
RETURN
EXAMPLE
Version()
Version number
MLVersion=Version()
Sample Script: Database Access
This script executes a select statement on a database and iterates through the results. myDBALias = "OrderDataDbAlias" ; Name of existing DB Alias to use for connection to the DB myDataSet = "MyOrderDataDbDataSet" ; Name of local dataset to use mySQlStatement = "Select * FROM xml_job WHERE state=:myState and
SelParams=:mySelParam" ; The sql-statement using parameters mySQLStringList = "SqlList" ; Name of the local list to use for the sqlstatement myParamDescList = "ParamDescList" ; Name of the local parameter description list
InitDatabase(myDBAlias) ; Initiate DB connection
InitDataset(myDataSet, myDBALias) ; Create local dataset
StringlistAdd(mySQLStringList, mySQlStatement) ; Add sql-statement to the sql-stringlist
;Fill parameter description list
StringListClear(myParamDescList)
StringListSetValue(myParamDescList, "myState", "ii")
StringListSetValue(myParamDescList, "mySelParam", "ii") myState = "6" ;Local variable used as first parameter
176
mySelParam ="0815" ;Local variable used as second parameter
SetSQL(myDataSet, mySQLStringList) ; Setting sql-statement (with no parameters in the statement, sql will be executed immediately)
PrepareSQL(myDataSet, myParamDescList) ; Executing sql-statement with parameters
While (EOF(myDataSet) = false) ; As long as not EndOfFile
BundleName = GetField(myDataSet,"BundleName") ; Get the preferred data
Protocol("BundleName: {0}", 8, BundleName) ; Do something with the data
Next(myDataSet) ; Position dataset cursor to next set of data
End-while
177
Xdata Functions
About Xdata functions
This library provides functions that you can use in reading scripts of data objects.
Transaction Control
About transaction control
The StartTransaction, Commit, and Rollback functions allow you to group several database operations
(select, update, delete, insert) into one transaction.
Example
In the following script for an Oracle database, the section Q1 executes a select statement on the database.
After any data processing in the script, the function ExecuteQuery() runs an update on the selected dataset.
SQL statements
Q1: select * from TEST where status = 0 and id = (select min(id) from test where status = 0) for update
Update_Status: update TEST set status = 1 where id = :ID
To make sure the data is locked for other database sessions between the execution of Q1 and
Update_Status, the select statement must contain an update lock using the for update command.
Both SQL commands must be executed in the transaction to maintain the database lock until the update has been executed. db.StartTransaction() db.WorkWithQuery("Q1") db.ApplyDataSet()
… system.ID = db.GetField("ID") db.ExecuteQuery("Update_Status") db.Commit()
StartTransaction
Starts a transaction in the database.
StartTransaction
SYNTAX StartTransaction()
Commit
Ends a database transaction.
Commit
SYNTAX
EXAMPLE
Commit()
Commit()
178
Rollback
Discards all modify, insert, and delete actions of the current transaction and closes the transaction.
RollBack
SYNTAX RollBack()
AddDataRecord
Adds a dataset to the current data object.
AddDataRecord
SYNTAX AddDataRecord(columnValues)
ARGUMENTS
EXAMPLE columnValues Comma-separated values you want to insert as a dataset into the data object. db.AddDataRecord(1234,"John","Miller")
ApplyDataRecord
Applies the current dataset of the logical data model.
ApplyDataRecord
SYNTAX
EXAMPLE
ApplyDataRecord() db.ApplyDataRecord()
ApplyDataSet
Applies the data from the last read statement to the logical data model. All datasets are applied where
1:N relations are found.
ApplyDataSet
SYNTAX
EXAMPLE
ApplyDataSet() db.ApplyDataSet()
DefineContainer
Defines a container to extract values from a database column and store them in so-called container columns.
DefineContainer
SYNTAX DefineContainer(usingMode, fieldName, delimiter)
DefineContainer(usingMode, fieldName, delimiterList)
ARGUMENTS usingMode Currently not available, the term is reserved for future implementation. fieldName delimiter
Name of the container field in the database table.
ASCII-Code of the delimiter, for example 44 for a COMMA.
179
EXAMPLE delimiterList Comma separated list of delimiters. A delimiter is defined by its ASCII-Code.
For example "44,59" specifies a comma or semicolon as possible delimiters. db.WorkWithQuery("Q1") db.DefineContainer(0, "ContainerCol", 59) db.ApplyDataSet()
Eof
Determines whether the cursor is at the end of the dataset.
Eof
SYNTAX
RETURN
EXAMPLE
Eof()
TRUE = Eof reached.
FALSE = Eof not reached.
End_Of_File = db.Eof()
ExecuteQuery
Executes an SQL query.
ExecuteQuery
SYNTAX ExecuteQuery(queryName)
ARGUMENTS
EXAMPLE queryName Name of the query to execute. db.ExecuteQuery("Q2")
First
Positions the dataset cursor at the top of the current data object.
First
SYNTAX
EXAMPLE
First() db.First()
GetField
Returns the field value as a string.
GetField
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
GetField(fieldName) fieldName Name of the column.
Field value. db.WorkWithQuery("Q1") db.ApplyDataSet()
System.Par_Name = db.GetField("PAR_NAME")
180
Last
Positions the dataset cursor at the last dataset of the current data object.
Last
SYNTAX
EXAMPLE
Last() db.Last()
Message
If an error has occurred, the resulting message can be processed by this function.
Message
SYNTAX
RETURN
EXAMPLE
Message()
Error message.
EM=db.Message()
Next
Positions the dataset cursor on the next set of the current data object.
Next
SYNTAX
EXAMPLE
Next() db.Next()
PrepareParameter
Replaces unnamed parameters (%s) in an SQL statement before it passes to the database.
To obtain the value to use, you now need to define the system pool variable in which the value is to be found.
Use the PrepareParameter function to do this. The function passes a comma-separated string containing the names of the corresponding MonaLisa variables in the order they are used in the SQL statement.
The unnamed parameters must be submitted in the same way the database expects them, for example, enclosed in single quotation marks.
PrepareParameter
SYNTAX PrepareParameter(paramValues)
ARGUMENTS paramValues Comma-separated name of the variable.
EXAMPLE
Reading Script system.ParNum = "0815" system.Nr = "2" system.Type = "N" db.PrepareParameter("LfdNr, Type") db.WorkWithQuery("Q1") db.ApplyDataSet()
Query
181
Select * from "ACCOUNTS.DB" where (ACC_Num = %s)
AND (ACC_Par_Num = :ParNum)
AND (ACC_Type = %s)
Prev
Positions the dataset cursor on the previous dataset of the current data object.
Prev
SYNTAX
EXAMPLE
Prev() db.Prev()
RowCount
Returns the number of datasets read.
RowCount
SYNTAX RowCount()
RETURN
EXAMPLE
Number of datasets. i=db.Rowcount()
StartProcedure
Executes a stored procedure.
StartProcedure
SYNTAX StartProcedure(procedureName)
StartProcedure(procedureName, usingMode)
ARGUMENTS procedureName Name of the stored procedure
EXAMPLE usingMode 0 = Binding based on a parameter array. Parameters are specified according to the order of stored procedure definitions.
1 = Binding based on a parameter name. Parameters are passed on through name comparison. db.StartProcedure("DM_PROCEDURE", 1)
WorkWithQuery
Opens a dataset with an SQL query.
WorkWithQuery
SYNTAX WorkWithQuery(queryName)
ARGUMENTS
EXAMPLE queryName Name of the query db.WorkWithQuery("Q1")
182
183
Date Functions
About MLDate
The MonaLisa object MLDate enables you to create an object providing date functions. To load the
object, use the MonaLisa function GetObject .
Example
GetObject("Date","MLDate")
Format specifiers
The format specifiers required as a parameter by some functions must comply to the rules laid down by the .NET framework.
Examples
Format Specifiers Result
dd Day, numeric two digits. ddd dddd
MM
MMM
MMMM yy yyyy hh mm ss
Name of the weekday (abbreviated).
Name of the weekday (full).
Month, numeric two digits.
Name of the month (abbreviated).
Name of the month (full).
Year, numeric two digits.
Year, numeric four digits.
Hours
Minutes
Seconds
All .NET Framework date and time formatting strings are supported. For more information, refer to "Date and Time Format Strings" in msdn.microsoft.com
.
Functions of the Class MLDate
CurrentDate
Returns the current date as a serial number.
CurrentDate
SYNTAX CurrentDate()
RETURN
EXAMPLE
Date as a serial number.
GetObject("date","MLDate")
CurrDateAsInt = date.CurrentDate()
CurrentDateToString
Returns the current date as a date string.
CurrentDateToString
184
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
CurrentDateToString(format) format
Format rules defining the how the date string shows.
Current date as a formatted date string.
GetObject("date","MLDate")
CurrDateAsStr = date.CurrentDateToString("MM.dd.yyyy")
DateStringToInt64
Converts a date string to a serial number date.
DateStringToInt64
SYNTAX DateStringToInt64(format, date)
ARGUMENTS format
Format rules that define the how the date string displays.
date Date string you want to convert.
RETURN
EXAMPLE
Date serial number.
GetObject("date","MLDate")
DateStrToInt = date.DateStringToInt64("MM/dd/yyyy", "10/31/2013")
DayOfWeek
Returns the week day for a date specified as a serial number.
DayOfWeek
SYNTAX
ARGUMENTS
DayOfWeek(date) date Integer date.
RETURN
EXAMPLE
Week day number.
0 = Sunday to 6 = Saturday.
GetObject("date","MLDate")
CurrDateAsInt = date.CurrentDate()
DayOfWeek = date.DayOfWeek(CurrDateAsInt)
DaysInMonth
Calculates the number of days in the specified month for a specific year.
DaysInMonth
SYNTAX DaysInMonth(month, year)
ARGUMENTS month Month as an integer. year Year as an integer.
RETURN
EXAMPLE
Number of days.
GetObject("date","MLDate")
DaysInMonth = date.DaysInMonth(2, 2014)
185
FormatDateTimeString
Formats the specified date string according to the rule for a date string.
FormatDateTimeString
SYNTAX FormatDateTimeString(format, date)
ARGUMENTS format
Format rules defining how the date string displays.
date Date string.
RETURN
EXAMPLE
Formatted date string.
GetObject("date","MLDate")
FormatedDateTimeStr = date.FormatDateTimeString("MM/dd/yyyy",
"31/10/2014")
IncDate
Adds a specific number of days, months and years to a date. If a negative number is defined, then the number is subtracted from the date.
IncDate
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
IncDate(date, days, months, years) date days
Date serial number.
Number of days. months Number of months. years Number of years.
Date serial number
GetObject("date","MLDate")
CurrDateAsInt = date.CurrentDate()
IncDateInt = date.IncDate(CurrDateAsInt, 10, 0, 0)
Int64ToDateString
Converts the specified serial number date in a formatted date string.
Int64ToDateString
SYNTAX Int64ToDateString(format, date)
ARGUMENTS format
Format rules defining how the date string displays.
date Date serial number.
RETURN
EXAMPLE
Date as a formatted date string.
GetObject("date","MLDate")
CurrDateAsInt = date.CurrentDate()
DateIntToStr = date.Int64ToDateString("MM.dd.yyyy",
CurrDateAsInt)
186
IsLeapYear
Checks whether the year in question is a leap year.
IsLeapYear
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
IsLeapYear(year) year Year as a number.
TRUE = The year is a leap year.
FALSE = The year is not a leap year.
GetObject("date","MLDate")
IsLeapYear = date.IsLeapYear(2014)
WeekOfYear
Returns the week number from the specified date serial number in accordance with ISO 8601.
WeekOfYear
SYNTAX WeekOfYear(date)
ARGUMENTS date Date serial number
RETURN
EXAMPLE
Week number
GetObject("date","MLDate")
CurrDateAsInt = date.CurrentDate()
WeekOfYear = date.WeekOfYear(CurrDateAsInt)
187
File Processing
About MLDos
The MonaLisa object MLDos enables you to access files and to perform general file-based operations. To
load the object, use the MonaLisa function GetObject .
Example
GetObject("DOS", "MLDos")
Functions of the Class MLDos
ChangeExtension
Changes the extension of a path string.
ChangeExtension
SYNTAX ChangeExtension(path, extension)
ARGUMENTS Path information you want to modify
RETURN String containing the altered path information.
Combine
Combines two path strings.
CloseSQL
SYNTAX
ARGUMENTS
RETURN
Combine(path1, path2) path1 First path. path2 Second path.
A string containing the combined path entries.
If one of the specified paths is a zero-length string, this function returns the other path. If path2 contains an absolute path, this function returns path2.
CopyFile
Copies an existing file to a new file.
CopyFile
SYNTAX CopyFile(sourceFileName, destFileName)
CopyFile(sourceFileName, destFileName, overwrite)
ARGUMENTS Name of the target file.
The name cannot be a directory and if the parameter 'overwrite' is not set, cannot be an existing file. overwrite True when the target file can be overwritten, otherwise False
CreateTextFile
Creates a text file to use to read, write or append to the file.
188
CreateTextFile
SYNTAX CreateTextFile(newLine)
ARGUMENTS inputFileName Defines the string for a line break. If the parameter is not specified, CRLF
("\r\n" - $0D $0A) is used as the default line break.
Possible values
DOS.NewLineLF = LineFeed ("\n" - $0A)
DOS.NewLineCRLF = CarriageReturn/LineFeed ("\r\n" - $0D $0A)
RETURN MonaLisaTextFile object to use to read, write or append to the file.
CreateDirectory
Creates all directories and subdirectories according to a specified path.
CreateDirectory
SYNTAX CreateDirectory(path)
ARGUMENTS path The directory path you want to create.
DeleteDirectory
Deletes the specified directory, and if so configured, all subdirectories thereof.
DeleteDirectory
SYNTAX DeleteDirectory(path)
DeleteDirectory(path, recursive)
ARGUMENTS path Name of the empty directory you want to delete. This directory must be writable or empty. recursive TRUE = Delete the directories, subdirectories, and files in path.
FALSE = Do not delete the directories, subdirectories, and files.
DeleteFile
Deletes the specified file.
Note No exception is thrown, if the file does not exist.
DeleteFile
SYNTAX
ARGUMENTS
DeleteFile(path) path Name of the file to delete.
DeleteFiles
Deletes all files in a directory and subdirectory that match a search pattern.
DeleteFiles
SYNTAX DeleteFiles(path, searchPattern, recursive)
189
ARGUMENTS path Name of the directory. searchPattern The search string to match against the names of files in path. recursive TRUE = Search subdirectories.
FALSE = Do not search subdirectories.
DirectoryExists
Determines whether the specified path points to a directory on a drive.
DirectoryExists
SYNTAX DirectoryExists(path)
ARGUMENTS path Path you want to test.
RETURN TRUE = Path exists.
FALSE = Path does not exist.
ExecuteSynchron
Starts the specified program and returns an exit code when the program is closed.
ExecuteSynchron
SYNTAX ExecuteSynchron(file, parameter, hide)
ARGUMENTS file Program with path. parameter Program parameters. hide TRUE = Hides the window of the started program.
FALSE = Displays the window of the started program.
RETURN Program exit code
Note for 64-bit operating systems
Perceptive Document Composition is a 32-bit program.
If you use the ExecuteSynchron command to start a program from directory %windir%\System32, you must define the the directory %windir%\Sysnative instead.
If you use the ExecuteSynchron command to start a program from directory C:\windows\System32, you must define the the directory C:\windows\Sysnative instead.
Refer to the Microsoft Developer Network website for more information on the File System Redirector.
FileAppendText
Opens a file, appends the specified string to the file, and then closes the file.
If the file does not already exist, the functio creates it, writes the string in the file, and closes it.
FileAppendText
SYNTAX FileAppendText(fileName, content)
FileAppendText(fileName, content, encoding)
190
ARGUMENT
S fileNam e content encodin g
The file to which the string appends.
865
866
869
870
874
875
932
936
949
857
858
860
861
862
863
864
708
720
737
775
850
852
855
The string to append to the file.
You can use the following values as encoding parameters.
Empty string. In this case, the default encoding (ANSI code page of the operating system) is used.
Code page, for example, "1252"
Name, for example, "windows-1252"
Friendly name, for example, "Western European" (Windows)
Possible encoding parameters
Code page Name
37 IBM037
Friendly name
IBM EBCDIC (USA-Canada)
437
500
IBM437
IBM500
OEM USA
IBM EBCDIC (International)
ASMO-708
DOS-720 ibm737 ibm775 ibm850 ibm852
IBM855 ibm857
IBM00858
IBM860 ibm861
DOS-862
IBM863
IBM864
IBM865 cp866 ibm869
IBM870 windows-874 cp875 shift_jis gb2312 ks_c_5601-1987
Arabic (ASMO 708)
Arabic (DOS)
Greek (DOS)
Baltic (DOS)
Western European (DOS)
Eastern European (DOS)
OEM Cyrillic
Turkish (DOS)
OEM Multilingual Latin I
Portuguese (DOS)
Icelandic (DOS)
Hebrew (DOS)
French, Canada (DOS)
Arabic (864)
Nordic (DOS)
Cyrillic (DOS)
Greek, modern (DOS)
IBM EBCDIC (Multilingual Latin-2)
Thai (Windows)
IBM EBCDIC (Greek, modern)
Japanese (Shift-JIS)
Simplified Chinese (GB2312)
Korean
191
192
1143
1256
1257
1258
1361
10000
10001
1250
1251
1252
1253
1254
1255
10002
10003
10004
10005
10006
10007
10008
1144
1145
1146
1147
1148
1149
1200
1201
950
1026
1047
1140
1141
1142 big5
IBM1026
IBM01047
IBM01140
IBM01141
IBM01142
IBM01143
IBM01144
IBM01145
IBM01146
IBM01147
IBM01148
IBM01149 utf-16 unicodeFFFE windows-1250 windows-1251
Windows-1252 windows-1253 windows-1254 windows-1255 windows-1256 windows-1257 windows-1258
Johab macintosh x-mac-japanese x-mac-chinesetrad x-mac-korean x mac-arabic x-mac-hebrew x-mac-greek x-mac-cyrillic x-mac-chinesesimp
Chinese (Traditional) (Big5)
IBM EBCDIC (Turkish, Latin-5)
IBM Latin-1
IBM EBCDIC (USA-Canada-European)
IBM EBCDIC (Germany-European)
IBM EBCDIC (Denmark-Norway-
European)
IBM EBCDIC (Finland-Sweden-
European)
IBM EBCDIC (Italian-European)
IBM EBCDIC (Spain-European)
IBM EBCDIC (Great Britain-European)
IBM EBCDIC (France-European)
IBM EBCDIC (International-European)
IBM EBCDIC (Icelandic-European)
Unicode
Unicode (Big Endian)
Central European (Windows)
Cyrillic (Windows)
Western European (Windows)
Greek (Windows)
Turkish (Windows)
Hebrew (Windows)
Arabic (Windows)
Baltic (Windows)
Vietnamese (Windows)
Korean (Johab)
Western European (Mac)
Japanese (Mac)
Chinese traditional (Mac)
Korean (Mac)
Arabic (Mac)
Hebrew (Mac)
Greek (Mac)
Cyrillic (Mac)
Chinese simplified (Mac)
193 x-mac-romanian x-mac-ukrainian x-mac-thai x-mac-ce x-mac-icelandic x-mac-turkish x-mac-croatian utf-32 utf-32BE x-Chinese-CNS x-cp20001 x-Chinese-Eten x-cp20003 x-cp20004 x-cp20005 x-IA5 x-IA5-German x-IA5-Swedish x-IA5-Norwegian us-ascii x-cp20261 x-cp20269
IBM273
IBM277
IBM278
IBM280
IBM284
IBM285
IBM290
IBM297
IBM420
IBM423
IBM424 x-EBCDIC-
KoreanExtended
20005
20105
20106
20107
20108
20127
20261
20269
12001
20000
20001
20002
20003
20004
10010
10017
10021
10029
10079
10081
10082
12000
20290
20297
20420
20423
20424
20833
20273
20277
20278
20280
20284
20285
Romanian (Mac)
Ukrainian (Mac)
Thai (Mac)
Central European (Mac)
Icelandic (Mac)
Turkish (Mac)
Croatian (Mac)
Unicode (UTF-32)
Unicode (UTF-32-Big Endian)
Chinese traditional (CNS)
TCA Taiwan
Chinese traditional (Eten)
IBM5550 Taiwan
TeleText Taiwan
Wang Taiwan
Western European (IA5)
German (IA5)
Swedish (IA5)
Norwegian (IA5)
US-ASCII
T.61
ISO-6937
IBM EBCDIC (Germany)
IBM EBCDIC (Denmark-Norway)
IBM EBCDIC (Finland-Sweden)
IBM EBCDIC (Italy)
IBM EBCDIC (Spain)
IBM EBCDIC (Great Britain)
IBM EBCDIC (Japanese Katakana)
IBM EBCDIC (France)
IBM EBCDIC (Arabic)
IBM EBCDIC (Greek)
IBM EBCDIC (Hebrew)
IBM EBCDIC (Korean, extended)
194
IBM-Thai koi8-r
IBM871
IBM880
IBM905
IBM00924
EUC-JP x-cp20936 x-cp20949 cp1025 koi8-u iso-8859-1 iso-8859-2 iso-8859-3 iso-8859-4 iso-8859-5 iso-8859-6 iso-8859-7 iso-8859-8 iso-8859-9 iso-8859-13 iso-8859-15 x-Europa iso-8859-8-i iso-2022-jp csISO2022JP iso-2022-jp iso-2022-kr x-cp50227 euc-jp
EUC-CN euc-kr hz-gb-2312
GB18030
28598
28599
28603
28605
29001
38598
50220
50221
50222
20936
20949
21025
21866
28591
28592
28593
28594
28595
28596
28597
50225
50227
51932
51936
51949
52936
54936
20838
20866
20871
20880
20905
20924
20932
IBM EBCDIC (Thai)
Cyrillic (KOI8-R)
IBM EBCDIC (Icelandic)
IBM EBCDIC (Cyrillic, Russian)
IBM EBCDIC (Turkish)
IBM Latin-1
Japanese (JIS 0208-1990 and 0212-
1990)
GB2312-80 Chinese (simple)
Korean Wansung
IBM EBCDIC (Cyrillic, Serbian-Bulgarian)
Cyrillic (KOI8-U)
Western European (ISO)
Central European (ISO)
Latin 3 (ISO)
Baltic (ISO)
Cyrillic (ISO)
Arabic (ISO)
Greek (ISO)
Hebrew (ISO-Visual)
Turkish (ISO)
Estonian (ISO)
Latin 9 (ISO)
Europe
Hebrew (ISO-Logical)
Japanese (JIS)
Japanese (JIS, 1 Byte Kana allowed)
Japanese (JIS, 1 Byte Kana allowed -
SO/SI)
Korean (ISO)
ISO-2022 Chinese (simplified)
Japanese (EUC)
Chinese simplified (EUC)
Korean (EUC)
Chinese simplified (HZ)
GB18030 Chinese simplified
57002
57003
57004
57005
57006
57007
57008
57009
57010
57011
65000
65001 x-iscii-de x-iscii-be x-iscii-ta x-iscii-te x-iscii as x-iscii-or x-iscii-ka x-iscii-ma x-iscii-gu x-iscii-pa utf-7 utf-8
ISCII Devanagari
ISCII Bengali
ISCII Tamil
ISCII Telugu
ISCII Assamese
ISCII Oriya
ISCII Kannada
ISCII Malayalam
ISCII Gujarati
ISCII Punjabi
Unicode (UTF-7)
Unicode (UTF-8)
FileExists
Checks whether the specified file exists.
FileExists
SYNTAX
ARGUMENTS
RETURN
FileExists(path) path The file to check.
TRUE = The caller has sufficient rights and
path contains the name of an existing file.
FALSE = Invalid path or string length 0 set for
path. An exception is thrown if a caller does not possess sufficient rights to read the specified file. The function returns FALSE irrespective of whether
path exists.
FileReadAllBytes
Opens a file, reads the file content into a byte array, and then closes the file.
FileReadAllBytes
SYNTAX FileReadAllBytes(fileName)
ARGUMENTS fileName The file to open.
RETURN The complete file content as byte array.
FileReadAllText
Opens a text file, reads all lines of the file, and then closes the file.
FileReadAllText
195
SYNTAX
ARGUMENT
S
862
863
864
865
866
869
870
874
875
932
936
850
852
855
857
858
860
861
FileReadAllText(fileName)
FileReadAllText(fileName, encoding)
The file to open. fileNam e encodin g
You can use the following values as encoding parameters.
Empty string. In this case, the default encoding (ANSI code page of the operating system) is used.
Code page, for example, "1252"
Name, for example, "windows-1252"
Friendly name, for example, "Western European" (Windows)
Possible encoding parameters
Code page Name
37 IBM037
Friendly name
IBM EBCDIC (USA-Canada)
437
500
708
720
737
775
IBM437
IBM500
ASMO-708
DOS-720 ibm737 ibm775
OEM USA
IBM EBCDIC (International)
Arabic (ASMO 708)
Arabic (DOS)
Greek (DOS)
Baltic (DOS) ibm850 ibm852
IBM855 ibm857
IBM00858
IBM860 ibm861
DOS-862
IBM863
IBM864
IBM865 cp866 ibm869
IBM870 windows-874 cp875 shift_jis gb2312
Western European (DOS)
Eastern European (DOS)
OEM Cyrillic
Turkish (DOS)
OEM Multilingual Latin I
Portuguese (DOS)
Icelandic (DOS)
Hebrew (DOS)
French, Canada (DOS)
Arabic (864)
Nordic (DOS)
Cyrillic (DOS)
Greek, modern (DOS)
IBM EBCDIC (Multilingual Latin-2)
Thai (Windows)
IBM EBCDIC (Greek, modern)
Japanese (Shift-JIS)
Simplified Chinese (GB2312)
196
197
949
950
1026
1047
1140
1141
1142
1143
10001
10002
10003
10004
10005
10006
10007
1255
1256
1257
1258
1361
10000
1201
1250
1251
1252
1253
1254
1144
1145
1146
1147
1148
1149
1200 ks_c_5601-1987 big5
IBM1026
IBM01047
IBM01140
IBM01141
IBM01142
IBM01143
IBM01144
IBM01145
IBM01146
IBM01147
IBM01148
IBM01149 utf-16 unicodeFFFE windows-1250 windows-1251
Windows-1252 windows-1253 windows-1254 windows-1255 windows-1256 windows-1257 windows-1258
Johab macintosh x-mac-japanese x-mac-chinesetrad x-mac-korean x mac-arabic x-mac-hebrew x-mac-greek x-mac-cyrillic
Korean
Chinese (Traditional) (Big5)
IBM EBCDIC (Turkish, Latin-5)
IBM Latin-1
IBM EBCDIC (USA-Canada-European)
IBM EBCDIC (Germany-European)
IBM EBCDIC (Denmark-Norway-
European)
IBM EBCDIC (Finland-Sweden-
European)
IBM EBCDIC (Italian-European)
IBM EBCDIC (Spain-European)
IBM EBCDIC (Great Britain-European)
IBM EBCDIC (France-European)
IBM EBCDIC (International-European)
IBM EBCDIC (Icelandic-European)
Unicode
Unicode (Big Endian)
Central European (Windows)
Cyrillic (Windows)
Western European (Windows)
Greek (Windows)
Turkish (Windows)
Hebrew (Windows)
Arabic (Windows)
Baltic (Windows)
Vietnamese (Windows)
Korean (Johab)
Western European (Mac)
Japanese (Mac)
Chinese traditional (Mac)
Korean (Mac)
Arabic (Mac)
Hebrew (Mac)
Greek (Mac)
Cyrillic (Mac)
198
20004
20005
20105
20106
20107
20108
20127
20261
12000
12001
20000
20001
20002
20003
10008
10010
10017
10021
10029
10079
10081
10082
20285
20290
20297
20420
20423
20424
20269
20273
20277
20278
20280
20284
20833 x-cp20269
IBM273
IBM277
IBM278
IBM280
IBM284
IBM285
IBM290
IBM297
IBM420
IBM423
IBM424 x-EBCDICx-mac-chinesesimp x-mac-romanian x-mac-ukrainian x-mac-thai x-mac-ce x-mac-icelandic x-mac-turkish x-mac-croatian utf-32 utf-32BE x-Chinese-CNS x-cp20001 x-Chinese-Eten x-cp20003 x-cp20004 x-cp20005 x-IA5 x-IA5-German x-IA5-Swedish x-IA5-Norwegian us-ascii x-cp20261
Chinese simplified (Mac)
Romanian (Mac)
Ukrainian (Mac)
Thai (Mac)
Central European (Mac)
Icelandic (Mac)
Turkish (Mac)
Croatian (Mac)
Unicode (UTF-32)
Unicode (UTF-32-Big Endian)
Chinese traditional (CNS)
TCA Taiwan
Chinese traditional (Eten)
IBM5550 Taiwan
TeleText Taiwan
Wang Taiwan
Western European (IA5)
German (IA5)
Swedish (IA5)
Norwegian (IA5)
US-ASCII
T.61
ISO-6937
IBM EBCDIC (Germany)
IBM EBCDIC (Denmark-Norway)
IBM EBCDIC (Finland-Sweden)
IBM EBCDIC (Italy)
IBM EBCDIC (Spain)
IBM EBCDIC (Great Britain)
IBM EBCDIC (Japanese Katakana)
IBM EBCDIC (France)
IBM EBCDIC (Arabic)
IBM EBCDIC (Greek)
IBM EBCDIC (Hebrew)
IBM EBCDIC (Korean, extended)
199
KoreanExtended
IBM-Thai koi8-r
IBM871
IBM880
IBM905
IBM00924
EUC-JP x-cp20936 x-cp20949 cp1025 koi8-u iso-8859-1 iso-8859-2 iso-8859-3 iso-8859-4 iso-8859-5 iso-8859-6 iso-8859-7 iso-8859-8 iso-8859-9 iso-8859-13 iso-8859-15 x-Europa iso-8859-8-i iso-2022-jp csISO2022JP iso-2022-jp iso-2022-kr x-cp50227 euc-jp
EUC-CN euc-kr hz-gb-2312
28596
28597
28598
28599
28603
28605
29001
38598
50220
50221
50222
20936
20949
21025
21866
28591
28592
28593
28594
28595
50225
50227
51932
51936
51949
52936
20838
20866
20871
20880
20905
20924
20932
IBM EBCDIC (Thai)
Cyrillic (KOI8-R)
IBM EBCDIC (Icelandic)
IBM EBCDIC (Cyrillic, Russian)
IBM EBCDIC (Turkish)
IBM Latin-1
Japanese (JIS 0208-1990 and 0212-
1990)
GB2312-80 Chinese (simple)
Korean Wansung
IBM EBCDIC (Cyrillic, Serbian-Bulgarian)
Cyrillic (KOI8-U)
Western European (ISO)
Central European (ISO)
Latin 3 (ISO)
Baltic (ISO)
Cyrillic (ISO)
Arabic (ISO)
Greek (ISO)
Hebrew (ISO-Visual)
Turkish (ISO)
Estonian (ISO)
Latin 9 (ISO)
Europe
Hebrew (ISO-Logical)
Japanese (JIS)
Japanese (JIS, 1 Byte Kana allowed)
Japanese (JIS, 1 Byte Kana allowed -
SO/SI)
Korean (ISO)
ISO-2022 Chinese (simplified)
Japanese (EUC)
Chinese simplified (EUC)
Korean (EUC)
Chinese simplified (HZ)
54936
57002
57003
57004
57005
57006
57007
57008
57009
57010
57011
65000
65001
RETURN A string containing all lines of the file.
FileSize
Returns the size of a file.
FileReadAllText
SYNTAX FileSize(fileName)
ARGUMENTS fileName Name of the file.
RETURN Size of the file.
GetCommandLine
Returns the command line for the process.
GetCommandLine
SYNTAX GetCommandLine()
RETURN String containing all command line arguments.
GetCommandLineArgByName
Returns the specified command line argument.
GetCommandLineArgByName
SYNTAX GetCommandLineArgByName(name)
GB18030 x-iscii-de x-iscii-be x-iscii-ta x-iscii-te x-iscii as x-iscii-or x-iscii-ka x-iscii-ma x-iscii-gu x-iscii-pa utf-7 utf-8
200
GB18030 Chinese simplified
ISCII Devanagari
ISCII Bengali
ISCII Tamil
ISCII Telugu
ISCII Assamese
ISCII Oriya
ISCII Kannada
ISCII Malayalam
ISCII Gujarati
ISCII Punjabi
Unicode (UTF-7)
Unicode (UTF-8)
ARGUMENTS
RETURN name Name of the command line argument.
Value of the command line argument, or an empty string if the parameter does not exist.
GetCommandLineArgs
Returns a comma separated string of the command line arguments of the current process.
GetCommandLineArgs
SYNTAX GetCommandLineArgs()
RETURN Comma separated string of the command line arguments, or an empty string.
GetCurrentDirectory
Gets the current working directory of the program.
GetCurrentDirectory
SYNTAX GetCurrentDirectory()
RETURN String containing the path of the current working directory.
GetDirectories
Returns the names of subdirectories in a specified directory as a comma separated string.
GetDirectories
SYNTAX GetDirectories(path)
GetDirectories(path, searchPattern)
GetDirectories(path, searchPattern, recursive)
ARGUMENTS path Path where the names of the subdirectories are obtained. searchPattern
The search string to match against the names of files in path. recursive TRUE = Search subdirectories.
FALSE = Do not search subdirectories.
RETURN Comma separated string containing the names of all subdirectories.
GetDirectoryName
Returns the directory information for a specified path string.
GetDirectoryName
SYNTAX GetDirectoryName(path)
ARGUMENTS path Path of a file or directory.
RETURN
String containing directory information for path or an empty string if path has no directory information.
201
GetDirectoryRoot
Returns information regarding the volume, root or both for the specified path.
GetDirectoryRoot
SYNTAX GetDirectoryRoot(path)
ARGUMENTS path Path of a file or directory.
RETURN String containing information regarding the volume, root or both.
GetEnvironmentVariable
Returns the value of an environment variable.
GetEnvironmentVariable
SYNTAX GetEnvironmentVariable(variable)
ARGUMENTS variable Name of the environment variable.
RETURN The value of the environment variable specified as variable, or an empty string if the environment variable does not exist.
GetExtension
Returns the file extension of the specified path string.
GetExtension
SYNTAX GetExtension(path)
ARGUMENTS path Path string from which the extension is read.
RETURN String containing the extension of the specified path (including ".").
GetFileName
Returns the file name and extension of the specified path.
GetFileName
SYNTAX GetFileName(path)
ARGUMENTS path Path where the file name and extension is obtained.
RETURN String containing the characters after the last directory character in path. If the last character of path is a directory or volume separator character, this function returns an empty string.
GetFileNameWithoutExtension
Returns the name of the file from the specified path string without the extension.
GetFileNameWithoutExtension
SYNTAX GetFileNameWithoutExtension(path)
202
ARGUMENTS
RETURN path Path of the file.
String containing the result string from GetFileName without the last dot (.) and all following characters.
GetFiles
Returns the names of files in a specified directory as a comma separated string.
GetFiles
SYNTAX
ARGUMENTS
RETURN
GetFiles(path)
GetFiles(path, searchPattern)
GetFiles(path, searchPattern, recursive) path The directory from which the files are obtained. searchPattern The search string to match against the names of files in path. The searchPattern parameter cannot end in two periods ("..") or contain two periods ("..") recursive TRUE = Search in the current directory and all subdirectories.
Note If the directory structure contains a link that creates a loop back within the directory structure, the search results in an infinite loop.
FALSE = Search only in the current directory.
A comma separated string of file names in the specified directory.
Defining the searchPattern parameter returns the names of files that match the specified search pattern. File names contain the full path.
GetFileSystemEntries
Returns the names of all files and subdirectories in a specified directory in a comma separated string.
GetFileSystemEntries
SYNTAX GetFileSystemEntries(path)
GetFileSystemEntries(path, searchPattern)
ARGUMENTS path The directory the files are obtained from. searchPattern The search string to match against the names of files in path. The searchPattern parameter cannot end in two periods ("..") or contain two periods ("..")
RETURN A comma separated string containing the names of the file system entries found in the specified directory and matching the search criteria specified in searchPattern.
GetFullPath
Returns the absolute path for a specified path string.
GetFullPath
SYNTAX
ARGUMENTS
GetFullPath(path) path File or directory for which the absolute path information is retrieved.
RETURN String containing the absolute path of the variable path, for example "C:\MyFile.txt".
203
GetLogicalDrives
Returns the names of the logical drives of this computer in the format "<DriveLetter>:\".
GetLogicalDrives
SYNTAX GetLogicalDrives()
RETURN The logical drives of this computer.
GetParentDirectory
Retrieves the parent directory of the specified path, including both absolute and relative paths.
GetParentDirectory
SYNTAX GetParentDirectory(path)
ARGUMENTS path Path from which the parent directory retrieves.
RETURN The parent directory or an empty string when path is the root directory, including the root of a UNC server or share name.
GetPathRoot
Returns the root directory information of the specified path.
GetPathRoot
SYNTAX GetPathRoot(path)
ARGUMENTS path Path from which the root directory information retrieves.
RETURN A string containing the root directory from path, for example "C:\" or an empty string when path contains no information on the root directory.
GetRandomFileName
Returns a random file or directory name.
GetRandomFileName
SYNTAX GetRandomFileName()
RETURN Random file or directory name.
Notes
This function returns a cryptographically strong, random string that you can use as either a directory name or a file name.
Unlike GetTempFileName , the GetRandomFileName function does not create a file.
When the security of your file system is paramount, use this function instead of GetTempFileName .
GetTempFileName
204
Creates a uniquely named temporary file, with the .tmp extension, of zero bytes on a data storage device and returns the full path to this file.
GetTempFileName
SYNTAX GetTempFileName()
RETURN String containing the full path of the temporary file.
GetTempPath
Returns the path to the temporary directory of the current system.
GetTempPath
SYNTAX GetTempPath()
RETURN String containing the path to a temporary directory.
HasExtension
Determines whether a path contains a file name extension.
HasExtension
SYNTAX HasExtension(path)
ARGUMENTS path Path in which to search for an extension.
RETURN TRUE = The characters that follow the last directory separator (\\ or /) or volume separator character (:) contain a period (.) and one or more trailing characters.
FALSE = The path does not contain a file name extension.
IsPathRooted
Returns a value denoting whether the specified path string contains a relative or absolute path.
IsPathRooted
SYNTAX IsPathRooted(path)
ARGUMENTS path Path to test.
RETURN TRUE = The string contains an absolute path.
FALSE = The string contains a relative path.
MoveDirectory
Moves a file or directory and its content to a new storage location.
MoveDirectory
SYNTAX
MoveDirectory(sourceDirName, destDirName)
ARGUMENTS sourceDirName Path of the file or directory to move. destDirName Path to the new storage location for sourceDirName.
205
If sourceDirName is a file, then destDirName must also be a file name.
MoveFile
Moves the specified file to a new storage location and also allows you to modify the name of the file.
MoveFile
SYNTAX
ARGUMENTS
MoveFile(sourceFileName, destFileName) sourceFileName Name of the file to move. destFileName New path to the file.
ReplaceFile
Replaces the content of a specified file with the content of another file, deletes the original file, and creates a back up copy of the replaced file.
ReplaceFile
SYNTAX
ARGUMENTS
ReplaceFile(sourceFileName, destinationFileName, destinationBackupFileName) sourceFileName The name of the file that the file defined as destinationFileName replaces. destinationFileName The name of the file to replace. destinationBackupFileName The name of the backup file of the file that is replaced or an empty string if no backup file is required.
SetCurrentDirectory
Sets the current working directory of the program to the specified directory.
SetCurrentDirectory
SYNTAX SetCurrentDirectory(path)
ARGUMENTS path Path of the current working directory
Properties of the class MLDos
Property
NewLine
Description
Gets the string for a line break defined for a specific environment.
NewLineLF Returns LineFeed as a string ("\n" - $0A).
NewLineCRLF Returns CarriageReturn / LineFeed (CRLF) as a string ("\r\n" - $0D $0A).
Functions of the Class MonaLisaTextFile
Append
Opens a file to append text.
206
Append
SYNTAX
ARGUMENT
S
Append(string fileName)
Append(string fileName, string encoding)
The path to the file you want to append. fileNam e encodin g
You can use the following values as encoding parameters.
Empty string. In this case, the default encoding (ANSI code page of the operating system) is used.
Code page, for example, "1252"
Name, for example, "windows-1252"
Friendly name, for example, "Western European" (Windows)
Possible encoding parameters
Code page Name
37 IBM037
Friendly name
IBM EBCDIC (USA-Canada)
437
500
708
720
IBM437
IBM500
ASMO-708
DOS-720
OEM USA
IBM EBCDIC (International)
Arabic (ASMO 708)
Arabic (DOS)
858
860
861
862
863
864
737
775
850
852
855
857
874
875
932
936
865
866
869
870 ibm737 ibm775 ibm850 ibm852
IBM855 ibm857
IBM00858
IBM860 ibm861
DOS-862
IBM863
IBM864
IBM865 cp866 ibm869
IBM870 windows-874 cp875 shift_jis gb2312
Greek (DOS)
Baltic (DOS)
Western European (DOS)
Eastern European (DOS)
OEM Cyrillic
Turkish (DOS)
OEM Multilingual Latin I
Portuguese (DOS)
Icelandic (DOS)
Hebrew (DOS)
French, Canada (DOS)
Arabic (864)
Nordic (DOS)
Cyrillic (DOS)
Greek, modern (DOS)
IBM EBCDIC (Multilingual Latin-2)
Thai (Windows)
IBM EBCDIC (Greek, modern)
Japanese (Shift-JIS)
Simplified Chinese (GB2312)
207
208
949
950
1026
1047
1140
1141
1142
1143
10001
10002
10003
10004
10005
10006
10007
1255
1256
1257
1258
1361
10000
1201
1250
1251
1252
1253
1254
1144
1145
1146
1147
1148
1149
1200 ks_c_5601-1987 big5
IBM1026
IBM01047
IBM01140
IBM01141
IBM01142
IBM01143
IBM01144
IBM01145
IBM01146
IBM01147
IBM01148
IBM01149 utf-16 unicodeFFFE windows-1250 windows-1251
Windows-1252 windows-1253 windows-1254 windows-1255 windows-1256 windows-1257 windows-1258
Johab macintosh x-mac-japanese x-mac-chinesetrad x-mac-korean x mac-arabic x-mac-hebrew x-mac-greek x-mac-cyrillic
Korean
Chinese (Traditional) (Big5)
IBM EBCDIC (Turkish, Latin-5)
IBM Latin-1
IBM EBCDIC (USA-Canada-European)
IBM EBCDIC (Germany-European)
IBM EBCDIC (Denmark-Norway-
European)
IBM EBCDIC (Finland-Sweden-
European)
IBM EBCDIC (Italian-European)
IBM EBCDIC (Spain-European)
IBM EBCDIC (Great Britain-European)
IBM EBCDIC (France-European)
IBM EBCDIC (International-European)
IBM EBCDIC (Icelandic-European)
Unicode
Unicode (Big Endian)
Central European (Windows)
Cyrillic (Windows)
Western European (Windows)
Greek (Windows)
Turkish (Windows)
Hebrew (Windows)
Arabic (Windows)
Baltic (Windows)
Vietnamese (Windows)
Korean (Johab)
Western European (Mac)
Japanese (Mac)
Chinese traditional (Mac)
Korean (Mac)
Arabic (Mac)
Hebrew (Mac)
Greek (Mac)
Cyrillic (Mac)
209
20004
20005
20105
20106
20107
20108
20127
20261
12000
12001
20000
20001
20002
20003
10008
10010
10017
10021
10029
10079
10081
10082
20285
20290
20297
20420
20423
20424
20269
20273
20277
20278
20280
20284
20833 x-cp20269
IBM273
IBM277
IBM278
IBM280
IBM284
IBM285
IBM290
IBM297
IBM420
IBM423
IBM424 x-EBCDICx-mac-chinesesimp x-mac-romanian x-mac-ukrainian x-mac-thai x-mac-ce x-mac-icelandic x-mac-turkish x-mac-croatian utf-32 utf-32BE x-Chinese-CNS x-cp20001 x-Chinese-Eten x-cp20003 x-cp20004 x-cp20005 x-IA5 x-IA5-German x-IA5-Swedish x-IA5-Norwegian us-ascii x-cp20261
Chinese simplified (Mac)
Romanian (Mac)
Ukrainian (Mac)
Thai (Mac)
Central European (Mac)
Icelandic (Mac)
Turkish (Mac)
Croatian (Mac)
Unicode (UTF-32)
Unicode (UTF-32-Big Endian)
Chinese traditional (CNS)
TCA Taiwan
Chinese traditional (Eten)
IBM5550 Taiwan
TeleText Taiwan
Wang Taiwan
Western European (IA5)
German (IA5)
Swedish (IA5)
Norwegian (IA5)
US-ASCII
T.61
ISO-6937
IBM EBCDIC (Germany)
IBM EBCDIC (Denmark-Norway)
IBM EBCDIC (Finland-Sweden)
IBM EBCDIC (Italy)
IBM EBCDIC (Spain)
IBM EBCDIC (Great Britain)
IBM EBCDIC (Japanese Katakana)
IBM EBCDIC (France)
IBM EBCDIC (Arabic)
IBM EBCDIC (Greek)
IBM EBCDIC (Hebrew)
IBM EBCDIC (Korean, extended)
210
KoreanExtended
IBM-Thai koi8-r
IBM871
IBM880
IBM905
IBM00924
EUC-JP x-cp20936 x-cp20949 cp1025 koi8-u iso-8859-1 iso-8859-2 iso-8859-3 iso-8859-4 iso-8859-5 iso-8859-6 iso-8859-7 iso-8859-8 iso-8859-9 iso-8859-13 iso-8859-15 x-Europa iso-8859-8-i iso-2022-jp csISO2022JP iso-2022-jp iso-2022-kr x-cp50227 euc-jp
EUC-CN euc-kr hz-gb-2312
28596
28597
28598
28599
28603
28605
29001
38598
50220
50221
50222
20936
20949
21025
21866
28591
28592
28593
28594
28595
50225
50227
51932
51936
51949
52936
20838
20866
20871
20880
20905
20924
20932
IBM EBCDIC (Thai)
Cyrillic (KOI8-R)
IBM EBCDIC (Icelandic)
IBM EBCDIC (Cyrillic, Russian)
IBM EBCDIC (Turkish)
IBM Latin-1
Japanese (JIS 0208-1990 and 0212-
1990)
GB2312-80 Chinese (simple)
Korean Wansung
IBM EBCDIC (Cyrillic, Serbian-Bulgarian)
Cyrillic (KOI8-U)
Western European (ISO)
Central European (ISO)
Latin 3 (ISO)
Baltic (ISO)
Cyrillic (ISO)
Arabic (ISO)
Greek (ISO)
Hebrew (ISO-Visual)
Turkish (ISO)
Estonian (ISO)
Latin 9 (ISO)
Europe
Hebrew (ISO-Logical)
Japanese (JIS)
Japanese (JIS, 1 Byte Kana allowed)
Japanese (JIS, 1 Byte Kana allowed -
SO/SI)
Korean (ISO)
ISO-2022 Chinese (simplified)
Japanese (EUC)
Chinese simplified (EUC)
Korean (EUC)
Chinese simplified (HZ)
54936
57002
57003
57004
57005
57006
57007
57008
57009
57010
57011
65000
65001
GB18030 x-iscii-de x-iscii-be x-iscii-ta x-iscii-te x-iscii as x-iscii-or x-iscii-ka x-iscii-ma x-iscii-gu x-iscii-pa utf-7 utf-8
File.Append("c:\temp\test.txt")
EXAMPLE
Close
Closes an open file.
Close
SYNTAX
EXAMPLE
Close()
Close()
GB18030 Chinese simplified
ISCII Devanagari
ISCII Bengali
ISCII Tamil
ISCII Telugu
ISCII Assamese
ISCII Oriya
ISCII Kannada
ISCII Malayalam
ISCII Gujarati
ISCII Punjabi
Unicode (UTF-7)
Unicode (UTF-8)
Create
Creates or opens a file in which to write text.
Create
SYNTAX
ARGUMENT
S
Create(fileName)
Create(fileName, encoding)
The file you want to create or open. fileNam e encodin g
You can use the following values as encoding parameters.
Empty string. In this case, the default encoding (ANSI code page of the operating system) is used.
Code page, for example, "1252"
Name, for example, "windows-1252"
Friendly name, for example, "Western European" (Windows)
Possible encoding parameters
211
212
932
936
949
950
1026
1047
864
865
866
869
870
874
875
1140
1141
1142
857
858
860
861
862
863
720
737
775
850
852
855
Code page Name
37 IBM037
437
500
708
IBM437
IBM500
ASMO-708
DOS-720 ibm737 ibm775 ibm850 ibm852
IBM855 ibm857
IBM00858
IBM860 ibm861
DOS-862
IBM863
IBM864
IBM865 cp866 ibm869
IBM870 windows-874 cp875 shift_jis gb2312 ks_c_5601-1987 big5
IBM1026
IBM01047
IBM01140
IBM01141
IBM01142
1143 IBM01143
Friendly name
IBM EBCDIC (USA-Canada)
OEM USA
IBM EBCDIC (International)
Arabic (ASMO 708)
Arabic (DOS)
Greek (DOS)
Baltic (DOS)
Western European (DOS)
Eastern European (DOS)
OEM Cyrillic
Turkish (DOS)
OEM Multilingual Latin I
Portuguese (DOS)
Icelandic (DOS)
Hebrew (DOS)
French, Canada (DOS)
Arabic (864)
Nordic (DOS)
Cyrillic (DOS)
Greek, modern (DOS)
IBM EBCDIC (Multilingual Latin-2)
Thai (Windows)
IBM EBCDIC (Greek, modern)
Japanese (Shift-JIS)
Simplified Chinese (GB2312)
Korean
Chinese (Traditional) (Big5)
IBM EBCDIC (Turkish, Latin-5)
IBM Latin-1
IBM EBCDIC (USA-Canada-European)
IBM EBCDIC (Germany-European)
IBM EBCDIC (Denmark-Norway-
European)
IBM EBCDIC (Finland-Sweden-
European)
213
1256
1257
1258
1361
10000
10001
10002
10003
1250
1251
1252
1253
1254
1255
1144
1145
1146
1147
1148
1149
1200
1201
10017
10021
10029
10079
10081
10082
10004
10005
10006
10007
10008
10010
12000
IBM01144
IBM01145
IBM01146
IBM01147
IBM01148
IBM01149 utf-16 unicodeFFFE windows-1250 windows-1251
Windows-1252 windows-1253 windows-1254 windows-1255 windows-1256 windows-1257 windows-1258
Johab macintosh x-mac-japanese x-mac-chinesetrad x-mac-korean x mac-arabic x-mac-hebrew x-mac-greek x-mac-cyrillic x-mac-chinesesimp x-mac-romanian x-mac-ukrainian x-mac-thai x-mac-ce x-mac-icelandic x-mac-turkish x-mac-croatian utf-32
IBM EBCDIC (Italian-European)
IBM EBCDIC (Spain-European)
IBM EBCDIC (Great Britain-European)
IBM EBCDIC (France-European)
IBM EBCDIC (International-European)
IBM EBCDIC (Icelandic-European)
Unicode
Unicode (Big Endian)
Central European (Windows)
Cyrillic (Windows)
Western European (Windows)
Greek (Windows)
Turkish (Windows)
Hebrew (Windows)
Arabic (Windows)
Baltic (Windows)
Vietnamese (Windows)
Korean (Johab)
Western European (Mac)
Japanese (Mac)
Chinese traditional (Mac)
Korean (Mac)
Arabic (Mac)
Hebrew (Mac)
Greek (Mac)
Cyrillic (Mac)
Chinese simplified (Mac)
Romanian (Mac)
Ukrainian (Mac)
Thai (Mac)
Central European (Mac)
Icelandic (Mac)
Turkish (Mac)
Croatian (Mac)
Unicode (UTF-32)
214
20838
20866
20871
20880
20905
20924
20932
20936
20273
20277
20278
20280
20284
20285
20290
20297
20106
20107
20108
20127
20261
20269
20420
20423
20424
20833
12001
20000
20001
20002
20003
20004
20005
20105 utf-32BE x-Chinese-CNS x-cp20001 x-Chinese-Eten x-cp20003 x-cp20004 x-cp20005 x-IA5 x-IA5-German x-IA5-Swedish x-IA5-Norwegian us-ascii x-cp20261 x-cp20269
IBM273
IBM277
IBM278
IBM280
IBM284
IBM285
IBM290
IBM297
IBM420
IBM423
IBM424 x-EBCDIC-
KoreanExtended
IBM-Thai koi8-r
IBM871
IBM880
IBM905
IBM00924
EUC-JP x-cp20936
Unicode (UTF-32-Big Endian)
Chinese traditional (CNS)
TCA Taiwan
Chinese traditional (Eten)
IBM5550 Taiwan
TeleText Taiwan
Wang Taiwan
Western European (IA5)
German (IA5)
Swedish (IA5)
Norwegian (IA5)
US-ASCII
T.61
ISO-6937
IBM EBCDIC (Germany)
IBM EBCDIC (Denmark-Norway)
IBM EBCDIC (Finland-Sweden)
IBM EBCDIC (Italy)
IBM EBCDIC (Spain)
IBM EBCDIC (Great Britain)
IBM EBCDIC (Japanese Katakana)
IBM EBCDIC (France)
IBM EBCDIC (Arabic)
IBM EBCDIC (Greek)
IBM EBCDIC (Hebrew)
IBM EBCDIC (Korean, extended)
IBM EBCDIC (Thai)
Cyrillic (KOI8-R)
IBM EBCDIC (Icelandic)
IBM EBCDIC (Cyrillic, Russian)
IBM EBCDIC (Turkish)
IBM Latin-1
Japanese (JIS 0208-1990 and 0212-
1990)
GB2312-80 Chinese (simple)
215 x-cp20949 cp1025 koi8-u iso-8859-1 iso-8859-2 iso-8859-3 iso-8859-4 iso-8859-5 iso-8859-6 iso-8859-7 iso-8859-8 iso-8859-9 iso-8859-13 iso-8859-15 x-Europa iso-8859-8-i iso-2022-jp csISO2022JP iso-2022-jp iso-2022-kr x-cp50227 euc-jp
EUC-CN euc-kr hz-gb-2312
GB18030 x-iscii-de x-iscii-be x-iscii-ta x-iscii-te x-iscii as x-iscii-or x-iscii-ka x-iscii-ma
28596
28597
28598
28599
28603
28605
29001
38598
50220
50221
50222
20949
21025
21866
28591
28592
28593
28594
28595
50225
50227
51932
51936
51949
52936
54936
57002
57003
57004
57005
57006
57007
57008
57009
Korean Wansung
IBM EBCDIC (Cyrillic, Serbian-Bulgarian)
Cyrillic (KOI8-U)
Western European (ISO)
Central European (ISO)
Latin 3 (ISO)
Baltic (ISO)
Cyrillic (ISO)
Arabic (ISO)
Greek (ISO)
Hebrew (ISO-Visual)
Turkish (ISO)
Estonian (ISO)
Latin 9 (ISO)
Europe
Hebrew (ISO-Logical)
Japanese (JIS)
Japanese (JIS, 1 Byte Kana allowed)
Japanese (JIS, 1 Byte Kana allowed -
SO/SI)
Korean (ISO)
ISO-2022 Chinese (simplified)
Japanese (EUC)
Chinese simplified (EUC)
Korean (EUC)
Chinese simplified (HZ)
GB18030 Chinese simplified
ISCII Devanagari
ISCII Bengali
ISCII Tamil
ISCII Telugu
ISCII Assamese
ISCII Oriya
ISCII Kannada
ISCII Malayalam
57010
57011
65000
65001 x-iscii-gu x-iscii-pa utf-7 utf-8
ISCII Gujarati
ISCII Punjabi
Unicode (UTF-7)
Unicode (UTF-8)
Eof
Determines whether the current position is the end of the file.
Eof
SYNTAX Eof()
RETURN TRUE = Eof reached.
FALSE = Eof not reached.
Flush
Clears all buffers and writes them to the file.
Flush
SYNTAX Flush()
Open
Opens a file to read a text.
Open
SYNTAX
ARGUMENT
S
Open(fileName)
Open(fileName, encoding)
The file to open. fileNam e encodin g
You can use the following values as encoding parameters.
Empty string. In this case, the default encoding (ANSI codepage of the operating system) is used.
Code page, for example, "1252"
Name, for example, "windows-1252"
Friendly name, for example, "Western European" (Windows)
Possible encoding parameters
Code page name
37 IBM037
Display name
IBM EBCDIC (USA-Canada)
437
500
IBM437
IBM500
OEM USA
IBM EBCDIC (International)
216
217
874
875
932
936
865
866
869
870
858
860
861
862
863
864
708
720
737
775
850
852
855
857
949
950
1026
1047
1140
1141
1142
1143
1144
1145
1146
1147
ASMO-708
DOS-720 ibm737 ibm775 ibm850 ibm852
IBM855 ibm857
IBM00858
IBM860 ibm861
DOS-862
IBM863
IBM864
IBM865 cp866 ibm869
IBM870 windows-874 cp875 shift_jis gb2312 ks_c_5601-1987 big5
IBM1026
IBM01047
IBM01140
IBM01141
IBM01142
IBM01143
IBM01144
IBM01145
IBM01146
IBM01147
Arabic (ASMO 708)
Arabic (DOS)
Greek (DOS)
Baltic (DOS)
Western European (DOS)
Eastern European (DOS)
OEM Cyrillic
Turkish (DOS)
OEM Multilingual Latin I
Portuguese (DOS)
Icelandic (DOS)
Hebrew (DOS)
French, Canada (DOS)
Arabic (864)
Nordic (DOS)
Cyrillic (DOS)
Greek, modern (DOS)
IBM EBCDIC (Multilingual Latin-2)
Thai (Windows)
IBM EBCDIC (Greek, modern)
Japanese (Shift-JIS)
Simplified Chinese (GB2312)
Korean
Chinese (Traditional) (Big5)
IBM EBCDIC (Turkish, Latin-5)
IBM Latin-1
IBM EBCDIC (USA-Canada-European)
IBM EBCDIC (Germany-European)
IBM EBCDIC (Denmark-Norway-
European)
IBM EBCDIC (Finland-Sweden-
European)
IBM EBCDIC (Italian-European)
IBM EBCDIC (Spain-European)
IBM EBCDIC (Great Britain-European)
IBM EBCDIC (France-European)
218
10000
10001
10002
10003
10004
10005
10006
10007
1254
1255
1256
1257
1258
1361
1148
1149
1200
1201
1250
1251
1252
1253
10081
10082
12000
12001
20000
20001
10008
10010
10017
10021
10029
10079
20002
IBM01148
IBM01149 utf-16 unicodeFFFE windows-1250 windows-1251
Windows-1252 windows-1253 windows-1254 windows-1255 windows-1256 windows-1257 windows-1258
Johab macintosh x-mac-japanese x-mac-chinesetrad x-mac-korean x mac-arabic x-mac-hebrew x-mac-greek x-mac-cyrillic x-mac-chinesesimp x-mac-romanian x-mac-ukrainian x-mac-thai x-mac-ce x-mac-icelandic x-mac-turkish x-mac-croatian utf-32 utf-32BE x-Chinese-CNS x-cp20001 x-Chinese-Eten
IBM EBCDIC (International-European)
IBM EBCDIC (Icelandic-European)
Unicode
Unicode (Big Endian)
Central European (Windows)
Cyrillic (Windows)
Western European (Windows)
Greek (Windows)
Turkish (Windows)
Hebrew (Windows)
Arabic (Windows)
Baltic (Windows)
Vietnamese (Windows)
Korean (Johab)
Western European (Mac)
Japanese (Mac)
Chinese traditional (Mac)
Korean (Mac)
Arabic (Mac)
Hebrew (Mac)
Greek (Mac)
Cyrillic (Mac)
Chinese simplified (Mac)
Romanian (Mac)
Ukrainian (Mac)
Thai (Mac)
Central European (Mac)
Icelandic (Mac)
Turkish (Mac)
Croatian (Mac)
Unicode (UTF-32)
Unicode (UTF-32-Big Endian)
Chinese traditional (CNS)
TCA Taiwan
Chinese traditional (Eten)
219
20838
20866
20871
20880
20905
20924
20932
20936
20949
21025
21866
28591
20284
20285
20290
20297
20420
20423
20424
20833
20261
20269
20273
20277
20278
20280
20003
20004
20005
20105
20106
20107
20108
20127 x-cp20003 x-cp20004 x-cp20005 x-IA5 x-IA5-German x-IA5-Swedish x-IA5-Norwegian us-ascii x-cp20261 x-cp20269
IBM273
IBM277
IBM278
IBM280
IBM284
IBM285
IBM290
IBM297
IBM420
IBM423
IBM424 x-EBCDIC-
KoreanExtended
IBM-Thai koi8-r
IBM871
IBM880
IBM905
IBM00924
EUC-JP x-cp20936 x-cp20949 cp1025 koi8-u iso-8859-1
IBM5550 Taiwan
TeleText Taiwan
Wang Taiwan
Western European (IA5)
German (IA5)
Swedish (IA5)
Norwegian (IA5)
US-ASCII
T.61
ISO-6937
IBM EBCDIC (Germany)
IBM EBCDIC (Denmark-Norway)
IBM EBCDIC (Finland-Sweden)
IBM EBCDIC (Italy)
IBM EBCDIC (Spain)
IBM EBCDIC (Great Britain)
IBM EBCDIC (Japanese Katakana)
IBM EBCDIC (France)
IBM EBCDIC (Arabic)
IBM EBCDIC (Greek)
IBM EBCDIC (Hebrew)
IBM EBCDIC (Korean, extended)
IBM EBCDIC (Thai)
Cyrillic (KOI8-R)
IBM EBCDIC (Icelandic)
IBM EBCDIC (Cyrillic, Russian)
IBM EBCDIC (Turkish)
IBM Latin-1
Japanese (JIS 0208-1990 and 0212-
1990)
GB2312-80 Chinese (simple)
Korean Wansung
IBM EBCDIC (Cyrillic, Serbian-Bulgarian)
Cyrillic (KOI8-U)
Western European (ISO)
220
57004
57005
57006
57007
57008
57009
57010
57011
65000
65001
50225
50227
51932
51936
51949
52936
54936
57002
57003
28603
28605
29001
38598
50220
50221
50222
28592
28593
28594
28595
28596
28597
28598
28599 x-iscii-ta x-iscii-te x-iscii as x-iscii-or x-iscii-ka x-iscii-ma x-iscii-gu x-iscii-pa utf-7 utf-8 iso-2022-kr x-cp50227 euc-jp
EUC-CN euc-kr hz-gb-2312
GB18030 x-iscii-de x-iscii-be iso-8859-2 iso-8859-3 iso-8859-4 iso-8859-5 iso-8859-6 iso-8859-7 iso-8859-8 iso-8859-9 iso-8859-13 iso-8859-15 x-Europa iso-8859-8-i iso-2022-jp csISO2022JP iso-2022-jp
Central European (ISO)
Latin 3 (ISO)
Baltic (ISO)
Cyrillic (ISO)
Arabic (ISO)
Greek (ISO)
Hebrew (ISO-Visual)
Turkish (ISO)
Estonian (ISO)
Latin 9 (ISO)
Europe
Hebrew (ISO-Logical)
Japanese (JIS)
Japanese (JIS, 1 Byte Kana allowed)
Japanese (JIS, 1 Byte Kana allowed -
SO/SI)
Korean (ISO)
ISO-2022 Chinese (simplified)
Japanese (EUC)
Chinese simplified (EUC)
Korean (EUC)
Chinese simplified (HZ)
GB18030 Chines simplified
ISCII Devanagari
ISCII Bengali
ISCII Tamil
ISCII Telugu
ISCII Assamese
ISCII Oriya
ISCII Kannada
ISCII Malayalam
ISCII Gujarati
ISCII Punjabi
Unicode (UTF-7)
Unicode (UTF-8)
ReadLine
Reads a line of characters from the current file and returns the data as a string.
ReadLine
SYNTAX ReadLine()
RETURN The next line of the file or an empty string if the end of the file is reached.
ReadToEnd
Reads the file from the current position to the end of the file.
ReadToEnd
SYNTAX ReadToEnd()
RETURN The rest of the file from the current position to the end as a string.
If the current position is the end of the file, an empty string ("") returns.
Write
Writes a string in a file.
Write
SYNTAX
ARGUMENTS
Write(text) text The string to write
WriteFormat
Writes a formatted string using the same semantics as FormatStr .
WriteFormat
SYNTAX WriteFormat(formatRule, formatParams)
ARGUMENTS formatRule Formatting rule formatParams Object(s) to write to the formatted string
WriteLine
Writes a string followed by a character for line termination in a file.
WriteLine
SYNTAX
ARGUMENTS
WriteLine(text) text The string to write
221
WriteLineFormat
Writes a formatted string and a new line using the same semantics as FormatStr .
WriteLineFormat
SYNTAX WriteLineFormat(formatRule, formatParams)
ARGUMENTS formatRule Formatting rule formatParams Object(s) to write to the formatted string
Properties of the class MonaLisaTextFile
Property Description
FileName Returns the file name of the open file or an empty string if no file is open.
Examples
; Create DOS object
GetObject("DOS", "MLDos")
;
;---------------------------------------
; Create file and open to write
;--------------------------------------- try
File = DOS.CreateTextFile()
File.Create("c:\temp\test.txt")
File.WriteLine("Line 1")
File.Write("Line ")
File.Write("2")
File.WriteLine("")
File.WriteLine("Line 3") lineNo = 4
File.WriteLineFormat("Line {0}", lineNo)
File.WriteFormat("Line {0}", lineNo + 1)
File.WriteLine("")
Finally
File.Close() end-try
;
;-------------------------------------------------------------------------
; Create file and open to write, line break is LineFeed ($0A)
;------------------------------------------------------------------------- try
File = DOS.CreateTextFile(DOS.NewLineLF)
File.Create("c:\temp\test.txt")
File.WriteLine("Line 1")
File.Write("Line ")
File.Write("2")
222
File.WriteLine("")
File.WriteLine("Line 3")
; change to a new line break CRLF ($0D $0A)
File.NewLine = DOS.NewLineCRLF lineNo = 4
File.WriteLineFormat("Line {0}", lineNo)
File.WriteFormat("Line {0}", lineNo + 1)
File.WriteLine("")
Finally
File.Close() end-try
;
;------------------------
; open file to append
;------------------------ try
File = DOS.CreateTextFile()
File.Append("c:\temp\test.txt")
File.WriteLine("Line 6")
Finally
File.Close() end-try
;
;------------------------------------------------------------------
; Open file to append, line break by default CRLF ($0D $0A)
;------------------------------------------------------------------ try
File = DOS.CreateTextFile()
; Set line break to LineFeed ($0A)
File.NewLine = DOS.NewLineLF
File.Append("c:\temp\test.txt")
File.WriteLine("Line 6")
Finally
File.Close() end-try
;----------------------
; Open file to read
;---------------------- try
File = DOS.CreateTextFile()
File.Open("c:\temp\test.txt")
; while (not File.Eof())
StringListAdd("file", File.ReadLine()) end-while
Finally
223
File.Close() end-try text = StringListGetCommaText("file")
;
;--------------------------------
; Read complete text of a file
;-------------------------------- text2 = DOS.FileReadAllText("c:\temp\test.txt")
;
;----------------------------
; Append text to a file
;----------------------------
DOS.FileAppendText("c:\temp\test.txt", "last line")
224
XML Processing
About MLXmlDocument
The MonaLisa object MLXmlDocument enables you to access the class XmlDocument from the .NET
Framework. This class enables you to read and write in XML files.
Refer to the Microsoft Developer Network website for more information on the XmlDocumentClass.
To load the object, use the MonaLisa function GetObject .
Example
GetObject("XML", "MLXmlDocument")
Additional Functions of the Class MLXmlDocument
GetAttribute
Reads the value of an attribute.
GetAttribute
SYNTAX GetAttribute(xpath, attributeName)
ARGUMENTS xpath XPath expression to select the node. obj Name of the attribute belonging to the node select with the xpath parameter.
RETURN Value of the attribute or an empty string, if the attribute does not exist.
GetAttributeOfNode
Reads the attribute value of a specific XML element.
GetAttributeOfNode
SYNTAX GetAttributeOfNode(xmlNode, attributeName)
ARGUMENTS xmlNode Instance of an XML element from which to read the attribute. attributeName Attribute name.
RETURN Value of the attribute or an empty string, if the attribute does not exist.
GetNamespaceManager
Returns a namespace manager specific to this XML document.
GetNamespaceManager
SYNTAX GetNamespaceManager()
RETURN XML namespace manager object for this MLXmlDocument instance.
GetXpathValue
Reads the value of an attribute or element.
GetXPathValue
225
SYNTAX
ARGUMENTS
GetXPathValue(xmlNode, xpath) xmlNode XML node. xpath XPath
Value of the attribute or element or an empty string if the attribute or element does not exist. RETURN
Load
Loads XML data from a URL.
Load
SYNTAX
ARGUMENTS
Without namespaces preservation option: Load(string filename)
With namespaces preservation option: Load(string filename, bool stripOutNamespaces) filename URL of the file you want to load, which contains a XML document.
The URL may be a local file path or a HTTP URL (web address). stripOutNamespaces TRUE = Removes namespace prefixes and definitions.
FALSE = Preserves namespace prefixes and definitions.
LoadXml
Loads an XML document from a string.
LoadXml
SYNTAX
ARGUMENTS
Without namespaces preservation option: LoadXML(string xml)
With namespaces preservation option: LoadXML(string xml, bool stripOutNamespaces) xml String which contains the XML document. stripOutNamespaces TRUE = Removes namespace prefixes and definitions.
FALSE = Preserves namespace prefixes and definitions.
SetAttribute
Set the attribute value of a specific XML element specified in an XPath expression.
SetAttribute
SYNTAX SetAttribute(xpath, attributeName, value)
SetAttribute(xpath, attributeName, value, create)
ARGUMENTS xpath XPATH expression to select the node attributeName Name of the attribute belonging to the node select with the parameter
XPATH value create
New attribute value
TRUE = The attribute is created if it does not already exist.
FALSE = Attribute is not created.
RETURN TRUE = Attribute value is set.
FALSE = Attribute value could not be set.
226
SetAttributeOfNode
Set the attribute value of a specific XML element.
SetAttribute
SYNTAX SetAttributeOfNode(xmlNode, attributeName, value)
SetAttributeOfNode(xmlNode, attributeName, value, create)
ARGUMENTS xmlNode Instance of an XML element whose attribute you want to set attributeName Name of the attribute belonging to the node select with the parameter
XPATH value create
New attribute value
TRUE = The attribute is created if it does not already exist.
FALSE = Attribute is not created.
RETURN TRUE = Attribute value is set.
FALSE = Attribute value could not be set.
Sample Scripts
Sample Script: Read and modify attributes
; create XmlDocument Object
GetObject("xml", "MLXmlDocument")
;
; load XML from file xml.Load("C:\Temp\bookstore.xml")
;
; or read XML from a string
;xml.LoadXml("<bookstore><book><title lang=""en"">Italienisch kochen</title></book></bookstore>")
;
; Get root element of the XML document root = xml.DocumentElement
;
; Using XPath select all title nodes in an XmlNodeList nodeList = root.SelectNodes("/bookstore/book/title")
;
; get an node enumerator. nodeListEnumerator = nodeList.GetEnumerator()
;
; Iterate over all items... readNext = nodeListEnumerator.MoveNext() while (readNext)
;
; get current item node
node = nodeListEnumerator.Current
;
227
;Language attribute
BookLang = xml.GetAttributeOfNode(node, "lang")
; and read value of the title node
BookTitle = node.InnerText
;
Protocol("Title: {0}, language: {1}", 5,BookTitle, BookLang)
;
; set Language attribute to German
xml.SetAttributeOfNode(node, "lang", "de")
;
; next item node
readNext = nodeListEnumerator.MoveNext()
; end-while
;
; set language attribute of the 2. Book node to English with XPath xml.SetAttribute("/bookstore/book[2]/title", "lang", "en")
;
; save as a test xml.Save("C:\Temp\bookstore_test.xml")
;
;assign to a string variable xmlString = xml.OuterXml
;
;Example for GetXPathValue()
FirstTitle = xml.GetXPathValue(root, "/bookstore/book/title[1]")
CoverTextOfFirstTitle = xml.GetXPathValue(root,
"/bookstore/book/covertext[1]")
CommentOfFirstTitle = xml.GetXPathValue(root, "/bookstore/book[1]/comment()")
Protocol("GetXPathValue() 1. Title: {0}, cover-text: {1}, comment: {2}", 5,
FirstTitle, CoverTextOfFirstTitle, CommentOfFirstTitle)
;
The XML used in the example:
<?xml version="1.0" encoding="UTF-8"?>
<bookstore>
<book>
<title lang="en">Italian cooking</title>
<covertext>
</covertext>
<author>Giada De Florenz</author>
<year>2001</year>
<price>30.00</price>
<!-- comment for 1st book -->
</book>
<book>
<title lang="de">Harry Schlotter</title>
<covertext>
228
</covertext>
<author>J R. Bowling</author>
<year>2005</year>
<price>29.99</price>
<!-- comment for 2nd book -->
</book>
</bookstore>
Sample Script: Create an XML file
; create XmlDocument Object
GetObject("xml", "MLXmlDocument")
;
; create XML Declaration decl = xml.CreateXmlDeclaration("1.0", "UTF-8", "") xml.AppendChild(decl)
;
; create and insert new Fields-Element fields = xml.CreateElement("FIELDS") xml.AppendChild(fields)
;
; create new Field-Element field = xml.CreateElement("FIELD")
;
; Attribute name=test (only if the attribute already exists!)
;xml.SetAttributeOfNode(field, "name", "test")
;
;Example: ; create and insert CDATA cdata = xml.CreateCDataSection("test value") field.AppendChild(cdata)
;
; get Attributes-Collection of the Field-Node attributes = field.Attributes
;
; create Name-Attribute name = xml.CreateAttribute("name")
; set value of the Attribute name.Value = "test"
; and insert the Attribute of the Attributes-Collection attributes.Append(name)
;
; the new Field-Element can now be inserted into the Fields-Element fields.AppendChild(field)
;
; and save xml.Save("c:\temp\fields.xml")
;
;assign to a string variable xmlString = xml.OuterXml
229
;
Result
<?xml version="1.0" encoding="UTF-8"?>
<FIELDS>
<FIELD name="test"></FIELD>
</FIELDS>
230
Ini-File Processing
About MLIniFile
The MonaLisa object MLIniFile enables you to perform read and write operations on .ini files. To load the
object, use the MonaLisa function GetObject .
Example
GetObject("IniFile","MLIniFile")
Functions of the Class MLInifile
Close
Closes an open .ini file.
Close
SYNTAX
EXAMPLE
Close()
GetObject("IniFile","MLIniFile")
...
IniFile.Close()
CopySection
Copies the specified section and identifiers in the specified .ini file. If either the identifier or the section do not exist, they will be created.
CopySection
SYNTAX CopySection(section, destFile)
ARGUMENTS section The name of the section.
EXAMPLE destFile Name of the '.ini' file in which the section copies in the following form.
[Drive\Path\]File name
GetObject("IniFile","MLIniFile")
IniFile.CopySection("Section_Test", "d:\test\MLTestIniFile_COPY.ini")
DeleteKey
Deletes the specified identifier from the respective section.
DeleteKey
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
DeleteKey(section, key) section Name of the section. key Identifier you want to delete.
TRUE = Successful
FALSE = Unsuccessful
GetObject("IniFile","MLIniFile") ok = IniFile.DeleteKey("Delete-Section","Delete")
231
EraseSection
Deletes the specified section from an .ini file.
EraseSection
SYNTAX EraseSection(section)
ARGUMENTS section Name of the section to delete.
RETURN
EXAMPLE
TRUE = Successful
FALSE = Unsuccessful
GetObject("IniFile","MLIniFile") ok = IniFile.EraseSection("Delete-Section")
GetSectionNames
Returns a comma separated string containing all identifiers of a defined section.
GetSectionNames
SYNTAX GetSectionNames(section)
ARGUMENTS section Name of the section.
RETURN
EXAMPLE
Comma separated string of the identifiers.
GetObject("IniFile","MLIniFile") sectionNames = IniFile.GetSectionNames("Section_Test")
Open
Opens the specified .ini file for read or write operations.
Open
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
Open(fileName) fileName Name of the .ini file in the form of
[Drive\Path\]File name
TRUE = Successful
FALSE = Not successful.
GetObject("IniFile","MLIniFile")
... ok = IniFile.Open("d:\test\MLTestIniFile.ini")
ReadBool
Reads the Boolean operator of the specified identifier from the respective section.
ReadBool
SYNTAX
ARGUMENTS
ReadBool(section, key) section Name of the section.
232
RETURN
EXAMPLE key Identifier
Value read.
GetObject("IniFile","MLIniFile")
...
Flag = IniFile.ReadBool("Section_Test","IsNewCustomer")
ReadInteger
Reads the integer value of the specified identifier from the respective section.
ReadInteger
SYNTAX ReadInteger(section, key)
ARGUMENTS section Name of the section. key Identifier
RETURN
EXAMPLE
Value read.
GetObject("IniFile","MLIniFile")
...
Year = IniFile.ReadInteger("Section_Test","Year")
ReadSectionToCommatext
Reads all identifier=value pairs from the specified section and returns them in a comma-separated string.
ReadSectionToCommatext
SYNTAX ReadSectionToCommatext(section)
ARGUMENTS section Name of the section.
RETURN
EXAMPLE
Comma separated string containing all identifier=value pairs in the following form.
"identifier=value1,identifier2=value2"
GetObject("IniFile","MLIniFile")
... section = IniFile.ReadSectionToCommatext("Section_Test")
ReadString
Reads the string of the specified identifier from the respective section.
ReadString
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
ReadString(section, key) section Name of the section. key Identifier
Value read.
GetObject("IniFile","MLIniFile")
...
233
Name = IniFile.ReadString("Section_Test","Name")
WriteBool
Writes the Boolean value as the value of the specified identifier in the respective section.
If the section does not exist, it is created.
If the identifier does not exist, it is created.
WriteBool
SYNTAX
ARGUMENTS
EXAMPLE
WriteBool(section, key, value) section Name of the section key Identifier value The Boolean value to write
GetObject("IniFile","MLIniFile")
...
IniFile.WriteBool("Section_Test ","IsNewCustomer",TRUE)
WriteInteger
Writes the integer value as the value of the specified identifier in the respective section.
If the section does not exist, it is created.
If the identifier does not exist, it is created.
WriteInteger
SYNTAX WriteInteger(section, key, value)
ARGUMENTS section Name of the section
EXAMPLE key value
Identifier
Integer value to write
GetObject("IniFile","MLIniFile")
...
IniFile.WriteInteger("Section_Test ","Year",1998)
WriteSectionFromCommatext
Writes all identifier=value pairs to the specified section.
If either the identifier or the section do not exist, they are created.
WriteSectionFromCommatext
SYNTAX WriteSectionFromCommatext(section, commaText)
ARGUMENT
S section Name of the section commaText Comma-separated string in the form.
"identifier=value1,identifier2=value2"
234
EXAMPLE
GetObject("IniFile","MLIniFile")
...
IniFile.WriteSectionFromCommatext("Section_Test","NAME=MyName,Comp any=PA")
WriteString
Writes the string as a value of the specified identifier in the respective section.
If the section does not exist, it is created.
If the identifier does not exist, it is created.
WriteString
SYNTAX
ARGUMENTS
EXAMPLE
WriteString(section, key, value) section Name of the section key Identifier value Integer value to write
GetObject("IniFile","MLIniFile")
...
IniFile.WriteString("Section_Test ","Company","MyCompanyName")
235
MWS Functions
About MLMwsClient
The MonaLisa object MLMwsClient enables you to use MWS functions. The object provides all functions necessary for communication with the MWSProcessService, general helper function, and various properties required. For a description of the structure and meaning of the various options XMLs, XML results, and result codes, refer to the
Perceptive Document Composition Web Services Developer’s
Guide.
To load the object, use the MonaLisa function GetObject .
Example
GetObject("MwsClient","MLMwsClient")
Functions of the Class MLMwsClient
ClearCache
Clears the cache of the RepositoryRuntimeService.
ClearCache
SYNTAX ClearCache()
RETURN
EXAMPLE
0 = Successful
<>0 = Unsuccessful
ClearCache()
Doc_GetFile_Mime
Returns a file that manages the business object.
Doc_GetFile_Mime
SYNTAX Doc_GetFile_Mime(processId, fileName)
ARGUMENTS processId ID of the process whose business object you want to manage. fileName File name. doc Base64 coded string, representing the content of the file. xmlResult Empty when OK.
RETURN 0 = Successful
<>0 = Unsuccessful
Doc_SetFile_Mime
Writes a file that manages the business object.
Doc_SetFile_Mime
SYNTAX Doc_SetFile_Mime(processId, fileName, doc)
ARGUMENTS processId ID of the process whose business object you want to manage. fileName File name.
236
RETURN doc Base64 coded string that represents the content of the file. xmlResult Empty when OK.
0 = Successful
<>0 = Unsuccessful
GetList
Returns a list of all currently existing processes.
GetList
SYNTAX
ARGUMENTS
RETURN
GetList(startAt, max, options) startAt max
Start index.
Maximum number of processes to return. options Use this parameter to specify which processes you want to include in the retrieved process list. xmlResult An MwsProcessList XML when successful, otherwise an MwsError.
0 = Successful.
<> = Not successful.
Obj_GetStructure
Returns the structure of the referenced object.
Obj_GetStructure
SYNTAX Obj_GetStructure(processId, rootRef, maxLevel)
ARGUMENTS processId ID of the process the object references. rootRef Object reference within the process. maxLevel -1 = All
0 = Just the object.
>0 = The structure including all child elements at the n-th level. xmlResult Object XML depending on the component.
RETURN 0 = Successful
<>0 = Not successful.
Obj_SetStructure
Sets the structure of the business object.
Obj_SetStructure
SYNTAX Obj_SetStructure(processId, content, rootRef, maxLevel)
ARGUMENTS processId ID of the process the object references. content rootRef
The business object information to set.
Object reference whose structure returns.
237
RETURN maxLevel Determines how many levels return.
-1 = All
0 = Just the object.
>0 = The structure including all child elements at the n-th level. xmlResult Object structure of the business object, if OK.
0 = Successful
<>0 = Not successful.
Obj_Toggle
Toggles the status of an object.
Obj_Toggle
SYNTAX
ARGUMENTS
RETURN
Obj_Toggle(processId, objRef, rootRef, maxLevel) processId ID of the process the object references. content rootRef
Reference of the object to toggle.
Object reference whose structure returns. maxLevel Determines how many levels return.
-1 = All
0 = Just the object.
>0 = The structure including all child elements at the n-th level. xmlResult Object structure of the business object, if OK.
0 = Successful
<>0 = Not successful.
Ping
Returns the string "MWS Process Service".
Ping
SYNTAX Ping()
RETURN "MWS Process Service"
Process_Close
Closes a process with the passed in status.
Process_Close
SYNTAX Process_Close(processId, status, options)
ARGUMENTS processId Process ID. status options
Free text status definition.
Close options XML with title and description. xmlResult Empty when OK.
238
RETURN 0 = Successful.
<> 0 = Not successful.
Process_Create
Creates a new MWS process.
Process_Create
SYNTAX Process_Create(processId, mSystem, mType, mTitle, objectIndex, objectName, objectType, objectData, options)
ARGUMENTS processId mSystem
If the process ID is not passed in, a new one is created.
System OID of the system the object to load resides in. mType mTitle
Free text to define the process type.
Free text to define a title for the process. objectIndex Index of the object to load. If this parameter is defined, the objectName parameter is ignored. objectName Name of the loaded object. This parameter is only taken into account if objectindex is not specified. objectType objectData
Type of object to load. Currently only "P" for bundles is possible.
Optional XML data for a bundle. The data is assigned to the first passive selection in the OnNewStart script. options xmlResult
Options XML for the MWS process.
If the process is created, either the bundle structure or process information returns.
The bundle structure returns if a start command passes to the options.
RETURN 0 = Successful.
<> 0 = Not successful.
Process_Delete
Deletes an open process and frees its server resources.
Process_Delete
SYNTAX Process_Delete(processId)
ARGUMENTS processId ID of the process to delete. xmlResult Empty when OK, otherwise MwsError.
RETURN 0 = Successful.
<> 0 = Not successful.
Process_Forward
Forwards a process.
Process_Forward
239
SYNTAX
ARGUMENTS
RETURN
Process_Forward(processID, destUser, destUsergroup, options) processID destUser
Process ID.
Name of the target user the process forwards to. destUsergroup Name of the target group the process forwards to. options Close options XML with title and description. xmlResult Empty when OK.
0 = Successful.
<> 0 = Not successful.
Process_GetInfo
Returns information about the process.
Process_GetInfo
SYNTAX Process_GetInfo(processId, infoType, options)
ARGUMENTS processId ID of the process for which the information returns. infoType Comma separated string containing the information to retrieve.
This information is the predefined types PROCESSINFO and POOLVARS. The
MWS process is dependent and is loaded and evaluated by the OnGetInfo script.
RETURN options Currently not supported. xmlResult ProcessInfo XML when OK.
0 = Successful.
<> 0 = Not successful.
Process_GetLastError
Returns the last error of a process.
Process_GetInfo
SYNTAX Process_GetLastError(processID)
ARGUMENTS processId ID of the process for which the last error retrieves. xmlResult Last error XML when successful.
RETURN 0 = Successful.
<> 0 = Not successful.
Process_Open
Resumes processing of a process and sets the user name to that of the current user.
Process_Open
SYNTAX Process_Open(processId, options)
ARGUMENTS processId ID of the process to open.
240
RETURN xmlResult Currently not supported.
0 = Successful.
<> 0 = Not successful.
Process_SetData
Sets XML data for the business object.
Process_SetData
SYNTAX Process_SetData(processId, dataType, data)
ARGUMENTS processId ID of the process. dataType Name to assign to the data. Currently refers to the name of the data reference. data The XML data to set. xmlResult Empty when OK.
RETURN 0 = Successful.
<> 0 = Not successful.
Process_Start
Starts a process action.
Process_Start
SYNTAX Process_Start(processId, command, options)
ARGUMENTS processId Process ID of the process where the action starts. command Contains the command to pass in. The names of the commands derive from the
InvokeActivities script of the MWS process. options You can use this parameter to set various options of the process, to set process activities, and to pass in variables. xmlResult The structure of the bundle when successful.
RETURN 0 = Successful.
<> 0 = Not successful.
Srv_GetInfo
Returns information about the MWS server.
Srv_GetInfo
SYNTAX
ARGUMENTS
Srv_GetInfo(options) options Currently not used xmlResult MWS server info XML if OK, otherwise MWSError
RETURN
EXAMPLE
0 = OK
<> 0 = Error
GetObject("MwsClient","MLMwsClient")
241
…
… options = "" resultCode = MwsClient.Srv_GetInfo(options) xmlResult = MwsClient.LastXmlResult
Protocol(resultCode, 8)
Protocol(xmlResult, 8)
Class Helper Functions
LoadBase64StringFromBinFile
Loads the specified file and converts the contents in a Base64 string.
LoadBase64StringFromBinFile
SYNTAX LoadBase64StringFromBinFile(binFileName)
ARGUMENT
S binFileName File name.
RETURN
EXAMPLE
Base64 coded string of the file. If no file exists, an empty string returns. newDocString =
MwsClient.LoadBase64StringFromBinFile("c:\temp\MyDoc_changed.docx"
)
SaveBase64StringToBinFile
Writes a Base64 string converted to a byte array to a binary file.
SaveBase64StringToBinFile
SYNTAX SaveBase64StringToBinFile(base64Content, binFileName)
ARGUMENTS base64Content Base64Content binFileName File name
RETURN
EXAMPLE
TRUE = File written
FALSE = File not written if (myDocString <> "")
ok = MwsClient.SaveBase64StringToBinFile(myDocString,
"c:\temp\MyDoc_org.docx") end-if
Properties of the class MLMwsClient
Property Description
LastBase64DocumentString Allows you to read the last Base64 string retrieved.
Read-only property.
The MWSService function Doc_GetFile_Mime returns the Base64 coded string of the specified document in addition to an integer result code and the XML result string.
242
LastProcessId
LastXmlResult
MwsUrl
Example
myXmlResult = "" resCode = MwsClient.Doc_GetFile_Mime(myProcessId, filename) myDocString = MwsClient.LastBase64DocumentString myXmlResult = MwsClient.LastXmlResult
Allows you to read the last process ID retrieved.
Read-only property.
The MWSService function Process_Create enables you to define a process ID or, if the corresponding parameter is passed as an empty string, enables you to automatically generate a process ID.
This is irrespective of whether the process ID was predefined or created automatically.
The property is set with the corresponding process ID when the Process_Create function call was successful.
Example
myXmlResult = "" myProcessId = "" options = "" resCode = MwsClient.Process_Create(myProcessId, "dm1",
"MyType", "MyTitle", "", "MyBundleName",
"P", "", options) myProcessId = MwsClient.LastProcessId myXmlResult = MwsClient.LastXmlResult
Allows you to read the last XmlResult string retrieved.
Read-only property.
Most MWSService functions return both an integer result code and an XmlResult as string.
Example
myXmlResult = "" resCode = MwsClient.Process_Open(myProcessId, "") myXmlResult = MwsClient.LastXmlResult
Allows you to define the URL of the MWS server.
The property must be set with the address of the MWS service before the first call of the MWS service is made.
Internally, when the property is being set, a previously opened service channel is closed so that the following call to the MWS service can create a new service channel.
If this property is not defined, the first call to the MWS service tries to read the required URL for the MWS service from the key appSettings (key="mws").
An exception is thrown if no corresponding setting can be found here either.
Example
MwsClient.MwsUrl = "http://localhost:8011/mws/mwsprocess"
Sample Script MLMwsClient
;********************* MLMwsClient ****************************************
;
GetObject("MwsClient","MLMwsClient")
;
MwsClient.MwsUrl = "http://localhost:8011/mws/mwsprocess"
; dummy = MwsClient.Ping()
243
Protocol(dummy, 8)
;
; On setting the URL, a previously created ServiceChannel is closed
;MwsClient.MwsUrl = "http://localhost:8011/mws/mwsprocess"
;dummy = MwsClient.Ping()
;Protocol(dummy, 8)
;MwsClient.MwsUrl = "http://localhost:8011/mws/mwsprocess"
;dummy = MwsClient.Ping()
;Protocol(dummy, 8)
; myXmlResult = "" myProcessId = "" options = "<mws><mwsaction name=""DATASELECTION"" configured = ""1""
><selparams><selparam name=""Partnernumber"" >0815</selparam><selparam name=""test""></selparam></selparams></mwsaction></mws>" res = MwsClient.Process_Create(myProcessId, "dm1", "MyType", "MyTitle", "",
"Application2", "P", "", options) myProcessId = MwsClient.LastProcessId myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
; if (res = 0)
myXmlResult = ""
res = MwsClient.Process_Start(myProcessId, "CREATE_DOCUMENTS", "")
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8) end-if
; if (myXmlResult <> "")
filename = ""
GetObject("xml", "MLXmlDocument")
xml.LoadXml(myXmlResult)
filename = xml.GetAttribute("/mws/process/object/object[1]", "filename")
FreeObject("xml") end-if
; if (filename <> "")
res = MwsClient.Doc_GetFile_Mime(myProcessId, filename)
myDocString = MwsClient.LastBase64DocumentString
Protocol(myDocString, 8)
Protocol(res, 8)
if (myDocString <> "")
ok = MwsClient.SaveBase64StringToBinFile(myDocString,
"c:\temp\MyDoc_org.docx")
Protocol(ok, 8)
end-if end-if
244
;
; now alter document, upload it and then download it again for manual check if (filename <> "")
myNewDocString =
MwsClient.LoadBase64StringFromBinFile("c:\temp\MyDoc_changed.docx")
Protocol(myNewDocString, 8)
if (myNewDocString <> "")
res = MwsClient.Doc_SetFile_Mime(myProcessId, filename, myNewDocString)
Protocol(res, 8)
if (res = 0)
res = MwsClient.Doc_GetFile_Mime(myProcessId, filename)
myDocString = MwsClient.LastBase64DocumentString
Protocol(myDocString, 8)
Protocol(res, 8)
if (myDocString <> "")
ok = MwsClient.SaveBase64StringToBinFile(myDocString,
"c:\temp\MyDoc_downChanged.docx")
Protocol(ok, 8)
end-if
end-if
end-if end-if
;
; upload any file and download it again filename= "c:\temp\MMDMO_33.B.migrate.xml" myFileString = MwsClient.LoadBase64StringFromBinFile(filename)
Protocol(myFileString, 8) res = MwsClient.Doc_SetFile_Mime(myProcessId, filename, myFileString)
Protocol(res, 8) if (res = 0)
res = MwsClient.Doc_GetFile_Mime(myProcessId, filename)
myFileString = MwsClient.LastBase64DocumentString
Protocol(myFileString, 8)
Protocol(res, 8)
if (myFileString <> "")
ok = MwsClient.SaveBase64StringToBinFile(myFileString,
"c:\temp\MMDMO_DOWNLOAD_33.B.migrate.xml")
Protocol(ok, 8)
end-if end-if
;
;all remaining methods possible if (myProcessId <> "" )
myXmlResult = ""
res = MwsClient.Obj_GetStructure(myProcessId, "", 1)
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
245
myXmlResult = ""
res = MwsClient.Obj_Toggle(myProcessId, "3C331B86-8552-4AD6-A242-
29106BFBCA21", "", 1)
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
myXmlResult = ""
res = MwsClient.Process_SetData(myProcessId,
"My_nonExisting_BundleDataId", "<data>MyDataString</data>")
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
myXmlResult = ""
res = MwsClient.Process_GetLastError(myProcessId)
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
myXmlResult = ""
res = MwsClient.ClearCache()
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
myXmlResult = ""
res = MwsClient.Process_GetInfo(myProcessId, "PROCESSINFO", "")
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
content = "<mws type=""OBJECT"" version=""1""><process><object action=""includedoc"" name=""TestDocument"" target_reference="""" position=""after"" /></process></mws>"
myXmlResult = ""
res = MwsClient.Obj_SetStructure(myProcessId, content, "", 1)
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
myXmlResult = ""
res = MwsClient.Process_GetInfo(myProcessId, "PROCESSINFO", "")
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
options = "<mws version=""2""><title>Forwarded to
Mike</title><description>Description of the task</description></mws>"
246
myXmlResult = ""
res = MwsClient.Process_Forward(myProcessId, "Mike", "", options)
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
options = "<mws><processlist><item name=""listuser"" include=""Mike""
/><item name=""shortprocdesc"" include=""30"" /></processlist></mws>"
myXmlResult = ""
res = MwsClient.Process_GetList(0, 100, options)
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
;IntegerDate = date.DateStringToInt64("ddMMyyyyHHmmss", "21012010174853")
;DateStr = date.Int64ToDateString("MM-dd-yyyy HH:mm:ss", IntegerDate)
;
options = "<mws><processlist><item name=""listuser"" include=""Mike""
/><item name=""shortprocdesc"" include=""30"" /><item name=""forwarded"" include=""1"" /><item name=""nonforwarded"" include=""0""
/></processlist></mws>"
myXmlResult = ""
res = MwsClient.Process_GetList(0, 100, options)
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
myXmlResult = ""
res = MwsClient.Process_Open(myProcessId, "")
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
myXmlResult = ""
res = MwsClient.Process_GetTransDocsList(myProcessId, "")
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
myXmlResult = ""
res = MwsClient.Process_Close(myProcessId, 0, "")
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
myXmlResult = ""
res = MwsClient.Process_Delete(myProcessId)
myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
247
Protocol(res, 8)
; end-if
; myXmlResult = "" res = MwsClient.Process_GetList(0, 100, "") myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
FreeObject("MwsClient")]]></scriptcode>
;
Sample Script: Create a Process
GetObject("MwsClient","MLMwsClient")
MwsClient.MwsUrl = "http://localhost:8011/mws/mwsprocess" result = MwsClient.Ping()
Protocol(result, 8)
; myXmlResult = "" myProcessId = "" options = "" res = MwsClient.Process_Create(myProcessId, "MySystemOId", "MyType",
"MyTitle", "", "MyBundleName", "P", "", options) myProcessId = MwsClient.LastProcessId myXmlResult = MwsClient.LastXmlResult
Protocol(result, 8)
Protocol(res, 8)
;
FreeObject("MwsClient")
248
SOAP Webservices
About SOAP Webservices
The MonaLisa object MLWsClient enables you to call SOAP WebServices. The object provides all functions necessary for communication with the web service, together with the required properties.
To load the object, use the MonaLisa function GetObject .
Example
GetObject("WS","MLWsClient")
Requirements
Powershell 3.0
Windows Powershell 3.0 must be installed to be able to use the class.
Powershell 3.0 might already be installed on newer Windows systems.
Network Configuration
Depending on the network configuration it is necessary to configure Composition Studio to use a specific proxy server.
Complete the following steps to do this:
1. Close Composition Studio.
2. Open the file PDC.Studio.exe.config.
3. Insert the following section as a child of the node <configuration>.
<system.net>
<defaultProxy enabled="true">
<proxy proxyaddress="
http://10.12.9.100:8080
" bypassonlocal="true"
/>
</defaultProxy>
</system.net>
4. Replace the address http://10.12.9.100 with the address of valid proxy server.
5. Save the modified file.
6. Start Composition Studio.
For more information, refer to http://msdn.microsoft.com/en-us/library/kd3cf2ex.aspx
.
Properties of the class MLWsClient
Property
Namespace
PropertiesCount
RefParamsCount
Description
The namespace to be used while runtime-generating types of the web service proxy.
Set this property before setting the WsdlUri property.
Contains the number of properties of the function called.
Example
GetObject("WsClient", "MLWsClient")
PropertiesCount = WsClient.PropertiesCount
Contains the number of reference parameters of the function called.
Example
GetObject("WsClient", "MLWsClient")
249
RefParamsCount = WsClient.RefParamsCount
ResultObject The result of the web service function call as an object.
You can directly access properties and functions of this object.
Example
GetObject("WsClient", "MLWsClient")
Result = WsClient.CallMethod("EchoObject")
ResObj = WsClient.ResultObject
WebserviceProxyModule The module that contains all the runtime-generated types of the web service proxy.
WsdlUri Contains the URI of the required web service.
Example
GetObject("WsClient", "MLWsClient")
WsClient.WsdlUri = "http://localhost:8888/WebserviceHost"
Functions of the Class MLWsClient
CallMethod
Calls the web service function.
CallMethod
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
CallMethod(methodName, args) methodName Name of the web service function to call args Arguments for the web service function call
Result of the web service function call as a string. If result is a complex type, it is a serialized XML string. This can be processed using the MLXmlDocument functions.
GetObject("WsClient", "MLWsClient")
Result = WsClient.CallMethod("Ping")
DefineWebProxy
Sets the web proxy.
DefinePrinterByOId
SYNTAX DefineWebProxy(uri, bypassList)
DefineWebProxy(uri, bypassOnLocal, bypassList)
DefineWebProxy(uri, domain, proxyUser, password, code, bypassOnLocal, bypassList)
ARGUMENTS uri URI of the web proxy you want to use.
EXAMPLE domain proxyUser password code
Domain of the proxy user.
Name of the proxy user.
Password of the proxy user.
Encoded password of the proxy user. bypassOnLocal TRUE = The proxy is bypassed on local addresses.
FALSE = The proxy is not bypassed on local addresses. bypassList Addresses that bypass the proxy.
GetObject("WsClient", "MLWsClient")
250
WsClient.DefineWebProxy("http://10.12.9.101:8080")
GetArrayLength
Returns the array size (length) of a one-dimensional array transferred object or the object stored in
ResultObject.
GetArrayLength
SYNTAX GetArrayLength()
GetArrayLength(obj)
ARGUMENTS obj The array object to check.
RETURN
EXAMPLE
The size (lenght) of the array.
GetObject("WsClient", "MLWsClient")
WsClient.GetArrayLength()
GetEnumValue
Returns the enumeration value of a specific type by a specific untyped value.
GetEnumValue
SYNTAX GetEnumValue(type, value)
ARGUMENTS type Enumeration type. value Untyped value of the enumeration value.
RETURN Typed enumeration value.
GetObjectFromArray
Returns a single object from a one-dimensional array object transferred or stored in ResultObject specified by the index.
GetObjectFromArray
SYNTAX GetObjectFromArray(arrayIndex)
GetObjectFromArray(obj, arrayIndex)
ARGUMENTS obj The object to check. arrayIndex The index of the object to return from the array.
RETURN
EXAMPLE
The object from the array.
GetObject("WsClient", "MLWsClient")
WsClient.GetObjectFromArray(XmlDoc,0)
GetObjectStringFromArray
Returns a string serialization of an array item of the transferred object or the object stored in
ResultObject.
251
GetObjectStringFromArray
SYNTAX GetObjectStringFromArray(arrayIndex)
GetObjectStringFromArray(obj, arrayIndex)
ARGUMENTS obj The object to check. arrayIndex The index of the object to return from the array.
RETURN
EXAMPLE
XML serialized string of the object.
GetObject("WsClient", "MLWsClient") test = WsClient.GetObjectStringFromArray(ResObj,0)
GetPropertyNameByIndex
Determines the name of the property by the index.
GetPropertyNameByIndex
SYNTAX GetPropertyNameByIndex(idx)
ARGUMENTS idx Index of the property.
RETURN
EXAMPLE
Name of the property.
GetObject("WsClient", "MLWsClient") a = 0 while (a < PropertiesCount)
pName = WsClient.GetPropertyNameByIndex(a)
pValue = WsClient.GetPropertyValueByIndex(a)
refObjValue = WsClient.GetPropertyValueByIndexAsObject(a)
pValueByName = WsClient.GetPropertyValueByName(pName)
refObjValueByName =
WsClient.GetPropertyValueByNameAsObject(pName)
Protocol("Property[{0}] {1}: {2}", 8, a, pName, pValue)
a = a + 1 end-while
GetPropertyValueByIndex
Determines the value of the property by the index.
GetPropertyValueByIndex
SYNTAX GetPropertyValueByIndex(idx)
ARGUMENTS idx Index of the property.
RETURN
EXAMPLE
Value of the property.
GetObject("WsClient", "MLWsClient") a = 0 while (a < PropertiesCount)
pName = WsClient.GetPropertyNameByIndex(a)
pValue = WsClient.GetPropertyValueByIndex(a)
refObjValue = WsClient.GetPropertyValueByIndexAsObject(a)
252
pValueByName = WsClient.GetPropertyValueByName(pName)
refObjValueByName =
WsClient.GetPropertyValueByNameAsObject(pName)
Protocol("Property[{0}] {1}: {2}", 8, a, pName, pValue)
a = a + 1 end-while
GetPropertyValueByIndexAsObject
Determines the value of the property by the index.
GetPropertyValueByIndexAsObject
SYNTAX GetPropertyValueByIndexAsObject(idx)
ARGUMENTS idx Index of the property.
RETURN
EXAMPLE
Value of the property as object.
GetObject("WsClient", "MLWsClient") a = 0 while (a < PropertiesCount)
pName = WsClient.GetPropertyNameByIndex(a)
pValue = WsClient.GetPropertyValueByIndex(a)
refObjValue = WsClient.GetPropertyValueByIndexAsObject(a)
pValueByName = WsClient.GetPropertyValueByName(pName)
refObjValueByName =
WsClient.GetPropertyValueByNameAsObject(pName)
Protocol("Property[{0}] {1}: {2}", 8, a, pName, pValue)
a = a + 1 end-while
GetPropertyValueByName
Determines the value of the property by its name.
GetPropertyValueByName
SYNTAX GetPropertyValueByName(propName)
ARGUMENTS propName Name of the property.
RETURN
EXAMPLE
Value of the property.
GetObject("WsClient", "MLWsClient") a = 0 while (a < PropertiesCount)
pName = WsClient.GetPropertyNameByIndex(a)
pValue = WsClient.GetPropertyValueByIndex(a)
refObjValue = WsClient.GetPropertyValueByIndexAsObject(a)
pValueByName = WsClient.GetPropertyValueByName(pName)
refObjValueByName =
WsClient.GetPropertyValueByNameAsObject(pName)
Protocol("Property[{0}] {1}: {2}", 8, a, pName, pValue)
253
a = a + 1 end-while
GetPropertyValueByNameAsObject
Determines the value of the property by its name.
GetPropertyValueByNameAsObject
SYNTAX GetPropertyValueByNameAsObject(propName)
ARGUMENTS propName Name of the property.
RETURN
EXAMPLE
Value of the property as object.
GetObject("WsClient", "MLWsClient") a = 0 while (a < PropertiesCount)
pName = WsClient.GetPropertyNameByIndex(a)
pValue = WsClient.GetPropertyValueByIndex(a)
refObjValue = WsClient.GetPropertyValueByIndexAsObject(a)
pValueByName = WsClient.GetPropertyValueByName(pName)
refObjValueByName =
WsClient.GetPropertyValueByNameAsObject(pName)
Protocol("Property[{0}] {1}: {2}", 8, a, pName, pValue)
a = a + 1 end-while
GetRefParamNameByIndex
Determines the name of the reference parameter by its index.
GetRefParamNameByIndex
SYNTAX GetRefParamNameByIndex(idx)
ARGUMENTS idx Index of the reference parameter.
RETURN
EXAMPLE
Name of the reference parameter.
GetObject("WsClient", "MLWsClient") a = 0 while (a < RefParamsCount)
pName = wscObj.GetRefParamNameByIndex(a)
pValue = wscObj.GetRefParamValueByIndex(a)
Protocol("(RefParam) {0}: {1}", 8,pName, pValue)
a = a + 1 end-while
GetRefParamValueByIndex
Determines the value of the reference parameter by its index.
254
GetRefParamValueByIndex
SYNTAX GetRefParamValueByIndex(idx)
ARGUMENTS idx Index of the reference parameter.
RETURN
EXAMPLE
Value of the reference parameter.
GetObject("WsClient", "MLWsClient") a = 0 while (a < RefParamsCount)
pName = wscObj.GetRefParamNameByIndex(a)
pValue = wscObj.GetRefParamValueByIndex(a)
Protocol("(RefParam) {0}: {1}", 8,pName, pValue)
a = a + 1 end-while
GetRefParamValueByIndexAsObject
Determines the value of the reference parameter by its index.
GetRefParamValueByIndexAsObject
SYNTAX GetRefParamValueByIndexAsObject(idx)
ARGUMENTS idx Index of the reference parameter.
RETURN
EXAMPLE
Value of the reference parameter as object.
GetObject("WsClient", "MLWsClient") a = 0 while (a < RefParamsCount)
pName = WsClient.GetRefParamNameByIndex(a)
pValue = WsClient.GetRefParamValueByIndex(a)
refObjValue = WsClient.GetRefParamValueByIndexAsObject(a)
pValueByName = WsClient.GetRefParamValueByName(pName)
refObjValueByName =
WsClient.GetRefParamValueByNameAsObject(pName)
Protocol("(RefParam) {0}: {1}", 8,pName, pValue)
a = a + 1 end-while
GetRefParamValueByName
Determines the value of the reference parameter by its name.
GetRefParamValueByName
SYNTAX GetRefParamValueByName(refParamName)
ARGUMENTS refParamName Name of the reference parameter.
RETURN
EXAMPLE
Value of the reference parameter.
GetObject("WsClient", "MLWsClient") a = 0
255
while (a < RefParamsCount)
pName = WsClient.GetRefParamNameByIndex(a)
pValue = WsClient.GetRefParamValueByIndex(a)
refObjValue = WsClient.GetRefParamValueByIndexAsObject(a)
pValueByName = WsClient.GetRefParamValueByName(pName)
refObjValueByName =
WsClient.GetRefParamValueByNameAsObject(pName)
Protocol("(RefParam) {0}: {1}", 8,pName, pValue)
a = a + 1 end-while
GetRefParamValueByNameAsObject
Determines the value of the reference parameter by its name.
GetRefParamValueByNameAsObject
SYNTAX GetRefParamValueByNameAsObject(refParamName)
ARGUMENTS refParamName Name of the reference parameter.
RETURN
EXAMPLE
Value of the reference parameter as object.
GetObject("WsClient", "MLWsClient") a = 0 while (a < RefParamsCount)
pName = WsClient.GetRefParamNameByIndex(a)
pValue = WsClient.GetRefParamValueByIndex(a)
refObjValue = WsClient.GetRefParamValueByIndexAsObject(a)
pValueByName = WsClient.GetRefParamValueByName(pName)
refObjValueByName =
WsClient.GetRefParamValueByNameAsObject(pName)
Protocol("(RefParam) {0}: {1}", 8,pName, pValue)
a = a + 1 end-while
GetWebserviceProxyTypeFromString
Returns a type instance of a web service proxy module specific typestring.
GetWebserviceProxyTypeFromString
SYNTAX GetWebserviceProxyTypeFromString(type)
ARGUMENTS type The typestring that returns a type instance.
RETURN The web service proxy module specific type.
IsArrayObject
Checks whether the specified object or the object in ResultObject is an array.
256
IsArrayObject
SYNTAX IsArrayObject()
IsArrayObject(obj)
ARGUMENTS obj The object to check.
RETURN
EXAMPLE
TRUE = The object is an array.
FALSE = The object is not an array.
GetObject("WsClient", "MLWsClient") bTestResult = WsClient.IsArrayObject() bTestResult = WsClient.IsArrayObject(XmlDoc)
IsObjectNull
Checks whether the specified object or the object in ResultObject is null.
IsObjectNull
SYNTAX IsObjectNull()
IsObjectNull(obj)
ARGUMENTS obj The object to check.
RETURN
EXAMPLE
TRUE = The object is null.
FALSE = The object is not null.
GetObject("WsClient", "MLWsClient") if(WsClient.IsObjectNull()<>true)
Raise("NullCheckMethodFail","ResultObject should be null at this point. IsObjectNull function failed.") end-if
SetParameter
Sets the parameters for the web service functions.
SetParameter
SYNTAX SetParameter(paramName, value)
ARGUMENTS paramName Parameter name
EXAMPLE value Parameter value streamDoc.SetInputBin(streamdoc.PageCount - 1, "testBin")
Examples
Example Login / Logout
GetObject("WsClient", "MLWsClient")
; Wsdl-Uri Mws
WsClient.WsdlUri = "http://localhost:8011/mwsbasic?WSDL"
257
; CallMethod 'Ping'
Result = WsClient.CallMethod("Ping")
; Evaluation if (Result = "")
Raise("Mws Ping", "Result not as expected") end-if
Protocol("PingResult: {0}", 8, Result)
System.Console.WriteLine("PingResult: {0}", Result)
; CallMethod 'Login'
WsClient.SetParameter("userName", "Administrator")
WsClient.SetParameter("password", "")
WsClient.SetParameter("code", "YYICUj9uSKJqDDQV8Vj9PUH45pv0dhTUpNh4xXn5giA=")
WsClient.SetParameter("options", "")
WsClient.SetParameter("LoginResult", "")
WsClient.SetParameter("LoginResultSpecified", "")
WsClient.SetParameter("sessionID", "")
WsClient.SetParameter("xmlResult", "")
Result = WsClient.CallMethod("Login")
RefParamsCount = WsClient.RefParamsCount
PropertiesCount = WsClient.PropertiesCount
; Evaluation sessionID = WsClient.GetRefParamValueByName("sessionID") if (sessionID = "")
Raise("Mws Login", "No sessionID received") end-if a = 0 while (a < RefParamsCount)
pName = WsClient.GetRefParamNameByIndex(a)
pValue = WsClient.GetRefParamValueByIndex(a)
Protocol("(RefParam) {0}: {1}", 8,pName, pValue)
System.Console.WriteLine("(RefParam) {0}: {1}", pName, pValue)
a = a + 1 end-while
Protocol("sessionID: {0}", 8, sessionID)
System.Console.WriteLine("sessionID: {0}", sessionID) loginResult = WsClient.GetRefParamValueByName("LoginResult")
Protocol("LoginResult: {0}", 8, loginResult)
System.Console.WriteLine("LoginResult: {0}", loginResult)
; CallMethod 'Logout'
WsClient.SetParameter("sessionID", sessionId)
WsClient.SetParameter("LogoutResult", "")
258
WsClient.SetParameter("LogoutResultSpecified", "")
WsClient.SetParameter("xmlResult", "") result = WsClient.CallMethod("Logout")
; Evaluation a = 0 while (a < RefParamsCount)
pName = WsClient.GetRefParamNameByIndex(a)
pValue = WsClient.GetRefParamValueByIndex(a)
Protocol("(RefParam) {0}: {1}", 8,pName, pValue)
System.Console.WriteLine("(RefParam) {0}: {1}", pName, pValue)
a = a + 1 end-while logoutResult = WsClient.GetRefParamValueByName("LogoutResult")
Protocol("LogoutResult: {0}", 8, logoutResult)
System.Console.WriteLine("LogoutResult: {0}", logoutResult)
; Wsdl-Uri MwsRws
WsClient.WsdlUri = "http://localhost:8010/mwsbasic?WSDL"
; CallMethod 'Ping'
Result = WsClient.CallMethod("Ping")
RefParamsCount = WsClient.RefParamsCount
PropertiesCount = WsClient.PropertiesCount
; Evaluation if (Result = "")
Raise("MwsRws Ping", "Result not as expected") end-if
Protocol("PingResult: {0}", 8, Result)
System.Console.WriteLine("PingResult: {0}", Result)
; Wsdl-Uri Mur
WsClient.WsdlUri = "http://localhost:8010/murbasic?WSDL"
; CallMethod 'Ping'
Result = WsClient.CallMethod("Ping")
RefParamsCount = WsClient.RefParamsCount
PropertiesCount = WsClient.PropertiesCount
; Evaluation if (Result = "")
Raise("Mur Ping", "Result not as expected") end-if
Protocol("PingResult: {0}", 8, Result)
System.Console.WriteLine("PingResult: {0}", Result)
259
; CallMethod 'GetUsersOfRole'
WsClient.SetParameter("roleName", "AdminRole")
WsClient.SetParameter("GetUsersOfRoleResult", "0")
WsClient.SetParameter("GetUsersOfRoleResultSpecified", "false")
WsClient.SetParameter("lastError", "")
WsClient.SetParameter("users", "")
Result = WsClient.CallMethod("GetUsersOfRole")
RefParamsCount = WsClient.RefParamsCount
PropertiesCount = WsClient.PropertiesCount
; Evaluation
Protocol("Result of GetUsersOfRole: {0}", 8, Result)
System.Console.WriteLine("Result of GetUsersOfRole: {0}", Result) a = 0 while (a < RefParamsCount)
pName = WsClient.GetRefParamNameByIndex(a)
pValue = WsClient.GetRefParamValueByIndex(a)
Protocol("(RefParam) {0}: {1}", 8,pName, pValue)
System.Console.WriteLine("(RefParam) {0}: {1}", pName, pValue)
a = a + 1 end-while test = WsClient.GetRefParamValueByName("users") if (test = "")
Raise("Mur GetUsersOfRole RefParam users", "Result not as expected") end-if
Protocol("users: {0}", 8, test)
System.Console.WriteLine("users: {0}", test)
; destructor
FreeObject("WsClient")
Example: Calling WebServices
GetObject("wscObj", "MLWsClient")
GetObject("xmlDoc","MLXmlDocument")
; WebProxy-Definition
; If Webproxy is required, specify it here wscObj.DefineWebProxy("http://10.12.9.101:8080")
; Wsdl-Uri wscObj.WsdlUri = "http://www.webservicex.net/ConvertTemperature.asmx?WSDL"
; CallMethod 'ConvertTemp' wscObj.SetParameter("Temperature", "0") wscObj.SetParameter("FromUnit", "kelvin") wscObj.SetParameter("ToUnit", "degreeCelsius")
Result = wscObj.CallMethod("ConvertTemp")
260
RefParamsCount = wscObj.RefParamsCount
PropertiesCount = wscObj.PropertiesCount
; Output
Protocol("Result: {0}", 8, Result) a = 0 while (a < RefParamsCount)
pName = wscObj.GetRefParamNameByIndex(a)
pValue = wscObj.GetRefParamValueByIndex(a)
Protocol("(RefParam) {0}: {1}", 8,pName, pValue)
a = a + 1 end-while a = 0 while (a < PropertiesCount)
pName = wscObj.GetPropertyNameByIndex(a)
pValue = wscObj.GetPropertyValueByIndex(a)
Protocol("Property[{0}] {1}: {2}", 8, a, pName, pValue)
a = a + 1 end-while if (Result<>-273.15)
Raise("TemperatureConversionFailed","The Temperature conversion test failed! Expected: -273,15 Result: " + Result) end-if
ParamErrorEncountered = false try
; wscObj.SetParameter("Temperature", "0")
wscObj.SetParameter("FromUnit", "kelvin")
wscObj.SetParameter("ToUnit", "degreeCelsius")
Result = wscObj.CallMethod("ConvertTemp")
OnError
Protocol("WebService Call failed. This is expected!",8,"")
ParamErrorEncountered = true end-try if(ParamErrorEncountered = false)
Raise("WebserviceCallFailTestFailed","The previous WebService call should have failed due to a missing parameter, but it succeeded!") end-if
ExpectedTestErrorEncountered = false try
wscObj.GetArrayLength()
OnError
ExpectedTestErrorEncountered = true end-try if(ExpectedTestErrorEncountered = false)
261
Raise("ExpectedExtensionMethodHasnotfailed","The GetArrayLength Method should have failed, but it succeeded!") end-if
ExpectedTestErrorEncountered = false try
wscObj.GetObjectFromArray(-1)
OnError
ExpectedTestErrorEncountered = true end-try if(ExpectedTestErrorEncountered = false)
Raise("ExpectedExtensionMethodHasnotfailed","The GetObjectFromArray Method should have failed because of an invalid index, but it did succeed!") end-if
ExpectedTestErrorEncountered = false try
wscObj.GetObjectFromArray(0)
OnError
ExpectedTestErrorEncountered = true end-try if(ExpectedTestErrorEncountered = false)
Raise("ExpectedExtensionMethodHasnotfailed","The GetObjectFromArray Method should have failed because of calling it on a non-array object result, but it did succeed!") end-if
; CallMethod 'getAirportInformationByISOCountryCode' wscObj.WsdlUri = "http://www.webservicex.net/airport.asmx?WSDL" wscObj.SetParameter("CountryAbbrviation", "DE")
Result = wscObj.CallMethod("getAirportInformationByISOCountryCode")
RefParamsCount = wscObj.RefParamsCount
PropertiesCount = wscObj.PropertiesCount a = 0 while (a < RefParamsCount)
pName = wscObj.GetRefParamNameByIndex(a)
pValue = wscObj.GetRefParamValueByIndex(a)
Protocol("(RefParam) {0}: {1}", 8,pName, pValue)
a = a + 1 end-while a = 0 while (a < PropertiesCount)
pName = wscObj.GetPropertyNameByIndex(a)
pValue = wscObj.GetPropertyValueByIndex(a)
Protocol("Property[{0}] {1}: {2}", 8, a, pName, pValue)
a = a + 1 end-while xmlDoc.LoadXml(Result)
262
nodeList = xmlDoc.SelectNodes("//NewDataSet/Table/AirportCode[.='STR']") if(nodeList.Count <> 2)
Raise("WebserviceComplexReturnValueTestFailed","The Webservice Test with a complex return type failed.") end-if
; CallMethod 'GetGeoIP' wscObj.WsdlUri = "http://www.webservicex.net/geoipservice.asmx?WSDL" wscObj.SetParameter("IPAddress", "127.0.0.1")
Result = wscObj.CallMethod("GetGeoIP")
RefParamsCount = wscObj.RefParamsCount
PropertiesCount = wscObj.PropertiesCount xmlDoc.LoadXml(Result) a = 0 while (a < RefParamsCount)
pName = wscObj.GetRefParamNameByIndex(a)
pValue = wscObj.GetRefParamValueByIndex(a)
Protocol("(RefParam) {0}: {1}", 8,pName, pValue)
a = a + 1 end-while a = 0 while (a < PropertiesCount)
pName = wscObj.GetPropertyNameByIndex(a)
pValue = wscObj.GetPropertyValueByIndex(a)
Protocol("Property[{0}] {1}: {2}", 8, a, pName, pValue)
a = a + 1 end-while if(wscObj.GetPropertyValueByName("ReturnCode")<>1)
Raise("WebserviceComplexReturnValueTestExtendedFailed","1. ReturnCode does not match.") end-if if(wscObj.GetPropertyValueByName("ReturnCodeDetails")<>"Success")
Raise("WebserviceComplexReturnValueTestExtendedFailed","1.
ReturnCodeDetails does not match.") end-if if(wscObj.GetPropertyValueByName("CountryName")<>"Reserved")
Raise("WebserviceComplexReturnValueTestExtendedFailed","1. CountryName does not match.") end-if if(wscObj.GetPropertyValueByName("CountryCode")<>"ZZZ")
Raise("WebserviceComplexReturnValueTestExtendedFailed","1. CountryCode does not match.") end-if
ResultObject = wscObj.ResultObject if(ResultObject.ReturnCode <> wscObj.GetPropertyValueByName("ReturnCode"))
Raise("WebserviceComplexReturnValueTestExtendedFailed","2. ReturnCode does not match.")
263
end-if if(ResultObject.ReturnCodeDetails <> wscObj.GetPropertyValueByName("ReturnCodeDetails"))
Raise("WebserviceComplexReturnValueTestExtendedFailed","2.
ReturnCodeDetails does not match.") end-if if(ResultObject.CountryName <> wscObj.GetPropertyValueByName("CountryName"))
Raise("WebserviceComplexReturnValueTestExtendedFailed","2. CountryName does not match.") end-if if(ResultObject.CountryCode <> wscObj.GetPropertyValueByName("CountryCode"))
Raise("WebserviceComplexReturnValueTestExtendedFailed","2. CountryCode does not match.") end-if namespacemanager = xmlDoc.GetNamespaceManager() namespacemanager.AddNamespace("def", "http://www.webservicex.net/") xmlNode = xmlDoc.SelectSingleNode("//GeoIP/def:ReturnCode",namespacemanager) if(ResultObject.ReturnCode <> xmlNode.InnerText)
Raise("WebserviceComplexReturnValueTestExtendedFailed","3. ReturnCode does not match.") end-if xmlNode = xmlDoc.SelectSingleNode("//GeoIP/def:ReturnCodeDetails",namespacemanager) if(ResultObject.ReturnCodeDetails <> xmlNode.InnerText)
Raise("WebserviceComplexReturnValueTestExtendedFailed","3.
ReturnCodeDetails does not match.") end-if xmlNode = xmlDoc.SelectSingleNode("//GeoIP/def:CountryName",namespacemanager) if(ResultObject.CountryName <> xmlNode.InnerText)
Raise("WebserviceComplexReturnValueTestExtendedFailed","3. CountryName does not match.") end-if xmlNode = xmlDoc.SelectSingleNode("//GeoIP/def:CountryCode",namespacemanager) if(ResultObject.CountryCode <> xmlNode.InnerText)
Raise("WebserviceComplexReturnValueTestExtendedFailed","3. CountryCode does not match.") end-if wscObj.SetParameter("IPAddress", "127.0.1")
Result = wscObj.CallMethod("GetGeoIP")
RefParamsCount = wscObj.RefParamsCount
PropertiesCount = wscObj.PropertiesCount xmlDoc.LoadXml(Result) a = 0 while (a < RefParamsCount)
pName = wscObj.GetRefParamNameByIndex(a)
264
pValue = wscObj.GetRefParamValueByIndex(a)
Protocol("(RefParam) {0}: {1}", 8,pName, pValue)
a = a + 1 end-while a = 0 while (a < PropertiesCount)
pName = wscObj.GetPropertyNameByIndex(a)
pValue = wscObj.GetPropertyValueByIndex(a)
Protocol("Property[{0}] {1}: {2}", 8, a, pName, pValue)
a = a + 1 end-while if(wscObj.GetPropertyValueByName("ReturnCode")<>0)
Raise("WebserviceComplexReturnValueTestExtended2Failed","1. ReturnCode does not match.") end-if if(wscObj.GetPropertyValueByName("ReturnCodeDetails")<>"Invalid IP address")
Raise("WebserviceComplexReturnValueTestExtended2Failed","1.
ReturnCodeDetails does not match.") end-if if(wscObj.GetPropertyValueByName("CountryName")<>"void")
Raise("WebserviceComplexReturnValueTestExtended2Failed","1. CountryName does not match.") end-if if(wscObj.GetPropertyValueByName("CountryCode")<>"void")
Raise("WebserviceComplexReturnValueTestExtended2Failed","1. CountryCode does not match.") end-if
ResultObject = wscObj.ResultObject if(ResultObject.ReturnCode <> wscObj.GetPropertyValueByName("ReturnCode"))
Raise("WebserviceComplexReturnValueTestExtended2Failed","2. ReturnCode does not match.") end-if if(ResultObject.ReturnCodeDetails <> wscObj.GetPropertyValueByName("ReturnCodeDetails"))
Raise("WebserviceComplexReturnValueTestExtended2Failed","2.
ReturnCodeDetails does not match.") end-if
; CountryName and CountryCode are not set and therefore the Xml Elements do not exist and the Object Properties result in a MLUnknown Monalisa Object
Variable which can not be compared if(ResultObject.CountryName <> wscObj.GetPropertyValueByName("CountryName"))
Raise("WebserviceComplexReturnValueTestExtended2Failed","2. CountryName does not match.") end-if if(ResultObject.CountryCode <> wscObj.GetPropertyValueByName("CountryCode"))
Raise("WebserviceComplexReturnValueTestExtended2Failed","2. CountryCode does not match.")
265
end-if xmlNode = xmlDoc.SelectSingleNode("//GeoIP/def:ReturnCode",namespacemanager) if(ResultObject.ReturnCode <> xmlNode.InnerText)
Raise("WebserviceComplexReturnValueTestExtended2Failed","3. ReturnCode does not match.") end-if xmlNode = xmlDoc.SelectSingleNode("//GeoIP/def:ReturnCodeDetails",namespacemanager) if(ResultObject.ReturnCodeDetails <> xmlNode.InnerText)
Raise("WebserviceComplexReturnValueTestExtended2Failed","3.
ReturnCodeDetails does not match.") end-if
; CountryName and CountryCode are not set and therefore the Xml Elements do not exist and the Object Properties result in a MLUnknown Monalisa Object
Variable which cannot be compared xmlNode = xmlDoc.SelectSingleNode("//GeoIP/def:CountryName",namespacemanager) if(ResultObject.CountryName <> xmlNode.InnerText)
Raise("WebserviceComplexReturnValueTestExtended2Failed","3. CountryName does not match.") end-if xmlNode = xmlDoc.SelectSingleNode("//GeoIP/def:CountryCode",namespacemanager) if(ResultObject.CountryCode <> xmlNode.InnerText)
Raise("WebserviceComplexReturnValueTestExtended2Failed","3. CountryCode does not match.") end-if
; Destructor
FreeObject("wscObj")
FreeObject("xmlDoc")
Example: Upload a document to a Saperion system
; To execute this script, make sure the file C:\temp\Saperion.7.5.pdf is available or modify the filePath and fileName variables. filePath = "C:\temp\Saperion.7.5.pdf" fileName = "Saperion.7.5.pdf" saperionWebserviceUriBase = "http://192.168.241.128:8080/scrwebservices/soap/" ; Modify this URL according to the Saperion system you want to access. saperionAuthenticationServiceUri = saperionWebserviceUriBase +
"AuthenticationService?wsdl" saperionArchiveServiceUri = saperionWebserviceUriBase + "ArchiveService?wsdl" try
#region GetObjects
GetObject("WsClient", "MLWsClient")
GetObject("dos","MLDos")
GetObject("array", "MLArrays")
GetObject("objects","MLObjects")
266
#endregion
loginToken = -1
#region CallMethod 'login' ; Login to the Saperion Webservice to get a token which is needed for subsequent calls to the Saperion system
WsClient.WsdlUri = saperionAuthenticationServiceUri
WsClient.SetParameter("username", "Administrator") ; Modify the user according to the Saperion system you want to access.
WsClient.SetParameter("password", "saperion"); Modify the password according to the Saperion system you want to access.
WsClient.SetParameter("type", 1) ; Logontypes: Index = 1 / Query = 2
WsClient.SetParameter("mandant", "SYSTEM") ; SYSTEM is the default value for non-client systems.
loginToken = WsClient.CallMethod("login")
Protocol("Login Result: {0}",5,loginToken)
#endregion
#region CallMethod 'create'
WsClient.Namespace = "SaperionSoapProxy"
WsClient.WsdlUri = saperionArchiveServiceUri
; The following parameters and methods called are written according to the example specified under the following link: http://portal.saperion.com/docsxml/en/saperion-75-sp2/programming/eprogramming_webservices.html
#region metadatas
; Modify the metadata according to the Saperion system you want to access.
; The following metadata depends on the target 'definition' used in
'create' call.
; In this example the target 'definition' is called 'test' and contains the fields 'name' and 'firstname'
array.Clear()
metaDataParameterType = wsClient.GetWebserviceProxyTypeFromString(WsClient.Namespace +
".saWsProperty")
metaDataInstance = objects.CreateNewInstanceOfType(metaDataParameterType)
metaDataInstance.name = "name"
metaDataInstance.value = fileName
array.AddToArray(metaDataInstance)
metaDataInstance = objects.CreateNewInstanceOfType(metaDataParameterType)
metaDataInstance.name = "firstname"
metaDataInstance.value = "A File with the name:"
array.AddToArray(metaDataInstance)
metaDataArray =array.GetArray(metaDataParameterType)
#endregion
267
#region container ; This object contains the actual document to archive.
array.Clear()
contentParameterType = wsClient.GetWebserviceProxyTypeFromString(WsClient.Namespace +
".saWsContent")
contentInstance = objects.CreateNewInstanceOfType(contentParameterType)
contentInstance.content = dos.FileReadAllBytes(filePath) ; Specify the full path to the file to upload to the Saperion archive.
contentInstance.filename = fileName
array.AddToArray(contentInstance)
contentArray =array.GetArray(contentParameterType)
contentContainer = wsClient.GetWebserviceProxyTypeFromString(WsClient.Namespace +
".saWsContentContainer")
contentContainerInstance = objects.CreateNewInstanceOfType(contentContainer)
contentContainerInstance.content = contentArray
modeType = objects.GetTypeOfObject(contentContainerInstance.mode)
enumValue = objects.GetEnumValue(modeType,"REPLACE")
contentContainerInstance.mode = enumValue
#endregion
WsClient.SetParameter("token", loginToken)
WsClient.SetParameter("definition", "test") ; Modify according to the
Saperion system accessed: The target definition to which the document uploads.
WsClient.SetParameter("metadatas", metaDataArray) ; The metadata.
WsClient.SetParameter("container", contentContainerInstance) ; The actual document data.
WsClient.SetParameter("versionComment", "Some versioning comment via
PDC MonaLisa") ; Comment of the document version.
WsClient.SetParameter("acls", "")
Result = WsClient.CallMethod("create")
RefParamsCount = WsClient.RefParamsCount
PropertiesCount = WsClient.PropertiesCount
#endregion
createdDocumentId = WsClient.GetPropertyValueByName("HDoc")
createdDocumentSysRowId = WsClient.GetPropertyValueByName("sysRowId")
Protocol("The document was successfully created and has HDoc: {0}
(SysRowId: {1})",8, createdDocumentId,createdDocumentSysRowId)
#region Debug / Output
Protocol("Result: {0}", 8, Result)
a = 0
while (a < RefParamsCount)
pName = WsClient.GetRefParamNameByIndex(a)
pValue = WsClient.GetRefParamValueByIndex(a)
268
Protocol("(RefParam) {0}: {1}", 8,pName, pValue)
a = a + 1
end-while
a = 0
while (a < PropertiesCount)
pName = WsClient.GetPropertyNameByIndex(a)
pValue = WsClient.GetPropertyValueByIndex(a)
Protocol("Property[{0}] {1}: {2}", 8, a, pName, pValue)
a = a + 1
end-while
#endregion
Finally
if(loginToken <> -1)
#region CallMethod 'logoff' ; Log off the Saperion system regardless if the upload was successful
WsClient.WsdlUri = saperionAuthenticationServiceUri
WsClient.SetParameter("token", loginToken)
Result = WsClient.CallMethod("logoff")
Protocol("Logoff Result: {0}",5,Result)
#endregion
end-if
#region FreeObjects
FreeObject("WsClient")
FreeObject("array")
FreeObject("dos")
FreeObject("objects")
#endregion
End-try
269
User Attributes
About MLUserRepository
The MonaLisa object MLUserRepository enables you to read user profile properties and rights from
LDAP. For more information, refer to "UserRepository.config" in the Perceptive Document Composition
Advanced Design and Setup Guide.
To load the object, use the MonaLisa function GetObject .
Example
GetObject("UserRepository", "MLUserRepository")
Functions of the Class MLUserRepository
GetCurrentUser
Returns the MonaLisa user object for the current logged in user.
GetCurrentUser
SYNTAX GetCurrentUser()
RETURN MonaLisa user object.
GetUser
Returns the MonaLisa user object for the specified user. An error is thrown if the user does not exists in the user repository.
GetUser
SYNTAX
ARGUMENTS
RETURN
GetUser(userName) userName Name of the user.
MonaLisa user object.
Functions of the MonaLisa User Object
GetAttribute
Returns the value of the attribute.
The attributes UserId (user name) and UserRoleNames (comma separated roles) are always present, all other attributes depend on a profile and its mapping to LDAP.
GetAttribute
SYNTAX GetAttribute(attribute)
ARGUMENTS attribute User attributes.
RETURN Attribute value or an empty string if the attribute does not exist.
HasPermission
270
Checks whether a user has the corresponding rights.
HasObjectPermission
SYNTAX HasPermission(int permission)
HasPermission(ModusPermission permission)
ARGUMENT
S permissio n
User right. The parameter can be returned as an integer value or an enumerator.
Enumerator ModusPermission
Enumerator
ModusPermission.None
ModusPermission.ExecuteModusStudio
Intege r
Value
0
1
Definitio n
No right.
Is allowed to start PDC
Studio.
ModusPermission.ShowNavigator 2
ModusPermission.MwsShowNavigator
ModusPermission.CommonSettings
ModusPermission.ChangeSystem
ModusPermission.MwsChangeSystem
ModusPermission.ChangeFolder
ModusPermission.Search
ModusPermission.ShowTypeFilter
ModusPermission.TransferSystem
3
4
5
6
7
8
9
10
Shows the navigator.
Shows the navigator in
PDC Client.
General user settings
(main menu
-> settings).
Allows a user to change systems.
Allows a user to change systems in the PDC
Client.
Allows changing to a lower folder but not in a parent folder.
Search in current system is allowed.
Show object filter for the various object types in the navigator.
System can be
271
272
ModusPermission.SynchronizeSystem
ModusPermission.Administrate
ModusPermission.MwsDownloadDocument
11
12
13
ModusPermission.MwsProcessList 14
ModusPermission.MwsForwaredProcessList
ModusPermission.MwsInsertDocument
ModusPermission.MwsInsertBlock
ModusPermission.MwsSetBundlePrinter
ModusPermission.MwsSetDocumentPrinter
ModusPermission.MwsSetDocumentPrinterWiz
ard
ModusPermission.MwsManualForwardProcess
ModusPermission.MwsCreateDocuments
ModusPermission.MwsDataSelection
ModusPermission.MwsPrintAndArchive
ModusPermission.MwsAdministrate
ModusPermission.MwsProcessListFromDefined
User
ModusPermission.MwsChangeFolder
ModusPermission.MwsViewProcess
ModusPermission.MwsViewStack
ModusPermission.MwsViewOpenEnvelope
ModusPermission.MwsViewOpenJob
ModusPermission.MwsClearCache
ModusPermission.ModifyFontFace
ModusPermission.ModifyFontSize
ModusPermission.ModifyFontColor
ModusPermission.ModifyFontStyleBold
ModusPermission.ModifyFontStyleItalic
ModusPermission.ModifyFontStyleUnderline
ModusPermission.ModifyFontAlignment
ModusPermission.CanPrintInPreview
14
15
16
17
18
19
20
27
28
29
30
31
32
2000
2001
2002
2003
2004
2005
2006
2011
21
22
23
24
25
26 transferred.
System can be synchronize d.
User can perform administratio n tasks.
Download of created documents to PDC
Client.
273
ModusPermission.OdinProcessUnlock
ModusPermission.OdinProcessSetBack
ModusPermission.OdinProcessCreateStack
ModusPermission.OdinProcessDelete
ModusPermission.OdinProcessSuspend
ModusPermission.OdinOpenJobCreateStack
ModusPermission.OdinStackEdit
ModusPermission.OdinStackFree
ModusPermission.OdinStackDelete
ModusPermission.OdinStackSetBack
ModusPermission.OdinStackSetBackToStreami
ng
ModusPermission.OdinStackLock
ModusPermission.OdinStackUnlock
3000
3001
3002
3003
3004
3005
3500
3501
3502
3503
3504
3505
3506
User can unlock a locked process.
(Resume)
User can reset a process from
Locked to
Rendition
created or
Imported.
User can create a stack for print / delete from process jobs.
User can set processes to the status
Delete.
User can lock a process.
User can create a stack for print / delete from open jobs.
User can edit stacks.
User can release stacks.
User can delete stacks.
User can reset a stack to the status
Wait.
User can reset a stack for streaming.
User can lock a stack.
User can unlock a stack.
ModusPermission.OdinStackSetBackTo
ModusPermission.OdinJobSetState
ModusPermission.Test
ModusPermission.OdinJobSetPrinter
ModusPermission.OdinStackEnvelopeRemove
ModusPermission.OdinJobRemove
3507
3508
3509
3510
3511
3512
User can reset a stack to a specific stack type.
User can reset jobs to a specific status.
User can test documents and bundles in PDC
Client integrated in
PDC Studio.
User can change the printer of a job.
User can remove an envelope from a stack.
User can remove an job from an envelope or stack.
RETURN TRUE = The user has the corresponding object rights.
FALSE = The user does not have the corresponding object rights.
HasObjectPermission
Checks whether a user has the specified object rights (create, read, update, delete) for an object.
HasObjectPermission
SYNTAX HasObjectPermission(int objectType, int permission)
HasObjectPermission(ModusSuiteObjectType objectType, ModusObjectActionPermission permission)
ARGUMENT
S objectTyp e
The parameter can be returned as an integer value or an enumerator.
Enumerator
ModusSuiteObjectType.TextComponent
ModusSuiteObjectType.TextDocument
Intege r
4
6
Object type
Text block
Document
274
275
ModusSuiteObjectType.TextDocumentCollecti
on
ModusSuiteObjectType.Script
ModusSuiteObjectType.Condition
ModusSuiteObjectType.LookupTable
ModusSuiteObjectType.Process
ModusSuiteObjectType.Folder
ModusSuiteObjectType.DataObject
ModusSuiteObjectType.Selection
ModusSuiteObjectType.DataObjectScript
ModusSuiteObjectType.DataObjectQuery
ModusSuiteObjectType.TransferJob
ModusSuiteObjectType.Annex
ModusSuiteObjectType.Envelope
ModusSuiteObjectType.PostageDefinition
ModusSuiteObjectType.XsdSelection
ModusSuiteObjectType.Printer
ModusSuiteObjectType.AliasTable
ModusSuiteObjectType.Form
ModusSuiteObjectType.ValueHelp
39
40
42
49
52
28
30
34
36
38
8
9
10
11
12
13
22
24
27
ModusSuiteObjectType.DataProviderDefinition 53
ModusSuiteObjectType.MwsProcess
ModusSuiteObjectType.StandardProcess
ModusSuiteObjectType.EMailPrinter
ModusSuiteObjectType.OutsourcingPrinter
ModusSuiteObjectType.CustomUI 64
59
61
62
63 template
Bundles
Script
Conditions
Lookup table
Process /
Workflow
Folders
Data object
(Xdata)
Selection
Data object script
Data object query
Transfer job
Annex
Envelope
Postage definition
XSD selection
Odin online printer
Alias tables in Modus
Odin form
Value help object for variables
Database query definition
MWS process
Standard process
Odin email printer
Odin outsourcing printer
CustomUI
permissio n
ModusSuiteObjectType.Profile
ModusSuiteObjectType.Role
ModusSuiteObjectType.SimpleTextContainer
ModusSuiteObjectType.RoleMapping
69
71
72
73
The parameter can be returned as an integer value or an enumerator.
Enumerator
ModusObjectActionPermission.None
Integer
0
ModusObjectActionPermission.Create 1
ModusObjectActionPermission.Read 2
ModusObjectActionPermission.Update 4
ModusObjectActionPermission.Delete 8 definition
(ribbon)
Profile definition
(profile attribute collection)
Role
Container for simple, unformatte d text blocks to be inserted in Word documents
Stores the mapping of external roles to
Modus roles
RETURN TRUE = The user has the corresponding object rights.
FALSE = The user does not have the corresponding object rights.
IsInRole
Checks whether the user is a member of the corresponding role.
IsInRole
SYNTAX
ARGUMENTS
RETURN
IsInRole(roleName) roleName Name of the role.
TRUE = The user is a member of the role.
FALSE = The user is not a member of the role.
276
Sample script MLUserRepository
; Initialize MonaLisa UserRepository object
GetObject("userRepository", "MLUserRepository") try
; Get current logged in user
currentUser = userRepository.GetCurrentUser()
; Get user from UserRepository
user = userRepository.GetUser("JKlinger")
; UserName ("UserId" always exists per default)
userName = user.GetAttribute("UserId")
; Roles of the user ("UserRoleNames" always exists per default)
roles = user.GetAttribute("UserRoleNames")
; Check if user is in a specific role
isAdmin = user.IsInRole("AdminRole")
; Check if user has permission to modify a system
canChangeSystem = user.HasPermission(ModusPermission.ChangeSystem)
; same with integer instead of enum
canChangeSystem_int = user.HasPermission(5)
; Check if user has object-permission to create or delete a script
canCreateScript = user.HasObjectPermission(ModusSuiteObjectType.Script,
ModusObjectActionPermission.Create)
canDeleteScript = user.HasObjectPermission(ModusSuiteObjectType.Script,
ModusObjectActionPermission.Delete)
; same with integer instead of enum
canCreateScript_int = user.HasObjectPermission(9, 1)
canDeleteScript_int = user.HasObjectPermission(9, 8)
canCreateDeleteScript_int = user.HasObjectPermission(9, 1+8) ; combined create+delete -> 1+8
OnError
Protocol("Error reading user from UserRepository.", 0) end-try
Configuration
Configuration files (for example PDC.Studio.exe.config) require the following section:
<configuration>
<configSections>
277
...
<section name="userRepository" type="ModusSuite.UserRepository.DataAccess.UserRepositoryConfiguration,
ModusSuite.UserRepository.DataAccess"/>
<section name="userRepository_Ldap" type="ModusSuite.UserRepository.DataAccess.Ldap.LdapConfiguration,
ModusSuite.UserRepository.DataAccess"/>
...
</configSections>
<userRepository configSource = "UserRepository.config"/>
<userRepository_Ldap configSource = "UserRepository_ldap.config"/>
</configuration>
278
Archive Functions
About MLPerceptiveArchive
The MonaLisa object MLPerceptiveArchive enables you to add documents to the Perceptive Archive
(ImageNow). To load the object, use the MonaLisa function GetObject .
Example
GetObject("INIS","MLPerceptiveArchive")
Functions of the class MLPerceptiveArchive
AddDocumentPage
Adds a file as a new page to an existing ImageNow document.
AddDocumentPage
SYNTAX AddDocumentPage(string documentId, string filePath)
ARGUMENTS documentId ID of the ImageNow document to which you want to add the new page.
RETURN
EXAMPLE filePath File to upload and store as a page in the ImageNow document.
The ID of the newly created page. addedPageId = INIS.AddDocumentPage(docId,"%PDCDir%Admin\MS-
SQL\MSSql_Rep_DB_Schema.sql")
Connect
Opens a connection and authenticates to the ImageNow Integration Server.
Syntax
Connect(string serverURI,string userName, string password)
Parameter Description
serverURI Root URI of the Perceptive Integration Server. userName password
User name to log in to the Perceptive Integration Server.
Encrypted password to log in to the Perceptive Integration Server.
Note To encode the password, use the tool Encoder.exe in the installation directory.
Return value
-
CreateDocument
Creates an ImageNow document.
CreateDocument
SYNTAX CreateDocument(filePath, documentName, documentTypeName, drawerName)
ARGUMENTS filePath File to upload and store as an ImageNow document. documentName Name of the ImageNow document to create. The maximum string length is 128 characters.
279
documentTypeName Type of document to create. The type must exist in ImageNow. drawerName Drawer in which to store the document in ImageNow. The drawer must exist in ImageNow.
ID of the created document. RETURN
Disconnect
Closes an existing connection.
Disconnect
SYNTAX Disconnect()
GetDocumentViewResult
Returns the result of the specified document view additionally filtered by the optional specified VSL query.
GetDocumentViewResult
SYNTAX GetDocumentViewResult(viewId, vslQuery)
ARGUMENTS viewId ID of the view to execute. The view must be a DOCUMENT view. vslQuery String that contains a filter in VSL query syntax. Use an empty string to return the unfiltered result of the view.
For more information on VSL syntax, refer to "VSL" in Perceptive Integration
Server Help.
RETURN Proprietary XML structure that contains the definition of the view itself and the result of the view.
GetDocumentViews
Returns an XML structure that contains all existing views in the DOCUMENT category.
GetDocumentViews
SYNTAX GetDocumentViews()
RETURN XML structure that contains all existing views in the DOCUMENT category.
GetFolderContentViewResult
Returns the result of the specified folder content view additionally filtered by the optional specified VSL query.
GetFolderContentViewResult
SYNTAX GetFolderContentViewResult(viewId, vslQuery)
ARGUMENTS viewId ID of the view to execute. The view must be a FOLDER_CONTENT view. vslQuery String that contains a filter in VSL query syntax. Use an empty string to return the unfiltered result of the view.
For more information on VSL syntax, refer to "VSL" in Perceptive Integration
Server Help.
280
RETURN Proprietary XML structure that contains the definition of the view itself and the result of the view.
GetFolderViewResult
Returns the result of the specified folder view additionally filtered by the optional specified VSL query.
GetFolderViewResult
SYNTAX GetFolderViewResult(viewId, vslQuery)
ARGUMENTS viewId ID of the view to execute. The view must be a FOLDER view. vslQuery String that contains a filter in VSL query syntax. Use an empty string to return the unfiltered result of the view.
For more information on VSL syntax, refer to "VSL" in Perceptive Integration
Server Help.
RETURN Proprietary XML structure that contains the definition of the view itself and the result of the view.
GetFolderViews
Returns an XML structure that contains all existing views in the FOLDER category.
GetFolderViews
SYNTAX GetFolderViews()
RETURN XML structure that contains all existing views in the FOLDER category.
MoveDocumentToFolder
Moves an ImageNow document to an ImageNow folder.
MoveDocumentToFolder
SYNTAX
MoveDocumentToFolder(documentId, targetFolderId)
ARGUMENTS documentId ID of the ImageNow document you want to move. targetFolderId ID of the ImageNow folder to move the ImageNow document to.
SearchForDocument
Returns the result of the view SysDocumentAll, additionally filtered by the optional specified VSL query.
SearchForDocument
SYNTAX SearchForDocument(vslQuery)
ARGUMENTS vslQuery String that contains a filter in VSL query syntax. Use an empty string to return the unfiltered result of the view.
For more information on VSL syntax, refer to "VSL" in Perceptive Integration
Server Help.
RETURN Proprietary XML structure that contains the definition of the view itself and the result of the view.
281
UpdateDocumentKey
Selectively updates any one of the five ImageNow document key fields (Field1-Field5).
UpdateDocumentKey
SYNTAX UpdateDocumentKey(documentId, keyFieldIndex, value)
ARGUMENTS documentId ID of the ImageNow document you want to update. keyFieldIndex Number of the key field to update.
Example
1 for Field1
2 for Field2 value Value to write into the key field. The maximum string length is 40 characters.
Properties of the class MLPerceptiveArchive
Property
BaseURI
Description
Root URI of the Restful Web Service to access.
Connected TRUE = A connection to the Perceptive Integration Server exists.
FALSE = No connection to the Perceptive Integration Server exists.
LastErrorResponseContent Contains the error response content of the last executed request.
ServerVersion
SessionID
Contains the version of the Perceptive Integration Server API to which a connection is established or an empty string if no connection is established.
Contains the current SessionID if connected.
Timeout Timeout in milliseconds used for requests and responses.
Sample script MLPerceptiveArchive
GetObject("INIS","MLPerceptiveArchive")
INIS.Timeout = 10000 session = "" try
Protocol("Connecting to IS ...",5)
INIS.Connect("http://10.184.107.75:8080/integrationserver","Administrator"
,"ysKNoeLwWW9uyrlDjU2m5A==")
session = INIS.SessionId
Protocol("Connected: to {1} (API v{2}) - Session: {0}",5, session,
INIS.BaseUri, INIS.ServerVersion)
Protocol("Getting available document views ...",5)
result = INIS.GetDocumentViews()
;Protocol("The following document views exist on {0}",5, INIS.BaseUri)
;Protocol(result,5) ;For debugging purposes - output the complete result xml
result = INIS.GetFolderViews()
;Protocol("The following folder views exist on {0}",5, INIS.BaseUri)
;Protocol(result,5) ;For debugging purposes - output the complete result xml
282
vslQuery = "[name] startswith 'test'" ; For information about the VSL
Syntax refer to https://docs.perceptivesoftware.com/robohelp/robo/server/6.7/PDM/en_US/help.h
tm#Subsystems/integrationserver/VSL/VSLStatementSyntax.htm%3FTocPath%3DDevelo per%20Topics|Using%20Integration%20Server|VSL|_____2
Protocol("Searching for documents (Query: '{0}')...",5, vslQuery)
result = INIS.SearchForDocument(vslQuery)
; Some useful XPath statements when working with the result XML of
SearchForDocument
;//view/columns/column[name[.='Document ID']]/columnId
;//view/columns/column[name[.='Name']]/columnId
;//view/columns/column[name[.='Field1']]/columnId
;//viewResults/resultRows/resultRow/fields/field[columnId[.='???']]/value
;Protocol(result,5) ;For debugging purposes - output the complete result xml
GetObject("ResultXml","MLXmlDocument")
ResultXml.LoadXml(result)
nameColumnIdNode =
ResultXml.SelectSingleNode("//view/columns/column[name[.='Name']]/columnId")
nameColumnId = nameColumnIdNode.InnerText
docIdColumnIdNode =
ResultXml.SelectSingleNode("//view/columns/column[name[.='Document
ID']]/columnId")
docIdColumnId = docIdColumnIdNode.InnerText
resultRowList =
ResultXml.SelectNodes("//viewResults/resultRows/resultRow/fields")
docResultCounter = resultRowList.Count
Protocol("The following {1} Document(s) were found by query '{0}':",5, vslQuery, docResultCounter)
resultEnumerator = resultRowList.GetEnumerator()
readNext = resultEnumerator.MoveNext()
while (readNext)
currentNode = resultEnumerator.Current
documentNameValueNode = currentNode.SelectSingleNode("field[columnId[.='" + nameColumnId +
"']]/value")
documentIdValueNode = currentNode.SelectSingleNode("field[columnId[.='"
+ docIdColumnId + "']]/value")
documentName = documentNameValueNode.InnerText
documentId = documentIdValueNode.InnerText
Protocol("Search result: {0} (ID: {1})",5,documentName, documentId)
readNext = resultEnumerator.MoveNext()
end-while
result = INIS.GetFolderViewResult("SysProjectsAll","")
;Protocol(result,5) ;For debugging purposes - output the complete result xml
Protocol("--------- Search test finished moving on to modification tests -
--------",5)
283
GetObject("User","MLUserRepository")
currentUser = User.GetCurrentUser()
userName = currentUser.GetAttribute("UserId")
roleNames = currentUser.GetAttribute("UserRoleNames")
FreeObject("User")
docName = "Test Document (from PDC Monalisa Script)"
field1 = "PDC-User: " + userName
field2 = "PDC-Roles: " + roleNames
field5 = "Some other useful information"
field4 = "Fields can not be longer than 40 chars."
result = INIS.SearchForDocument("[name] = '" + docName + "' and [field1] =
'" + field1 + "' and [field2] = '" + field2 + "' and [field3] = $NULL and
[field4] = '" + field4 + "' and [field5] = '" + field5 + "'")
ResultXml.LoadXml(result)
resultRowList =
ResultXml.SelectNodes("//viewResults/resultRows/resultRow/fields")
resultCount = resultRowList.Count
if(resultCount > 0)
node =
ResultXml.SelectSingleNode("//viewResults/resultRows/resultRow/fields/field[c olumnId[.='" + docIdColumnId + "']]/value")
docId = node.InnerText
Protocol("The document '{0}' already exists {2} time(s) and the 1st of
{2} has ID {1} ! No document will be created !",1, docName, docId, resultCount)
else
docId = INIS.CreateDocument("%PDCDir%Admin\MS-
SQL\MSSql_CreateUser.sql",docName,"Default","Folders")
Protocol("Document '{1}' ({0}) created",5, docId, docName)
end-if
INIS.UpdateDocumentKey(docId,2,field2)
INIS.UpdateDocumentKey(docId,1,field1)
INIS.UpdateDocumentKey(docId,5,field5)
Protocol("Document '{1}' ({0}) Field 1,2 and 5 updated",5, docId, docName)
addedPageId = INIS.AddDocumentPage(docId,"%PDCDir%Admin\MS-
SQL\MSSql_Rep_DB_Schema.sql")
Protocol("Created new page {2} in document '{1}' ({0})",5, docId, docName,addedPageId)
INIS.UpdateDocumentKey(docId,4,field4)
Protocol("Document '{1}' ({0}) Field 4 updated",5, docId, docName)
folderQuery = "[name] = 'TestFolder'"
result = INIS.GetFolderViewResult("SysProjectsAll",folderQuery)
ResultXml.LoadXml(result)
folderIdColumnIdNode =
ResultXml.SelectSingleNode("//view/columns/column[name[.='Folder
ID']]/columnId")
folderIdColumnId = folderIdColumnIdNode.InnerText
284
resultRowList =
ResultXml.SelectNodes("//viewResults/resultRows/resultRow/fields")
resultCount = resultRowList.Count
if(resultCount > 0)
node =
ResultXml.SelectSingleNode("//viewResults/resultRows/resultRow/fields/field[c olumnId[.='" + folderIdColumnId + "']]/value")
targetFolderId = node.InnerText
Protocol("Found {0} folder(s) as possible move target (Query: {1}).
Using the 1st of {0} ... using Folder ID {2}",5, resultCount,folderQuery, targetFolderId)
INIS.MoveDocumentToFolder(docId,targetFolderId)
Protocol("Document '{1}' ({0}) moved into folder with ID {2}",5, docId, docName, targetFolderId)
else
Protocol("No folder was found as a possible move target (Query: {0}).
No document was moved!",1,folderQuery)
end-if
OnError
errorContent = INIS.LastErrorResponseContent
Protocol("Error: {0}",0,Error.Message)
if(errorContent <> "")
Protocol("Error: {0}",0, errorContent)
end-if
Finally
try
if(session <> "")
Protocol("Disconnecting from IS ...",5)
INIS.Disconnect()
Protocol("Disconnected: {0}",5,session)
end-if
FreeObject("ResultXml")
FreeObject("INIS")
OnError
Protocol("Error while disconnecting: {0}",0,Error.Message)
end-try end-try
285
Array Functions
About array functions
The MonaLisa object MLArrays enables you to work with object arrays.
To load the object, use the MonaLisa function GetObject .
Example
GetObject("array","MLArrays")
Properties of the class MLArrays
Property Description
Count Number of elements in the array.
Functions of the Class MLArrays
AddToArray
Appends an element - as a specific type if specified - at the end of the array.
AddToArray
SYNTAX AddToArray(obj, addAsType)
ARGUMENTS obj Object to add. addAsType Element type. This parameter is optional.
Clear
Clears all elements of the array.
Clear
SYNTAX Clear()
GetArray
Returns a typed .NET array.
GetArray
SYNTAX
ARGUMENTS
RETURN
GetArray(type) type Type of the array.
Typed .NET array.
GetAtIndex
Retrieves the element in the array at the specified position.
GetAtIndex
286
SYNTAX
ARGUMENTS
RETURN
GetAtIndex(index) index Zero-based position from which to retrieve the element.
Object contained in the array.
InitFromArrayObject
Initializes the class as array with all elements from the provided arrayObject.
InitFromArrayObject
SYNTAX InitFromArrayObject(arrayObject)
ARGUMENTS arrayObject Object that implements the IList interface.
InsertIntoArray
Inserts an element - as a specific type if specified - into the array at the specified position.
InsertIntoArray
SYNTAX InsertIntoArray(index, obj, addAsType)
ARGUMENTS index Zero-based index at which the value inserts. obj Object to insert. addAsType Element type. This parameter is optional.
287
Object Functions
About object functions
The MonaLisa object MLObjects enables you to work with types and create dynamic object instances.
To load the object, use the MonaLisa function GetObject .
Example
GetObject("object","MLObjects")
Functions of the Class MLObjects
CreateNewInstanceOfType
Creates a new object instance of the specified type.
CreateNewInstanceOfType
SYNTAX CreateNewInstanceOfType(type, args)
ARGUMENTS type Type for which to create an instance.
RETURN args Arguments for the instance. This parameter is optional.
New object instance of the type.
GetEnumValue
Returns the enumeration value of a specific type by a specific untyped value.
GetEnumValue
SYNTAX GetEnumValue(type, value)
ARGUMENTS type Enumeration type. value Untyped value of the enumeration value.
RETURN Typed enumeration value.
GetModule
Returns the module in which the specified type is defined.
GetModule
SYNTAX
ARGUMENTS
RETURN
GetModule(type) type Type for which to get the module.
Module in which the specified type is defined.
GetTypeInModule
Resolves the typestring to a real type within a specific module.
GetTypeInModule
SYNTAX GetTypeInModule(type, module)
288
ARGUMENTS type Typestring used to retrieve the type. module Module in which the type is specified.
Real type. RETURN
GetTypeOfObject
Returns the type of the specified object instance.
GetTypeOfObject
SYNTAX GetTypeOfObject(obj)
ARGUMENTS obj Object instance.
RETURN Type of the specified object instance.
GetTypeOfObjectAsString
Returns the typestring of the specified object instance.
GetTypeOfObjectAsString
SYNTAX GetTypeOfObjectAsString(obj)
ARGUMENTS obj Object instance.
RETURN Typestring of the specified object instance.
289
Properties and Functions of Contexts
Context ManualVariable
About the context ManualVariable
Use this context for scripts assigned to text block variables that contain a value help.
Properties of the context ManualVariable
Property Description
AssignedValueHelpType Type of value help assigned to a text block variable.
Read-only property.
Possible values
Value
ValueHelpType.Unknown
Description
No value help assigned.
ValueHelpType.Textbox
ValueHelpType.Combobox
ValueHelpType.Calendar
ValueHelpType.SpinEdit
Text box with input mask.
Drop-down list
Popup calendar (DateTimePicker)
Numeric input field (SpinEdit)
ValueHelpType.MultilineTextbox Multiline textbox
You can specify value help settings depending on the returned value, using the appropriate object with its properties and functions.
Example
if (AssignedValueHelpType = ValueHelpType.Textbox)
... end-if
Object
Textbox
Combobox
Description
Allows you to query or change property values of the text box with input mask value help within the script, if AssignedValueHelpType returns the value
ValueHelpType.Textbox.
Property Description
Textbox.InputMask Sets or gets the InputMask value.
Example
if (AssignedValueHelpType = ValueHelpType.Textbox)
Textbox.InputMask = "00" end-if
Allows you to query or change property values or to call functions of the drop-down value help within the script, if AssignedValueHelpType returns the value
ValueHelpType.Combobox.
Property
Combobox.Sorted
Description
Sets or gets the Sorted flag of the valuehelp (Boolean).
Combobox.ItemCount Gets the number of items from the items collection.
290
Functions
Example
if (AssignedValueHelpType = ValueHelpType.Combobox) cnt = Combobox.ItemCount itemisadded = Combobox.AddItem("Max")
Combobox.Sorted = true end-if
DateTimePicker Allows you to query or change property values of the popup calendar value help within the script, if AssignedValueHelpType returns the value ValueHelpType.Calendar.
Property
DateTimePicker.CustomFormat
Description
Sets or gets the CustomFormat format specifier.
SpinEdit
DateTimePicker.DateTimeFormat Sets or gets the DateTimeFormat.
Possible values
Short
Long
Custom
Example
if (AssignedValueHelpType = ValueHelpType.Calendar)
DateTimePicker.CustomFormat = "dd.MM.yyyy" if (DateTimePicker.DateTimeFormat <> "Custom")
DateTimePicker.DateTimeFormat = "Custom" end-if end-if
Allows you to query or change property values of the numeric input field value help within the script, if AssignedValueHelpType returns the value ValueHelpType.SpinEdit.
Property Description
SpinEdit.DecimalPlaces Sets or gets the DecimalPlaces value.
SpinEdit.Increment
SpinEdit.Maximum
Sets or gets the Increment value.
Sets or gets the Maximum value.
SpinEdit.Minimum Sets or gets the Minimum value.
Example
if (AssignedValueHelpType = ValueHelpType.SpinEdit)
SpinEdit.DecimalPlaces = 0
SpinEdit.Increment =5
SpinEdit.Maximum = 100
SpinEdit.Minimum = 0 end-if
MultilineTextbox Allows you to query or change property values of the multiline textbox value help within the script, if AssignedValueHelpType returns the value ValueHelpType.MultilineTextbox.
291
Property Description
MultilineTextbox.MaxLength
Sets or gets the MaxLength value.
To disable the textlength restriction, set this value to 0.
Example
if (AssignedValueHelpType = ValueHelpType.MultilineTextbox)
MultiLineTextbox.MaxLength = 12 end-if
Functions of the Context ManualVariable
AddItem
Adds the given item to the items collection.
The usage of the parameters ingoreCase and trim does not influence the item itself. If the search does not find any item, it is added as provided in the item parameter.
AddItem
SYNTAX
ARGUMENTS
RETURN
AddItem(item)
AddItem(item, ignoreCase, trim) item trim
Item you want to add. ignoreCase TRUE = Search is not case-sensitive.
FALSE = Search is case-sensitive.
TRUE = Ignore leading and trailing blanks.
FALSE = Do not ignore leading and trailing blanks.
TRUE = The item was added.
FALSE = The item could not be added because an identical item already exists.
ClearItems
Clears the items collection.
ClearItems
SYNTAX ClearItems()
EXAMPLE
ClearItems()
ItemExists
Searches for the given item in the items collection.
Depending on the boolean parameters ignoreCase, and trim, it is possible to search for the identical item, perform a case insensitive search, or ignore leading and trailing blanks when searching.
InitDataset
SYNTAX
ARGUMENTS
ItemExists(item, ignoreCase, trim) item Item to search for.
292
ignoreCase TRUE = Search is case insensitive.
FALSE = Search is case sensitive. trim TRUE = Ignore leading and trailing blanks.
FALSE = Consider leading and trailing blanks.
293
Context ModusBatch
About the context ModusBatch
Use this context for scripts in batch processes.
Properties of the context ModusBatch
Property
ErrorMessage
InsertObject
InsertObjectS
DocumentCollection
SystemOId (System
Name)
Directory
Description
Error message. If a value is assigned, document generation aborts with the corresponding error message.
TRUE = Continue processing.
FALSE = Stop processing.
Y = Continue processing.
N = Stop processing.
Bundle to generate.
Object ID of the system in which the bundle resides.
Directory in which the generated bundles are saved.
Read-only property.
Functions of the Context ModusBatch
AssignData
Assigns XML data with a data ID.
AssignData
SYNTAX
ARGUMENTS
EXAMPLE
AssignData(dataId, xmlData) dataId Data ID xmlData XML
AssignData(System.DataId, System.LastXml)
DeleteDirectory
Deletes the directory defined in the Directory property.
DeleteDirectory
SYNTAX DeleteDirectory()
GetData
Retrieves the XML data of the given DataID.
GetData
SYNTAX
ARGUMENTS
GetData(dataId) dataId Data ID
294
RETURN
EXAMPLE
XML data
GetData(System.DataId)
SetDataContext
Specifies the XML data to navigate.
SetDataContext
SYNTAX SetDataContext(xmlData)
ARGUMENTS
EXAMPLE xmlData XML data
SetDataContext(System.LastXml)
295
Context MwsProcess
About the context MwsProcess
Use this context for scripts in MWS processes.
Properties of the context MwsProcess
Property
ChangeAction
Description
Executes the script assigned to the event OnStatusChange and provides an enumerator with the following properties.
Possible properties Description
None No action
Toggle
SetStructure
SetData
Modify status
Refresh structure
Assign data
IsObjectSet
ObjectData
TRUE = The object has been set or configured.
FALSE = The object has not been set or configured.
Read-only property.
XML data for data retrieval.
Read-only property.
ProcessBlocked TRUE = Forward the bundle.
FALSE = Do not forward the bundle.
Read-only property.
Process description. ProcessDescripti on
ProcessDirectory Directory in which the processes are saved.
ProcessId Process ID.
ProcessTitle
ProcessType
ModusProcess
Process title.
Process type.
Provides the following properties and functions.
Possible properties Description
ObjectName Name of the process.
SystemOId
Functions
Cancel
Cancels the process.
ID of the system in which the process runs.
Cancel
SYNTAX Cancel()
EXAMPLE
ModusProcess.Cancel()
GetComponent
Enables access to the properties and methods of components.
296
GetComponent
SYNTAX GetComponent(string componentName)
ARGUMENT
S componentName Name of the component
EXAMPLE
DocumentCollection =
ModusProcess.GetComponent("DocumentCollectionMana ger")
SendInfoMessage
Sends an information message to logged on remote control clients. A time stamp is inserted before each message.
SendInfoMessage
SYNTAX SendInfoMessage(string message)
ARGUMENTS
EXAMPLE message The information message you want to send.
ModusProcess.SendInfoMessage("This is the message")
Stop
Ends running processes.
Stop
SYNTAX Stop()
EXAMPLE
ModusProcess.Stop()
Functions of the Context MwsProcess
GetActivityStatus
Returns properties and functions for accessing an MWSActivity.
GetActivityStatus
SYNTAX GetActivityStatus(statusName)
ARGUMENT
S statusName Name of the MWSActivityStatus
RETURN
IsReady TRUE = Activity is ready to run.
FALSE = Activity is not ready to run.
IsBusy
IsFinished
IsConfigured
InformationXML
SetLastError(int errorCode, string errorMessage)
EnforceConfiguration(string
TRUE = Activity is busy.
FALSE = Activity is not busy.
TRUE = Activity is finished.
FALSE= Activity is not finished.
TRUE = Activity is configured.
FALSE = Activity is not configured.
Information to exchange with the client.
Sets an error for the activity with an error message and error number.
Forces the process to halt execution because
297
EXAMPLE informationXml) additional configuration data is required.
EnforceConfiguration(string informationXml, string infoType)
Forces the process to halt execution because additional configuration data is required.
The processing is returned to the client or the caller with the specified information.
The information type returned is defined as
MWS type in the XML.
DocumentCollection =
ModusProcess.GetComponent("DocumentCollection")
ForwardActivity = GetActivityStatus("FORWARD") if (ForwardActivity.IsFinished)
Exit() end-if if (ForwardActivity.IsConfigured = false)
if((DocumentCollection.IsBlocked = true) and (ProcessBlocked = true))
ForwardActivity.EnforceConfiguration(GetForwardInformation()
, "FORWARD")
Exit()
end-if end-if
ForwardActivity.IsFinished = true
GetForwardInformation
Returns forwarding information.
GetForwardInformation
SYNTAX GetForwardInformation()
RETURN XML string with DestUser and DestUserGroup.
GetObjectSelectionParameters
Returns selection parameters.
GetObjectSelectionParameters
SYNTAX GetObjectSelectionParameters(systemOId, folder, filter)
ARGUMENTS systemOId Object ID of the system. folder filter
Subdirectory of the system.
Object type filter. Currently only "P" for bundles is possible.
RETURN Selection parameter as XML string.
GetOptions
Returns the options for the given OptionsID.
298
GetOptions
SYNTAX
ARGUMENTS
RETURN
GetOptions(optionsId) optionsId Options ID.
Options of the options ID, if found.
IsInformationRequested
Checks whether information has been requested of the information ID that has been passed on.
IsInformationRequested
SYNTAX GetSectionNames(informationId)
ARGUMENTS informationId Information ID.
RETURN TRUE = Information has been requested.
FALSE = Information has not been requested.
SetObjectSelectionParameters
Sets selection parameters.
SetObjectSelectionParameters
SYNTAX SetObjectSelectionParameters(xmlOptions)
ARGUMENTS xmlOptions XML options
299
Context OdinArchive
About the context OdinArchive
Use this context in archiving scripts.
Properties of the context OdinArchive
Parameter Description
CurrentEnvelope Current envelope, if found.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
GetValue(string columnName) columnName Column name
RETURN Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
300
CurrentJob
CurrentStack
Current job, if found.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
GetValue(string columnName) columnName Column name
RETURN Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Current stack.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX GetValue(string columnName)
301
ARGUMENTS
RETURN columnName Column name
Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Functions of the Context OdinArchive
HasData
Checks whether data exists for the given type.
HasData
SYNTAX
ARGUMENTS
RETURN
HasData(OdinDataRowType dataType) dataType
Possible values
OdinDataRowType.Process
OdinDataRowType.Stack
OdinDataRowType.Envelope
OdinDataRowType.Job
OdinDataRowType.VirtualJob
TRUE = The data row specified exists.
FALSE = The data row specified does not exist.
302
303
Context OdinConvert
About the context OdinConvert
Use this context in conversion scripts.
Properties of the context OdinConvert
Property Description
ConvertDocument TRUE = Convert and add the document to the output file.
FALSE = Do not convert and add the document to the output file.
ConvertDocument is only evaluated after the OnDocumentConvert event.
CurrentDocument Current document, if found.
Read-only property.
Functions
GetDocumentFileName
Returns the name of the original document.
GetDocumentFileName
SYNTAX GetDocumentFileName()
RETURN File name
GetDuplex
Returns the duplex mode for this document.
GetDuplex
SYNTAX GetDuplex()
RETURN Enumerator with the following functions:
Method
OdinDuplexSetting.Simplex
OdinDuplexSetting.Horizontal
OdinDuplexSetting.Vertical
Description
No duplex
Duplex on the short edge
Duplex on the long edge
GetFileName
Returns the rendition file name of the document.
GetFileName
SYNTAX GetFileName()
RETURN Rendition file name
GetFirstInputBin
Returns the tray for the first page of the document.
GetFirstInputBin
SYNTAX GetFirstInputBin()
RETURN Name of the tray.
GetId
Returns the ID of the document. For example, job ID, StackCoverPage or
304
305
EnvelopeCoverPage.
GetId
SYNTAX GetId()
RETURN Document Id
GetNextInputBin
Returns the follow on tray for the 2-n pages of a document.
GetNextInputBin
SYNTAX GetNextInputBin()
RETURN NextInputBin
GetPageCount
Returns the number of pages.
GetPageCount
SYNTAX GetPageCount()
RETURN Number of pages.
IsPortrait
Returns the portrait mode.
IsPortrait
SYNTAX
ARGUMENTS
IsPortrait(int pageNumber) pageNumber Page number
RETURN TRUE = Portrait
FALSE = Landscape
SetDuplex
Specifies the duplex mode for this document.
SetDuplex
SYNTAX
ARGUMENTS
SetDuplex(duplexMode) duplexMode Duplex mode.
Possible values
OdinDuplexSetting.Simplex = No duplex
OdinDuplexSetting.Horizontal = Duplex on the short edge
OdinDuplexSetting.Vertical = Duplex on the long edge
SetFirstInputBin
Sets the tray for the first page of the document.
SetFirstInputBin
SYNTAX SetFirstInputBin(string inputBin)
ARGUMENTS inputBin Tray
SetNextInputBin
HasDocument
CurrentEnvelope
Set the follow on tray for the 2-n pages of a document.
SetNextInputBin
SYNTAX SetNextInputBin(string inputBin)
ARGUMENTS inputBin Tray
TRUE = A document is available.
FALSE = No document is available.
Read-only property.
Current envelope, if found.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
GetValue(string columnName) columnName Column name
RETURN Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss ", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
306
CurrentJob
CurrentStack
Current job, if found.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
GetValue(string columnName) columnName Column name
RETURN Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss ", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Current stack.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX GetValue(string columnName)
307
ARGUMENTS
RETURN columnName Column name
Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss ", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Functions of the Context OdinConvert
HasData
Checks whether data exists for the given type.
HasData
SYNTAX
ARGUMENTS
RETURN
HasData(OdinDataRowType dataType) dataType
Possible values
OdinDataRowType.Process
OdinDataRowType.Stack
OdinDataRowType.Envelope
OdinDataRowType.Job
OdinDataRowType.VirtualJob
TRUE = The data row specified exists.
FALSE = The data row specified does not exist.
308
309
Context OdinCustomProcess
About the context OdinCustomProcess
Use this context in stack processing scripts.
Properties of the context OdinCustomProcess
Parameter Description
CurrentEnvelope Current envelope, if found.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
GetValue(string columnName) columnName Column name
RETURN Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
310
CurrentJob
CurrentStack
Current job, if found.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
GetValue(string columnName) columnName Column name
RETURN Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Current stack.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX GetValue(string columnName)
311
ARGUMENTS
RETURN columnName Column name
Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Functions of the Context OdinCustomProcess
HasData
Checks whether data exists for the given type.
HasData
SYNTAX
ARGUMENTS
RETURN
HasData(OdinDataRowType dataType) dataType
Possible values
OdinDataRowType.Process
OdinDataRowType.Stack
OdinDataRowType.Envelope
OdinDataRowType.Job
OdinDataRowType.VirtualJob
TRUE = The data row specified exists.
FALSE = The data row specified does not exist.
312
313
Context OdinDbTask
About the context OdinDbTask
Use this context to access CurrentStack / CurrentEnvelope / CurrentJob data in OnDeleteJob /
OnDeleteStack events of the OdinDbTasks component.
Properties of the context OdinDbTask
Object Description
CurrentEnvelope Current envelope, if found.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
RETURN
GetValue(string columnName) columnName Column name
Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first
314
CurrentJob
CurrentStack element.
Current job, if found.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
GetValue(string columnName) columnName Column name
RETURN Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Current stack.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
315
SYNTAX
ARGUMENTS
RETURN
GetValue(string columnName) columnName Column name
Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Functions of the Context OdinDbTask
HasData
Checks whether data exists for the given type.
HasData
SYNTAX
ARGUMENTS
RETURN
HasData(OdinDataRowType dataType) dataType
Possible values
OdinDataRowType.Process
OdinDataRowType.Stack
OdinDataRowType.Envelope
OdinDataRowType.Job
OdinDataRowType.VirtualJob
TRUE = The data row specified exists.
316
FALSE = The data row specified does not exist.
317
Context OdinEmail
About the context OdinEmail
Use this context in scripts that send emails. The context provides scripts with the Email object that you can use to define the properties of the email.
The email properties of the SMTP host, already defined in the email printer, automatically set for the
Email object.
The recipient (MailTo) is retrieved from the field ODJ_EMAIL_TO of the Odin job. The email printer automatically calls the function Send().
To send an email, you must set the following properties in the script.
MailFrom
MailTo
MailSubject
BodyText or BodyHtml
Properties of the context OdinEmail
Property
SmtpHost
SmtpPort
SmtpUserName
SmtpPassword
SmtpDomain
UseDefaultCredentials
OdinSmtpDeliveryMethod
Description
Host on which the SMTP server runs.
Port of the SMTP server.
User name for SMTP server authentication.
Encoded password to authenticate to the SMTP server.
Note To encode the password, use the tool Encoder.exe in the installation directory.
Domain or computer where login information is verified.
TRUE = Authenticate to SMTP server using the logged on user.
FALSE = Authenticate to SMTP server using SmptUserName and SmtpPassword.
Specifies how emails will be sent.
Possible properties
OdinSmtpDeliveryMethod.Network
Description
Emails are sent through the configured SMTP server.
The following properties require a value.
SmtpHost
SmtpPort
SmtpUserName
SmtpPassword
Emails are copied to the directory specified in the
SmtpPickupDirectory property and must be sent by
OdinSmtpDeliveryMethod.SpecifiedPickupDirectory an external program.
The following property requires a value.
SmtpPickupDirectory
OdinSmtpDeliveryMethod.PickupDirectoryFromIis Emails are copied to the
318
OdinDeliveryNotificationOptio ns
OdinMailPriority
IsBodyHtml
MailEncoding
775
850
852
855
857 directory configured in the
Internet Information Server
(IIS).
437
500
708
720
737
Defines the notification options for Emails.
Possible properties
OdinDeliveryNotificationOptions.Network
Description
Emails are sent through the configured SMTP server.
OdinDeliveryNotificationOptions.None No notification
OdinDeliveryNotificationOptions.OnSuccess Notification on successful delivery
OdinDeliveryNotificationOptions.OnFailure Notification on unsuccessful delivery
OdinDeliveryNotificationOptions.Delay Notification on delayed delivery.
OdinDeliveryNotificationOptions.Never No notification whatsoever
Email priority
Possible properties Description
OdinMailPriority.Normal The email has normal priority.
OdinMailPriority.Low
OdinMailPriority.High
The email has low priority.
The email has high priority.
Defines whether the email body text is in HTML format.
TRUE = BodyHtml is used as HTML text, BodyText as alternative plain text.
FALSE = Only the BodyText is used as plain text.
You can use the following values as encoding parameters.
Empty string. In this case, the default encoding (ANSI code page of the operating system) is used.
Code page, for example, "1252"
Name, for example, "windows-1252"
Friendly name, for example, "Western European" (Windows)
Possible encoding parameters
Code page Name
37 IBM037
Friendly name
IBM EBCDIC (USA-Canada)
IBM437
IBM500
ASMO-708
DOS-720 ibm737
OEM USA
IBM EBCDIC (International)
Arabic (ASMO 708)
Arabic (DOS)
Greek (DOS) ibm775 ibm850 ibm852
IBM855 ibm857
Baltic (DOS)
Western European (DOS)
Eastern European (DOS)
OEM Cyrillic
Turkish (DOS)
319
320
IBM01143
IBM01144
IBM01145
IBM01146
IBM01147
IBM01148
IBM01149 utf-16 unicodeFFFE windows-1250 windows-1251
Windows-1252 windows-1253
IBM00858
IBM860 ibm861
DOS-862
IBM863
IBM864
IBM865 cp866 ibm869
IBM870 windows-874 cp875 shift_jis gb2312 ks_c_5601-1987 big5
IBM1026
IBM01047
IBM01140
IBM01141
IBM01142
1143
1144
1145
1146
1147
1148
1149
1200
1201
1250
1251
1252
1253
870
874
875
932
936
949
950
1026
1047
1140
1141
1142
858
860
861
862
863
864
865
866
869
OEM Multilingual Latin I
Portuguese (DOS)
Icelandic (DOS)
Hebrew (DOS)
French, Canada (DOS)
Arabic (864)
Nordic (DOS)
Cyrillic (DOS)
Greek, modern (DOS)
IBM EBCDIC (Multilingual Latin-2)
Thai (Windows)
IBM EBCDIC (Greek, modern)
Japanese (Shift-JIS)
Simplified Chinese (GB2312)
Korean
Chinese (Traditional) (Big5)
IBM EBCDIC (Turkish, Latin-5)
IBM Latin-1
IBM EBCDIC (USA-Canada-European)
IBM EBCDIC (Germany-European)
IBM EBCDIC (Denmark-Norway-
European)
IBM EBCDIC (Finland-Sweden-
European)
IBM EBCDIC (Italian-European)
IBM EBCDIC (Spain-European)
IBM EBCDIC (Great Britain-European)
IBM EBCDIC (France-European)
IBM EBCDIC (International-European)
IBM EBCDIC (Icelandic-European)
Unicode
Unicode (Big Endian)
Central European (Windows)
Cyrillic (Windows)
Western European (Windows)
Greek (Windows)
321
10017
10021
10029
10079
10081
10082
10003
10004
10005
10006
10007
10008
10010
1254
1255
1256
1257
1258
1361
10000
10001
10002
20005
20105
20106
20107
20108
20127
12000
12001
20000
20001
20002
20003
20004 windows-1254 windows-1255 windows-1256 windows-1257 windows-1258
Johab macintosh x-mac-japanese x-mac-chinesetrad x-mac-korean x mac-arabic x-mac-hebrew x-mac-greek x-mac-cyrillic x-mac-chinesesimp x-mac-romanian x-mac-ukrainian x-mac-thai x-mac-ce x-mac-icelandic x-mac-turkish x-mac-croatian utf-32 utf-32BE x-Chinese-CNS x-cp20001 x-Chinese-Eten x-cp20003 x-cp20004 x-cp20005 x-IA5 x-IA5-German x-IA5-Swedish x-IA5-Norwegian us-ascii
Turkish (Windows)
Hebrew (Windows)
Arabic (Windows)
Baltic (Windows)
Vietnamese (Windows)
Korean (Johab)
Western European (Mac)
Japanese (Mac)
Chinese traditional (Mac)
Korean (Mac)
Arabic (Mac)
Hebrew (Mac)
Greek (Mac)
Cyrillic (Mac)
Chinese simplified (Mac)
Romanian (Mac)
Ukrainian (Mac)
Thai (Mac)
Central European (Mac)
Icelandic (Mac)
Turkish (Mac)
Croatian (Mac)
Unicode (UTF-32)
Unicode (UTF-32-Big Endian)
Chinese traditional (CNS)
TCA Taiwan
Chinese traditional (Eten)
IBM5550 Taiwan
TeleText Taiwan
Wang Taiwan
Western European (IA5)
German (IA5)
Swedish (IA5)
Norwegian (IA5)
US-ASCII
322
20261
20269
20273
20277
20278
20280
20284
20285
20290
20297
20420
20423
20424
20833
20838
20866
20871
20880
20905
20924
20932
20936
20949
21025
21866
28591
28592
28593
28594
28595
28596
28597
28598
28599 x-cp20936 x-cp20949 cp1025 koi8-u iso-8859-1 iso-8859-2 iso-8859-3 iso-8859-4 iso-8859-5 iso-8859-6 iso-8859-7 iso-8859-8 iso-8859-9 x-cp20261 x-cp20269
IBM273
IBM277
IBM278
IBM280
IBM284
IBM285
IBM290
IBM297
IBM420
IBM423
IBM424 x-EBCDIC-
KoreanExtended
IBM-Thai koi8-r
IBM871
IBM880
IBM905
IBM00924
EUC-JP
T.61
ISO-6937
IBM EBCDIC (Germany)
IBM EBCDIC (Denmark-Norway)
IBM EBCDIC (Finland-Sweden)
IBM EBCDIC (Italy)
IBM EBCDIC (Spain)
IBM EBCDIC (Great Britain)
IBM EBCDIC (Japanese Katakana)
IBM EBCDIC (France)
IBM EBCDIC (Arabic)
IBM EBCDIC (Greek)
IBM EBCDIC (Hebrew)
IBM EBCDIC (Korean, extended)
IBM EBCDIC (Thai)
Cyrillic (KOI8-R)
IBM EBCDIC (Icelandic)
IBM EBCDIC (Cyrillic, Russian)
IBM EBCDIC (Turkish)
IBM Latin-1
Japanese (JIS 0208-1990 and 0212-
1990)
GB2312-80 Chinese (simple)
Korean Wansung
IBM EBCDIC (Cyrillic, Serbian-Bulgarian)
Cyrillic (KOI8-U)
Western European (ISO)
Central European (ISO)
Latin 3 (ISO)
Baltic (ISO)
Cyrillic (ISO)
Arabic (ISO)
Greek (ISO)
Hebrew (ISO-Visual)
Turkish (ISO)
MailEncodingCodepage
MailSubject
BodyText
BodyHtml
BodyHtmlImages
SmtpPickupDirectory
MailFrom
MailTo
323
28603
28605
29001
38598
50220
50221
50222
57007
57008
57009
57010
57011
65000
65001
50225
50227
51932
51936
51949
52936
54936
57002
57003
57004
57005
57006 iso-8859-13 iso-8859-15 x-Europa iso-8859-8-i iso-2022-jp csISO2022JP iso-2022-jp iso-2022-kr x-cp50227 euc-jp
EUC-CN euc-kr hz-gb-2312
GB18030 x-iscii-de x-iscii-be x-iscii-ta x-iscii-te x-iscii as x-iscii-or x-iscii-ka x-iscii-ma x-iscii-gu x-iscii-pa utf-7 utf-8
Estonian (ISO)
Latin 9 (ISO)
Europe
Hebrew (ISO-Logical)
Japanese (JIS)
Japanese (JIS, 1 Byte Kana allowed)
Japanese (JIS, 1 Byte Kana allowed -
SO/SI)
Korean (ISO)
ISO-2022 Chinese (simplified)
Japanese (EUC)
Chinese simplified (EUC)
Korean (EUC)
Chinese simplified (HZ)
GB18030 Chinese simplified
ISCII Devanagari
ISCII Bengali
ISCII Tamil
ISCII Telugu
ISCII Assamese
ISCII Oriya
ISCII Kannada
ISCII Malayalam
ISCII Gujarati
ISCII Punjabi
Unicode (UTF-7)
Unicode (UTF-8)
Encoding or code page for the email.
Email Subject
Sets or gets the email text in plain text.
Sets or gets the email text in HTML format.
Returns or sets the comma separated string of BodyHtmlImages.
Returns or sets the directory to which emails are saved, if
SmtpDeliveryMethod.SpecifiedPickupDirectory is set.
Returns or sets the email sender.
Returns or sets the email CC recipient (comma separated).
MailCC
MailBcc
MailReplyTo
AttachmentCount
Returns or sets the email CC recipient (comma separated).
Returns or sets the email Bcc recipient (comma separated).
Returns or sets the ReplyTo address for email.
Returns the number of email attachments.
Notes
Specify email addresses in the following format.
"DisplayName" <email@domain>
Specify comma separated email addresses in the following format.
"DisplayName" <email@domain>,<email@domain>,email@domain
Example
"displayName-1" <[email protected]>,"displayName-N" <[email protected]>,<email-
[email protected]>,[email protected]
In string list format: DisplayName=email address or just email address (without DisplayName)
Example [email protected],[email protected]
[email protected],email@test,[email protected]
Functions of the Context OdinEmail
AddAttachment
Adds an attachment to an email.
AddAttachment
SYNTAX AddAttachment(string fileName)
ARGUMENTS filename Name of the attachment file.
EXAMPLE email.AddAttachment("c:\temp\test.pdf")
AddBodyHtmlImage
Adds an image to the HTML body.
AddBodyHtmlImage
SYNTAX AddBodyHtmlImage(string id, string imageFileName)
ARGUMENTS id ID of the image (cid). If no ID is specified, the file name without its extension is used.
EXAMPLE imageFileName File name of the image. email.AddBodyHtmlImage("", "c:\temp\no-fear.jpg")
AddToHeader
324
Adds a name and value entry to an email header.
AddToHeader
SYNTAX AddToHeader(string name, string value)
ARGUMENTS name Name of the entry.
If the entry already exists, its value is overwritten. Otherwise, a new entry is created.
EXAMPLE value Entry value.
Email.AddToHeader("Organization", "Perceptive Software")
ClearAttachments
Deletes all loaded attachments.
ClearAttachments
SYNTAX ClearAttachments()
EXAMPLE
ClearAttachments()
ClearBodyHtmlImages
Deletes all images loaded in the HTML body.
ClearBodyHtmlImages
SYNTAX ClearBodyHtmlImages()
EXAMPLE
ClearBodyHtmlImages()
ClearCertificates
Deletes all loaded or defined certificates.
ClearCertificates
SYNTAX ClearCertificates()
GetAttachments
Returns a comma separated string containing the file names of all attachments.
GetAttachments
SYNTAX GetAttachments()
LoadBodyFromFile
Loads a body text from a file.
LoadBodyFromFile
325
SYNTAX
ARGUMENTS
LoadBodyFromFile(fileName, isHtml) fileName File name, isHtml TRUE = Is HTML
FALSE = Is not HTML
LoadCertificateFromCertFile
Loads the X.509 certificate from the specified file to send the email.
LoadCertificateFromCertFile
SYNTAX LoadCertificateFromCertFile(fileName)
ARGUMENTS fileName File name.
LoadCertificateFromSignedFile
Loads the X.509 certificate from the specified file to send the email.
LoadCertifacteFromSignedFile
SYNTAX LoadCertifacteFromSignedFile(fileName)
ARGUMENTS fileName File name.
RemoveAttachment
Removes an attachment from an email.
RemoveAttachment
SYNTAX RemoveAttachment(fileName)
ARGUMENTS fileName Name of the file to remove from the attachments.
RemoveFromHeader
Removes an entry from an email header.
RemoveFromHeader
SYNTAX RemoveFromHeader(name)
ARGUMENTS
EXAMPLE name Name of the entry to remove.
Email.RemoveFromHeader("Organisation")
Send
Send the email with the current settings.
Send
326
SYNTAX Send()
SetCredentials
Sets the user credentials user name, password, and domain.
SetCredentials
SYNTAX SetCredentials(userName, password, domain)
ARGUMENTS userName User name password domain
Encoded password
Note To encode the password, use the tool Encoder.exe in the installation directory.
Domain
RETURN TRUE = Attribute value is set.
FALSE = Attribute value could not be set.
SetSmtpServer
Sets the SMTP server properties host, port, and useDefaultCredentials.
SetSmtpServer
SYNTAX SetSmtpServer(host, port, useDefaultCredentials)
ARGUMENTS host Host on which the SMTP server runs port Port of the SMTP server useDefaultCredentials TRUE = Authenticate to SMTP server using the logged on user.
FALSE = Authenticate to SMTP server using SmptUserName and
SmtpPassword.
Sample script OdinEmail
; Define email settings such as sender or priority.
Email.MailFrom = """info"" <[email protected]>"
Email.MailPriority = OdinMailPriority.High
;
; Was a document converted to body text? if ((Email.BodyHtml = "") or (Email.BodyText = ""))
; No, then set the body text as plain text
Email.BodyText = "this is the body text!!"
Email.IsBodyHtml = false
; end-if
;
; Was a document converted to the subject? if (Email.MailSubject = "")
; No, so set a subject
327
Email.MailSubject = "subject line" end-if
328
Context OdinEmailConvert
Properties of the context OdinEmailConvert
Property
ConvertOptions
Description
Comma separated string containing the metadata and options used during conversion.
You can also set these options in the OnConvertStart event to use, for example, the stack data to define the metadata.
Metadata
TITLE Document title.
SUBJECT Document subject.
AUTHOR Document author.
KEYWORDS Document keywords.
Options
PDF 1.3/1.4
TRUE = PDF security attributes for Document Assembly, Page
TEXTNOTE_CHANGES
Extraction, Comment, Sign and Create Template are set to True.
FALSE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to False.
CHANGES
FILL
PDF 1.3/1.4
TRUE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to True.
FALSE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to False.
PDF 1.4
TRUE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to True.
FALSE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to False.
COPY
DIGITAL_COPY
ASSEMBLE
PDF 1.4
TRUE = PDF security attributes for Document Assembly, Copy
Content, Copy Content for Accessibility, Page Extraction,
Comment, Sign and Create Template are set to True.
FALSE = PDF security attributes for Document Assembly, Copy
Content, Copy Content for Accessibility, Page Extraction,
Comment, Sign and Create Template are set to False.
PDF 1.4
TRUE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to True.
FALSE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to False.
PDF 1.4
TRUE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to True.
FALSE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to False.
329
330
ACCESSIBILITY
DUPLEX_ADDPAGE
DUPLEX_OPTIMIZE
MAP_COLOR
Assembling more than one document is not allowed.
PDF 1.4
TRUE = PDF security attributes for Copy Content, Copy Content for
Accessibility, Page Extraction are set to True.
FALSE = PDF security attributes for Copy Content, Copy Content for Accessibility, Page Extraction are set to False.
TRUE = This option specifies whether an empty page should be added to a duplex document with an odd number of pages.
FALSE = Default setting. This option sets simplex mode for the last page of a duplex document with an odd number of pages.
TRUE = Duplex settings are only set in the output stream, when duplex mode changes.
FALSE = Duplex settings are set in the output stream.
TRUE/FALSE
This parameter is used to define whether color mapping for the
AFP-HighlightColor Definition is executed or not. The individual color definitions can be specified as MapColor_1 to MapColor_n.
Example:
Map_Color=TRUE,"MapColor_1=-
1,20,black","MapColor_2=0,20,red"
Note As MapColor parameters contain comma separated values themselves, the complete string must be enclosed in quotation marks.
The structure is as follows:
MapColor_???= HSB-Color,Threshold,ColorName
HSB-Color=HSB Color Angle
Threshold= Threshold value of the HSB color
ColorName= Name of the color as defined in the AFP profile under
HighlightColorList.
The example above requires the following definitions in the AFP profile:
</highlightcolorlist>
<highlightcolor name='red' type='OCA' number='0x0002' foreground-rgb="#00FF0000" />
<highlightcolor name='black' type='OCA' number='0x0008' foreground-rgb="#00000000" />
</highlightcolorlist> and
<optimizepa value="never"/>
<color value="FALSE" />
<usehighlightcolor value="TRUE" />
<enablebilevelimage value="TRUE" />
SHOW_BOOKMARKS
TRUE = Bookmarks show in the opened PDF.
FALSE = Bookmarks do not show in the opened PDF.
OVERLAYS
MERGEFONTS
TRUE = OVERLAYS are created.
FALSE = Default. OVERLAYS are not created.
TRUE: Default
FALSE
TRUE = Default, PCL output optimization is activated.
FALSE = PCL output optimization is deactivated.
MERGE_SPLITWORDS
This option should be set to FALSE if you have character spacing problems in a generated PCL.
The default value is TRUE.
TRUE = If page orientation is landscape, the page rotates by 90°.
ROTATE_LANDSCAPE FALSE = The page does not rotate.
The default value is TRUE.
CurrentDocument Returns the current document (IOdinStreamDocument interface) to be converted.
Functions of the IOdinStreamDocument-Interface
InputBinName
InputBinType
Returns the name of the tray currently used to convert or print the document.
Type of tray currently used to convert the document. Corresponds to the BinType property of the email tray.
Possible values
OdinEmailPrinterBinType.Attachment
Description
The document is converted to the corresponding output format, for example PDF, and then added to the email as a separate attachment.
OdinEmailPrinterBinType.AttachmentCollect All documents are converted to a single attachment file in the corresponding output format.
OdinEmailPrinterBinType.Body The document is converted to text or
HTML format and used as the body text of the email.
OdinEmailPrinterBinType.Subject Enables a single line document to be converted to an individual reference
331
OutputFileName text of the email.
The document is converted to text format and used as the subject text.
Returns or sets the name of the attachment.
The default file name of the converted document is the job ID with an extension corresponding to the output format defined for the tray.
It is possible to alter the name, but any path specifications and extensions are ignored.
Functions of the Context OdinEmailConvert
SetPdfSigner
The OnConvert event of an email printer is called for every document to convert.
The SetPdfSigner() function of the OdinEmailConvert context can pass an initialized PDF signer object that can be used to sign a document when the output format is PDF.
If a password is set in the ConvertOptions, the PDF signer object must be initialized with the password.
Otherwise, access to the PDF is not allowed.
SetPdfSigner
SYNTAX SetPdfSigner(pdfSigner)
ARGUMENTS pdfSigner The initialized PDF-signer object created by the OdinFileConvert component.
For more information, refer to CreatePdfSigner.
Functions of IOdinStreamDocument Interface
AddBookmark
Adds a bookmark to a document. If the output format is PDF, a bookmark is created for every bookmark defined. The IDs must be unique for each bookmark.
AddBookmark
SYNTAX
AddBookmark(string id, string parentId, string title)
AddBookmark(string id, string parentId, string title, double x, double y)
ARGUMENTS id Bookmark ID
EXAMPLE parentId An empty string here means the bookmark is inserted at the highest level.
Otherwise, the bookmark is inserted as a child of the bookmark specified. title x
Text for the bookmark.
X-position on the page. y Y-position on the page. document.AddBookmark("doc1_page1", "doc1", "Page 1") document.AddBookmark("doc1_page2", "doc1", "Page 2", 0, 0)
EditPage
EditPage sets the given page to edit mode so that character commands can be executed on the page.
332
EditPage
SYNTAX
ARGUMENTS
EditPage(pageNumber) pageNumber Number of the page to be processed, beginning with 0.
GetInputBin
Returns the input bin of a page. If the input bin is not set, it returns the tray for the first page or for the subsequent tray, depending on the page number.
GetInputBin
SYNTAX GetInputBin(pageNumber)
ARGUMENTS pageNumber Page number.
RETURN Input bin.
Image
Inserts an image file.
HasObjectPermission
SYNTAX Image(x, y, fileName)
Image(x, y, imageFileName, layer)
ARGUMENTS x X-position. y Y-position. filename File name. layer
Possible Values
OdinPageLayer.Foreground = Drawing is done on top of the original document.
OdinPageLayer.Background = Drawing is done behind the original document.
RETURN TRUE = The user has the corresponding object rights.
FALSE = The user does not have the corresponding object rights.
IsDuplex
Returns the duplex mode.
IsDuplex
SYNTAX IsDuplex()
RETURN TRUE = Duplex
FALSE = Simplex
IsPortrait
Returns the portrait mode.
IsPortrait
333
SYNTAX
ARGUMENTS
RETURN
IsPortrait(pageNumber) pageNumber Page number.
TRUE = Portrait
FALSE = Landscape
Line
Draws a line on the current page.
Line
SYNTAX
ARGUMENTS
Line(x1, y1, x2, y2)
Line(x1, y1, x2, y2, lineWidth, lineStyle, color)
Line(x1, y1, x2, y2, lineWidth, lineStyle, color, layer) x1 y1 x2 y2
X-position of the starting position of the line.
Y-position of the starting position of the line.
X-position of the end position of the line.
Y-position of the end position of the line. lineWidth Line width. lineStyle
Possible values
OdinLineStyle.Solid
OdinLineStyle.Dashed
OdinLineStyle.Dotted color Color
Possible value
The HTML color name or the ARGB value in format #AARRGGBB
(AA=Alpha-Transparency, RR=Red, GG=Green, BB=Blue).
HTML color name ARGB value
AliceBlue #FFF0F8FF
AntiqueWhite
Aqua
Aquamarine
Azure
Beige
Bisque
Black
BlanchedAlmond
Blue
BlueViolet
Brown
BurlyWood
CadetBlue
#FFFAEBD7
#FF00FFFF
#FF7FFFD4
#FFF0FFFF
#FFF5F5DC
#FFFFE4C4
#FF000000
#FFFFEBCD
#FF0000FF
#FF8A2BE2
#FFA52A2A
#FFDEB887
#FF5F9EA0
334
335
#FFE9967A
#FF8FBC8B
#FF483D8B
#FF2F4F4F
#FF00CED1
#FF9400D3
#FFFF1493
#FF00BFFF
#FF696969
#FF1E90FF
#FFB22222
#FFFFFAF0
#FF228B22
#FFFF00FF
#FFDCDCDC
#FFF8F8FF
#FFFFD700
#FFDAA520
#FF808080
#FF008000
#FF7FFF00
#FFD2691E
#FFFF7F50
#FF6495ED
#FFFFF8DC
#FFDC143C
#FF00FFFF
#FF00008B
#FF008B8B
#FFB8860B
#FFA9A9A9
#FF006400
#FFBDB76B
#FF8B008B
#FF556B2F
#FFFF8C00
#FF9932CC
#FF8B0000
DarkSalmon
DarkSeaGreen
DarkSlateBlue
DarkSlateGray
DarkTurquoise
DarkViolet
DeepPink
DeepSkyBlue
DimGray
DodgerBlue
Firebrick
FloralWhite
ForestGreen
Fuchsia
Gainsboro
GhostWhite
Gold
Goldenrod
Gray
Green
Chartreuse
Chocolate
Coral
CornflowerBlue
Cornsilk
Crimson
Cyan
DarkBlue
DarkCyan
DarkGoldenrod
DarkGray
DarkGreen
DarkKhaki
DarkMagenta
DarkOliveGreen
DarkOrange
DarkOrchid
DarkRed
336
#FFFFA07A
#FF20B2AA
#FF87CEFA
#FF778899
#FFB0C4DE
#FFFFFFE0
#FF00FF00
#FF32CD32
#FFFAF0E6
#FFFF00FF
#FF800000
#FF66CDAA
#FF0000CD
#FFBA55D3
#FF9370DB
#FF3CB371
#FF7B68EE
#FF00FA9A
#FF48D1CC
#FFC71585
#FFADFF2F
#FFF0FFF0
#FFFF69B4
#FFCD5C5C
#FF4B0082
#FFFFFFF0
#FFF0E68C
#FFE6E6FA
#FFFFF0F5
#FF7CFC00
#FFFFFACD
#FFADD8E6
#FFF08080
#FFE0FFFF
#FFFAFAD2
#FFD3D3D3
#FF90EE90
#FFFFB6C1
LightSalmon
LightSeaGreen
LightSkyBlue
LightSlateGray
LightSteelBlue
LightYellow
Lime
LimeGreen
Linen
Magenta
Maroon
MediumAquamarine
MediumBlue
MediumOrchid
MediumPurple
MediumSeaGreen
MediumSlateBlue
MediumSpringGreen
MediumTurquoise
MediumVioletRed
GreenYellow
Honeydew
HotPink
IndianRed
Indigo
Ivory
Khaki
Lavender
LavenderBlush
LawnGreen
LemonChiffon
LightBlue
LightCoral
LightCyan
LightGoldenrodYellow
LightGray
LightGreen
LightPink
337
#FFCD853F
#FFFFC0CB
#FFB0E0E6
#FF800080
#FFFF0000
#FFBC8F8F
#FF4169E1
#FF8B4513
#FFFA8072
#FFF4A460
#FF2E8B57
#FFFFF5EE
#FFA0522D
#FFC0C0C0
#FF87CEEB
#FF6A5ACD
#FF708090
#FFFFFAFA
#FF00FF7F
#FF4682B4
#FF191970
#FFF5FFFA
#FFFFE4E1
#FFFFE4B5
#FFFFDEAD
#FF000080
#FFFDF5E6
#FF808000
#FF6B8E23
#FFFFA500
#FFFF4500
#FFDA70D6
#FFEEE8AA
#FF98FB98
#FFAFEEEE
#FFDB7093
#FFFFEFD5
#FFFFDAB9
Peru
Pink
Plum
Purple
Red
RosyBrown
RoyalBlue
SaddleBrown
Salmon
SandyBrown
SeaGreen
SeaShell
Sienna
Silver
SkyBlue
SlateBlue
SlateGray
Snow
SpringGreen
SteelBlue
MidnightBlue
MintCream
MistyRose
Moccasin
NavajoWhite
Navy
OldLace
Olive
OliveDrab
Orange
OrangeRed
Orchid
PaleGoldenrod
PaleGreen
PaleTurquoise
PaleVioletRed
PapayaWhip
PeachPuff
layer
Tan
Teal
Thistle
Tomato
Turquoise
Violet
Wheat
White
#FFD2B48C
#FF008080
#FFD8BFD8
#FFFF6347
#FF40E0D0
#FFEE82EE
#FFF5DEB3
#FFFFFFFF
WhiteSmoke
Yellow
#FFF5F5F5
#FFFFFF00
YellowGreen
Possible values
OdinPageLayer.Foreground
OdinPageLayer.Background
#FF9ACD32
Pagecount
Returns the number of pages of the current document.
PageCount
SYNTAX PageCount()
RETURN Number of pages
Post
Writes character commands in the document layer.
Post
SYNTAX Post()
Rectangle
Draws a rectangle on the current page.
Rectangle
SYNTAX
ARGUMENTS
Rectangle(x, y, witdh, height, fill, fillcolor)
Rectangle(x, y, width, height, lineWidth, lineStyle, lineColor, fill, fillColor)
Rectangle(x, y, width, height, lineWidth, lineStyle, lineColor, fill, fillColor, layer) x y
X-position of the top left corner of the rectangle.
Y-position of the top left corner of the rectangle.
If the string list is empty, all fields are read. The string list must exist.
338
339 width height fill fillColor
Width of the rectangle.
Height of the rectangle.
TRUE = The rectangle is filled.
FALSE = The rectangle is not filled.
The default value is FALSE.
Pad color.
Possible value
The HTML color name or the ARGB value in format #AARRGGBB
(AA=Alpha-Transparency, RR=Red, GG=Green, BB=Blue).
HTML color name ARGB value
AliceBlue #FFF0F8FF
AntiqueWhite
Aqua
Aquamarine
Azure
Beige
Bisque
Black
BlanchedAlmond
Blue
BlueViolet
Brown
BurlyWood
CadetBlue
Chartreuse
Chocolate
Coral
CornflowerBlue
Cornsilk
Crimson
Cyan
DarkBlue
DarkCyan
DarkGoldenrod
DarkGray
DarkGreen
DarkKhaki
DarkMagenta
DarkOliveGreen
DarkOrange
#FFFF7F50
#FF6495ED
#FFFFF8DC
#FFDC143C
#FF00FFFF
#FF00008B
#FF008B8B
#FFB8860B
#FFA9A9A9
#FF006400
#FFBDB76B
#FF8B008B
#FF556B2F
#FFFF8C00
#FFFAEBD7
#FF00FFFF
#FF7FFFD4
#FFF0FFFF
#FFF5F5DC
#FFFFE4C4
#FF000000
#FFFFEBCD
#FF0000FF
#FF8A2BE2
#FFA52A2A
#FFDEB887
#FF5F9EA0
#FF7FFF00
#FFD2691E
340
#FFFFD700
#FFDAA520
#FF808080
#FF008000
#FFADFF2F
#FFF0FFF0
#FFFF69B4
#FFCD5C5C
#FF4B0082
#FFFFFFF0
#FFF0E68C
#FFE6E6FA
#FFFFF0F5
#FF7CFC00
#FFFFFACD
#FFADD8E6
#FFF08080
#FFE0FFFF
#FFFAFAD2
#FFD3D3D3
#FF9932CC
#FF8B0000
#FFE9967A
#FF8FBC8B
#FF483D8B
#FF2F4F4F
#FF00CED1
#FF9400D3
#FFFF1493
#FF00BFFF
#FF696969
#FF1E90FF
#FFB22222
#FFFFFAF0
#FF228B22
#FFFF00FF
#FFDCDCDC
#FFF8F8FF
DarkOrchid
DarkRed
DarkSalmon
DarkSeaGreen
DarkSlateBlue
DarkSlateGray
DarkTurquoise
DarkViolet
DeepPink
DeepSkyBlue
DimGray
DodgerBlue
Firebrick
FloralWhite
ForestGreen
Fuchsia
Gainsboro
GhostWhite
Gold
Goldenrod
Gray
Green
GreenYellow
Honeydew
HotPink
IndianRed
Indigo
Ivory
Khaki
Lavender
LavenderBlush
LawnGreen
LemonChiffon
LightBlue
LightCoral
LightCyan
LightGoldenrodYellow
LightGray
341
#FF7B68EE
#FF00FA9A
#FF48D1CC
#FFC71585
#FF191970
#FFF5FFFA
#FFFFE4E1
#FFFFE4B5
#FFFFDEAD
#FF000080
#FFFDF5E6
#FF808000
#FF6B8E23
#FFFFA500
#FFFF4500
#FFDA70D6
#FFEEE8AA
#FF98FB98
#FFAFEEEE
#FFDB7093
#FF90EE90
#FFFFB6C1
#FFFFA07A
#FF20B2AA
#FF87CEFA
#FF778899
#FFB0C4DE
#FFFFFFE0
#FF00FF00
#FF32CD32
#FFFAF0E6
#FFFF00FF
#FF800000
#FF66CDAA
#FF0000CD
#FFBA55D3
#FF9370DB
#FF3CB371
MediumSlateBlue
MediumSpringGreen
MediumTurquoise
MediumVioletRed
MidnightBlue
MintCream
MistyRose
Moccasin
NavajoWhite
Navy
OldLace
Olive
OliveDrab
Orange
OrangeRed
Orchid
PaleGoldenrod
PaleGreen
PaleTurquoise
PaleVioletRed
LightGreen
LightPink
LightSalmon
LightSeaGreen
LightSkyBlue
LightSlateGray
LightSteelBlue
LightYellow
Lime
LimeGreen
Linen
Magenta
Maroon
MediumAquamarine
MediumBlue
MediumOrchid
MediumPurple
MediumSeaGreen
342
SlateGray
Snow
SpringGreen
SteelBlue
Tan
Teal
Thistle
Tomato
Turquoise
Violet
Wheat
White
WhiteSmoke
Yellow
YellowGreen lineWidth Line width. lineStyle Line style.
Possible values
OdinLineStyle.Solid
OdinLineStyle.Dashed
PapayaWhip
PeachPuff
Peru
Pink
Plum
Purple
Red
RosyBrown
RoyalBlue
SaddleBrown
Salmon
SandyBrown
SeaGreen
SeaShell
Sienna
Silver
SkyBlue
SlateBlue
#FF708090
#FFFFFAFA
#FF00FF7F
#FF4682B4
#FFD2B48C
#FF008080
#FFD8BFD8
#FFFF6347
#FF40E0D0
#FFEE82EE
#FFF5DEB3
#FFFFFFFF
#FFF5F5F5
#FFFFFF00
#FF9ACD32
#FFFFEFD5
#FFFFDAB9
#FFCD853F
#FFFFC0CB
#FFB0E0E6
#FF800080
#FFFF0000
#FFBC8F8F
#FF4169E1
#FF8B4513
#FFFA8072
#FFF4A460
#FF2E8B57
#FFFFF5EE
#FFA0522D
#FFC0C0C0
#FF87CEEB
#FF6A5ACD
343
OdinLineStyle.Dotted lineColor Line color.
Possible value is the HTML color name or the ARGB value in format
#AARRGGBB (AA=Alpha-Transparency, RR=Red, GG=Green,
BB=Blue).
HTML color name ARGB value
AliceBlue #FFF0F8FF
AntiqueWhite #FFFAEBD7
Aqua
Aquamarine
Azure
Beige
Bisque
Black
BlanchedAlmond
Blue
#FF00FFFF
#FF7FFFD4
#FFF0FFFF
#FFF5F5DC
#FFFFE4C4
#FF000000
#FFFFEBCD
#FF0000FF
BlueViolet
Brown
BurlyWood
CadetBlue
Chartreuse
Chocolate
Coral
CornflowerBlue
Cornsilk
Crimson
Cyan
DarkBlue
DarkCyan
DarkGoldenrod
DarkGray
DarkGreen
DarkKhaki
DarkMagenta
DarkOliveGreen
DarkOrange
DarkOrchid
DarkRed
DarkSalmon
#FF8A2BE2
#FFA52A2A
#FFDEB887
#FF5F9EA0
#FF7FFF00
#FFD2691E
#FFFF7F50
#FF6495ED
#FFFFF8DC
#FFDC143C
#FF00FFFF
#FF00008B
#FF008B8B
#FFB8860B
#FFA9A9A9
#FF006400
#FFBDB76B
#FF8B008B
#FF556B2F
#FFFF8C00
#FF9932CC
#FF8B0000
#FFE9967A
344
#FF008000
#FFADFF2F
#FFF0FFF0
#FFFF69B4
#FFCD5C5C
#FF4B0082
#FFFFFFF0
#FFF0E68C
#FFE6E6FA
#FFFFF0F5
#FF7CFC00
#FFFFFACD
#FFADD8E6
#FFF08080
#FFE0FFFF
#FFFAFAD2
#FFD3D3D3
#FF90EE90
#FFFFB6C1
#FFFFA07A
#FF8FBC8B
#FF483D8B
#FF2F4F4F
#FF00CED1
#FF9400D3
#FFFF1493
#FF00BFFF
#FF696969
#FF1E90FF
#FFB22222
#FFFFFAF0
#FF228B22
#FFFF00FF
#FFDCDCDC
#FFF8F8FF
#FFFFD700
#FFDAA520
#FF808080
DarkSeaGreen
DarkSlateBlue
DarkSlateGray
DarkTurquoise
DarkViolet
DeepPink
DeepSkyBlue
DimGray
DodgerBlue
Firebrick
FloralWhite
ForestGreen
Fuchsia
Gainsboro
GhostWhite
Gold
Goldenrod
Gray
Green
GreenYellow
Honeydew
HotPink
IndianRed
Indigo
Ivory
Khaki
Lavender
LavenderBlush
LawnGreen
LemonChiffon
LightBlue
LightCoral
LightCyan
LightGoldenrodYellow
LightGray
LightGreen
LightPink
LightSalmon
345
#FFC71585
#FF191970
#FFF5FFFA
#FFFFE4E1
#FFFFE4B5
#FFFFDEAD
#FF000080
#FFFDF5E6
#FF808000
#FF6B8E23
#FFFFA500
#FFFF4500
#FFDA70D6
#FFEEE8AA
#FF98FB98
#FFAFEEEE
#FFDB7093
#FFFFEFD5
#FFFFDAB9
#FFCD853F
#FF20B2AA
#FF87CEFA
#FF778899
#FFB0C4DE
#FFFFFFE0
#FF00FF00
#FF32CD32
#FFFAF0E6
#FFFF00FF
#FF800000
#FF66CDAA
#FF0000CD
#FFBA55D3
#FF9370DB
#FF3CB371
#FF7B68EE
#FF00FA9A
#FF48D1CC
MediumVioletRed
MidnightBlue
MintCream
MistyRose
Moccasin
NavajoWhite
Navy
OldLace
Olive
OliveDrab
Orange
OrangeRed
Orchid
PaleGoldenrod
PaleGreen
PaleTurquoise
PaleVioletRed
PapayaWhip
PeachPuff
Peru
LightSeaGreen
LightSkyBlue
LightSlateGray
LightSteelBlue
LightYellow
Lime
LimeGreen
Linen
Magenta
Maroon
MediumAquamarine
MediumBlue
MediumOrchid
MediumPurple
MediumSeaGreen
MediumSlateBlue
MediumSpringGreen
MediumTurquoise
layer
Pink
Plum
Purple
Red
RosyBrown
RoyalBlue
SaddleBrown
Salmon
SandyBrown
SeaGreen
SeaShell
Sienna
Silver
SkyBlue
SlateBlue
SlateGray
Snow
SpringGreen
#FFFFC0CB
#FFB0E0E6
#FF800080
#FFFF0000
#FFBC8F8F
#FF4169E1
#FF8B4513
#FFFA8072
#FFF4A460
#FF2E8B57
#FFFFF5EE
#FFA0522D
#FFC0C0C0
#FF87CEEB
#FF6A5ACD
#FF708090
#FFFFFAFA
#FF00FF7F
SteelBlue
Tan
Teal
Thistle
Tomato
Turquoise
Violet
Wheat
#FF4682B4
#FFD2B48C
#FF008080
#FFD8BFD8
#FFFF6347
#FF40E0D0
#FFEE82EE
#FFF5DEB3
White
WhiteSmoke
Yellow
#FFFFFFFF
#FFF5F5F5
#FFFFFF00
YellowGreen #FF9ACD32
Possible values
OdinPageLayer.Foreground = Drawing is done on top of the original document.
OdinPageLayer.Background = Drawing is done behind the original document.
SetFont
Defines the font specification for text output.
SetFont
346
SYNTAX
ARGUMENTS
SetFont(fontName, fontSize) fontName Name of the font, for example, Arial. fontSize Size of the font, for example, 10.
SetInputBin
Sets the input tray for a page. The function overwrites the predefined tray for the first page or for the follow-up. depending on the case.
SetInputBin
SYNTAX
ARGUMENTS
SetInputBin(pageNumber, binName) pageNumber Page number
EXAMPLE binName Name of the tray
;Set the input tray for the last page of the document streamDoc.SetInputBin(streamdoc.PageCount - 1, "testBin")
TextOut
Writes a text on the current page.
CreateGuid
SYNTAX
ARGUMENTS
TextOut(x, y, text, bold, italic)
TextOut(x, y, text, bold, italic, color, angle)
TextOut(x, y, text, bold, italic, color, angle, layer) x y text bold italic color
X-position of the starting point
Y-position of the starting point
Text to write
TRUE = Formatting bold
FALSE = Formatting not bold
The default value is FALSE
TRUE = Formatting italic
FALSE = Formatting not italic
The default value is FALSE
Color
Possible value
The HTML color name or the ARGB value in format #AARRGGBB
(AA=Alpha-Transparency, RR=Red, GG=Green, BB=Blue).
HTML color name ARGB value
AliceBlue #FFF0F8FF
AntiqueWhite #FFFAEBD7
Aqua
Aquamarine
Azure
#FF00FFFF
#FF7FFFD4
#FFF0FFFF
347
348
#FFB8860B
#FFA9A9A9
#FF006400
#FFBDB76B
#FF8B008B
#FF556B2F
#FFFF8C00
#FF9932CC
#FF8B0000
#FFE9967A
#FF8FBC8B
#FF483D8B
#FF2F4F4F
#FF00CED1
#FF9400D3
#FFFF1493
#FF00BFFF
#FF696969
#FF1E90FF
#FFB22222
#FFF5F5DC
#FFFFE4C4
#FF000000
#FFFFEBCD
#FF0000FF
#FF8A2BE2
#FFA52A2A
#FFDEB887
#FF5F9EA0
#FF7FFF00
#FFD2691E
#FFFF7F50
#FF6495ED
#FFFFF8DC
#FFDC143C
#FF00FFFF
#FF00008B
#FF008B8B
DarkGoldenrod
DarkGray
DarkGreen
DarkKhaki
DarkMagenta
DarkOliveGreen
DarkOrange
DarkOrchid
DarkRed
DarkSalmon
DarkSeaGreen
DarkSlateBlue
DarkSlateGray
DarkTurquoise
DarkViolet
DeepPink
DeepSkyBlue
DimGray
DodgerBlue
Firebrick
Beige
Bisque
Black
BlanchedAlmond
Blue
BlueViolet
Brown
BurlyWood
CadetBlue
Chartreuse
Chocolate
Coral
CornflowerBlue
Cornsilk
Crimson
Cyan
DarkBlue
DarkCyan
349
#FF7CFC00
#FFFFFACD
#FFADD8E6
#FFF08080
#FFE0FFFF
#FFFAFAD2
#FFD3D3D3
#FF90EE90
#FFFFB6C1
#FFFFA07A
#FF20B2AA
#FF87CEFA
#FF778899
#FFB0C4DE
#FFFFFFE0
#FF00FF00
#FF32CD32
#FFFAF0E6
#FFFF00FF
#FF800000
#FFFFFAF0
#FF228B22
#FFFF00FF
#FFDCDCDC
#FFF8F8FF
#FFFFD700
#FFDAA520
#FF808080
#FF008000
#FFADFF2F
#FFF0FFF0
#FFFF69B4
#FFCD5C5C
#FF4B0082
#FFFFFFF0
#FFF0E68C
#FFE6E6FA
#FFFFF0F5
FloralWhite
ForestGreen
Fuchsia
Gainsboro
GhostWhite
Gold
Goldenrod
Gray
Green
GreenYellow
Honeydew
HotPink
IndianRed
Indigo
Ivory
Khaki
Lavender
LavenderBlush
LawnGreen
LemonChiffon
LightBlue
LightCoral
LightCyan
LightGoldenrodYellow
LightGray
LightGreen
LightPink
LightSalmon
LightSeaGreen
LightSkyBlue
LightSlateGray
LightSteelBlue
LightYellow
Lime
LimeGreen
Linen
Magenta
Maroon
350
#FFFFA500
#FFFF4500
#FFDA70D6
#FFEEE8AA
#FF98FB98
#FFAFEEEE
#FFDB7093
#FFFFEFD5
#FFFFDAB9
#FFCD853F
#FFFFC0CB
#FFB0E0E6
#FF800080
#FFFF0000
#FFBC8F8F
#FF4169E1
#FF8B4513
#FFFA8072
#FFF4A460
#FF2E8B57
#FF66CDAA
#FF0000CD
#FFBA55D3
#FF9370DB
#FF3CB371
#FF7B68EE
#FF00FA9A
#FF48D1CC
#FFC71585
#FF191970
#FFF5FFFA
#FFFFE4E1
#FFFFE4B5
#FFFFDEAD
#FF000080
#FFFDF5E6
#FF808000
#FF6B8E23
Orange
OrangeRed
Orchid
PaleGoldenrod
PaleGreen
PaleTurquoise
PaleVioletRed
PapayaWhip
PeachPuff
Peru
Pink
Plum
Purple
Red
RosyBrown
RoyalBlue
SaddleBrown
Salmon
SandyBrown
SeaGreen
MediumAquamarine
MediumBlue
MediumOrchid
MediumPurple
MediumSeaGreen
MediumSlateBlue
MediumSpringGreen
MediumTurquoise
MediumVioletRed
MidnightBlue
MintCream
MistyRose
Moccasin
NavajoWhite
Navy
OldLace
Olive
OliveDrab
SeaShell
Sienna
Silver
SkyBlue
SlateBlue
SlateGray
Snow
SpringGreen
SteelBlue
Tan
Teal
Thistle
Tomato
Turquoise
Violet
Wheat
White
WhiteSmoke
#FFFFF5EE
#FFA0522D
#FFC0C0C0
#FF87CEEB
#FF6A5ACD
#FF708090
#FFFFFAFA
#FF00FF7F
#FF4682B4
#FFD2B48C
#FF008080
#FFD8BFD8
#FFFF6347
#FF40E0D0
#FFEE82EE
#FFF5DEB3
#FFFFFFFF
#FFF5F5F5
Yellow
YellowGreen angle Angle of rotation layer
#FFFFFF00
#FF9ACD32
Possible values
OdinPageLayer.Foreground = Drawing is done on top of the original document.
OdinPageLayer.Background = Drawing is done behind the original document.
351
Context OdinFilter
About the context OdinFilter
Use this context in filter scripts.
Functions of the FilterObject
About the Filter object
The variable filter provides a filter object with the following functions.
DefinePostageDefinitionByName
Defines a postage definition by its name.
DefinePostageDefinitionByName
SYNTAX DefinePostageDefinitionByName(PostageDefinitionName)
ARGUMENTS
PostageDefinitionName Name of the postage definition.
DefinePostageDefinitionByOId
Defines a postage definition by its object ID.
DefinePostageDefinitionByOId
SYNTAX DefinePostageDefinitionByOId(postageOID)
ARGUMENTS postageOID Object ID of the postage definition.
DefinePrinterByName
Defines a printer by its name and type.
DefinePrinterByName
SYNTAX DefinePrinterByName(printerName,type)
ARGUMENTS printerName Printer name. printerType Printer type.
352
Possible values
ModusSuiteObjectType.Printer
Description
Online printer.
ModusSuiteObjectType.EMailPrinter Email printer.
ModusSuiteObjectType.OutsourcingPrinter Outsourcing printer.
DefinePrinterByOId
Defines a printer by its object ID.
DefinePrinterByOId
SYNTAX DefinePrinterByOId(printerOID)
ARGUMENTS printerOID Object ID of the printer.
EnumEnvelopes
Invokes an instance of an envelope object to create envelopes.
Before an envelope object can be used, it must first be invoked by calling the Init function. If the envelope object is no longer required, it must be revoked by the FreeObject command in the filter script.
EnumEnvelopes
SYNTAX EnumEnvelopes()
RETURN Instance of an envelope object.
Gen_Stack
Creates a stack and assigns the relevant job and envelope datasets to it.
The UPDATE_SQL filter object parameter must be set before this function is called. This parameter contains the update statement assigning job and envelope datasets to the new stack.
Gen_Stack
SYNTAX
ARGUMENTS
Gen_Stack(updateParameter, customStackColumns) updateParameter Contains name and value pairs, for example, Postage=100. If you set more than one pair, you must separate each pair by a comma.
These pairs are used to replace placeholders in the SQL update statement with real values. Placeholders in an SQL update statement are identified by ':' customStackColumns This parameter allows you to insert data into customer-specific columns in the stack table when a stack is created. If not required, you must define an empty string.
As with the UpdateParameter, the string submitted here contains name and value pairs. For example, to fill the customer-specific columns ODS_INFO and ODS_EXT with data on insert, the values
ODS_INFO=SpecialInfo,ODS_EXT=10 must be submitted.
If the value contains quotation marks, equal signs, or commas, the name and value pair must be enclosed by quotation marks.
353
RETURN
Example
ODS_CUSTOM1=123,"ODS_CUSTOM2=test,123=0815"
Quotation marks have to de duplicated in a script.
Example
StackResult = Filter.Gen_Stack(UpdateParameter,
"ODS_CUSTOM1=123,""ODS_CUSTOM2=test,123=0815""")
The result here is a structure, not a basic data type, containing the following attributes:
Attribute
NewStackId
Definition
ID of the new stack dataset or an empty string, if no stack was created (no jobs or envelopes were assigned).
UpdatedRecordCount The number of datasets updated by the Update-SQL. This refers to the number of job or envelope datasets assigned to the stack.
GetParam
Retrieves the value of a filter parameter.
GetParam
SYNTAX
ARGUMENTS
RETURN
GetParam(parameterName) parameterName Name of the filter parameter.
Parameter value.
RunFilter
Allows you to run another filter script from a filter script itself.
ReplaceFile
SYNTAX
ARGUMENTS
RunFilter(filterScriptName) filterScriptName Name of the script to execute.
SetParam
Sets a filter parameter.
SetParam
SYNTAX
ARGUMENTS
SetParam(parameterName, parameterValue) parameterName Name of the filter parameter parameterValue New value of the filter parameter
Overview of possible parameters for the functions GetParam and SetParam
DBALIAS_NAME
Reads the name of the database alias defined in the settings of the OdinFilter component.
354
FILTERNAME
Allows you to define the value inserted into the field ODS_Filtername of the new stack. Is taken into account when creating a stack with Gen_Stack.
HOLDTIME
Allows you to overwrite the default print time value for a new stack.
Is taken into account when creating a stack with Gen_Stack.
MESSAGETEXT
Allows you to define the value inserted into the field ODS_Messagetext of the new stack. Is taken into account when creating a stack with Gen_Stack.
OMR_TYP
Allows you to define the value inserted into the field ODS_OMR_TYPE of the new stack. Is taken into account when creating a stack with Gen_Stack.
POSTAGEDEF_STR
Read postage class name of the postage definition set by using a variant of DefinePostageDefinition.
Each name must be separated by commas.
PRIORITY
Allows you to overwrite the default priority value for a new stack.
Is taken into account when creating a stack with Gen_Stack.
STACKOBJECTSQL
Optional definition of a key in the Lookup Table OdinStackObjectSql.
The value of the key is an order by statement to be executed instead of the standard SQL when stack jobs or envelopes are loaded.
This information is stored in the field ODJ_STACKOBJECTSQL of the corresponding stack created and is evaluated when loading stack jobs or envelopes.
Example:
If the key Test is to be used by this stack to load its envelopes, the order by statements are retrieved from the lookup table OdinStackObjectSql in the keys Test.Envelope_OrderBy and Test.Job_OrderBy.
Structure of the Lookup Table OdinStackObjectSQL
2 values must be defined for each key, one for envelopes and one for jobs:
<Key>.Envelope_OrderBy=<ORDERBY-STATEMENT>
<Key>.Job_OrderBy=<ORDERBY-STATEMENT>
Sample Lookup Table
default.Envelope_OrderBy=ODE_SEQUENCE ASC default.Job_OrderBy=ODJ_SEQUENCE ASC
Test.Envelope_OrderBy= ODE_REC_NAME DSC
Test.Job_OrderBy=ODJ_SORTING ASC
355
STACKTYPE
Allows you to overwrite the default value for stack type for a new stack.
Is taken into account when creating a stack with Gen_Stack.
STATE
Allows you to overwrite the default value for stack status for a new stack.
Is taken into account when creating a stack with Gen_Stack.
UPDATE_SQL
This parameter sets the SQL update statement to be used to assign jobs / envelopes to the new stack when the function Gen_Stack is executed.
Sample script: simple filter including stack generation
;***********************************************
; Filter Script Demo
; simple Filter including Stack generation
;***********************************************
; filterName = "FilterOnline" printerName = "PrinterOnline" stackState = 0
;
;Get number of open Jobs
DatabaseAliasName = filter.GetParam("DBALIAS_NAME")
InitDataset("OdinJob", DatabaseAliasName)
;
StringListAdd("JobCountSql", "Select count(*) JobCount from Odin_job Where
(ODJ_Stack_Id is null) and (Odj_Env_Id is null)")
SetSQL("OdinJob", "JobCountSql")
OpenSQL("OdinJob")
JobCount = GetField("OdinJob", "JobCount")
; if (JobCount > 0)
;
;Open Jobs exist -> generate Stack
Protocol("{0} Jobs for processing found", 10, JobCount)
;
; SQL to update open Jobs
UpdateSql =
"Update Odin_Job "+
"Set ODJ_Stack_Id = :StackId, ODJ_Printer_OID = :PrinterOId,
ODJ_Printer_Name = :PrinterName, ODJ_Printer_Type = :PrinterType " +
"Where (ODJ_Stack_Id is null) and (Odj_Env_Id is null) and (ODJ_State =
1)"
;
filter.SetParam("UPDATE_SQL", UpdateSql)
;
filter.SetParam("holdtime", "0")
356
filter.SetParam("priority", "200")
filter.SetParam("STACKTYPE", "0")
filter.SetParam("OMR_TYP", "")
filter.SetParam("STATE", stackState)
filter.SetParam("filtername", filterName)
;
filter.DefinePrinterByName(printerName, ModusSuiteObjectType.Printer)
;
;Alternative, if information has to be inserted into custom fields of the stack table
;my_result = filter.Gen_Stack("RecCity=NSU",
"ODS_INFO=test,ODS_INT_INFO=10")
my_result = filter.Gen_Stack("", "")
;
stackId = my_result.NewStackId
updCount = my_result.UpdatedRecordCount
if (updCount > 0)
;
Protocol("Stack {0} with {1} jobs created", 8, stackId, updCount)
;
end-if
;
Protocol("UpdatedRecordCount: " + my_result.UpdatedRecordCount, 10)
Protocol("NewStackId: " + my_result.NewStackId, 10)
; else
;
Protocol("No Jobs for processing found", 10)
; end-if
Functions of the Envelope Object
About the Envelope object
The envelope object enables you to create envelope datasets.
AppendVJob
Inserts a virtual job behind the internal cursor position in the internal job table.
AppendVJob
SYNTAX AppendVJob(renditionFileName, pageCount, formName)
ARGUMENTS renditionFileName Full path name statement to the XPS file you want to use as the document for the virtual job. pageCount formName
Number of document pages.
Name of the form.
CalcEnvelopePages
357
Calculates the number of pages for the current envelope (1 sheet has 2 pages).
Takes into account all documents of the job datasets and their respective enclosures. Enclosures in the postage definition are not taken into account.
CalcEnvelopePages
SYNTAX CalcEnvelopePages()
RETURN
EXAMPLE
Number of pages.
CalcEnvelopePages()
CalcEnvelopePapers
Calculates the number of sheets required for the current envelope (1 sheet has 2 pages).
Takes into account all documents of the job datasets and their respective enclosures. Enclosures in the postage definition are not taken into account.
CalcEnvelopePapers
SYNTAX CalcEnvelopePapers()
RETURN
EXAMPLE
Number of sheets.
CalcEnvelopePapers()
CalcEnvelopePostage
Calculates the postage class of the current envelope. Basis for calculating the postage class required is the weight of all documents in the job datasets and their enclosures as defined in the ODJ_Annex database field.
Enclosures in the postage definition are not taken into account.
CalcEnvelopePostage
SYNTAX CalcEnvelopePostage()
RETURN
EXAMPLE
Name of the postage class used.
CalcEnvelopePostage()
CalcEnvelopeWeight
Calculates the weight of the current envelope
Takes into account all documents of the job datasets and their respective enclosures (Odj_Annex).
Enclosures in the postage definition are not taken into account.
Syntax
CalcEnvelopeWeight()
Return value
Weight in grams
358
Commit
Ends the database transaction started with the StartTransaction command. All data modifications performed since the start of the transaction become a permanent part of the database.
Commit
SYNTAX
EXAMPLE
Commit()
Commit()
Count
Calculates the number of jobs contained in the envelope.
Count
SYNTAX Count()
RETURN Number of jobs.
CreateEnv
Creates a new envelope in the database and assigns the currently in the internal job table selected jobs to the envelope.
Takes into account any split markers that have been set.
CreateEnv
SYNTAX CreateEnv()
RETURN The database ID of the created envelope record. If more than one envelope is created, the returned string contains a comma separated list of all IDs.
EndTimer
Stops the timer started previously with the StartTimer command and returns the elapsed time in milliseconds.
EndTimer
SYNTAX EndTimer()
RETURN Number of milliseconds elapsed.
Eof
Determines whether the cursor is at the end of the dataset in the internal job table.
Eof
SYNTAX Eof()
RETURN TRUE = Eof reached.
FALSE = Eof not reached.
359
First
Positions the cursor on the first record in the internal job table.
First
SYNTAX First()
GetField
Reads the content of a field in the current dataset in the internal job table.
GetField
SYNTAX
ARGUMENTS
RETURN
GetField(fieldName) fieldName Name of the column.
Field value.
GotoJobTillWeight
Starts from the current cursor position in the internal job table and moves the cursor forward as long as the total weight of each individual job does not exceed the defined weight.
Setting a split marker at this position allows you to split an envelope into smaller envelopes.
GotoJobTillWeight
SYNTAX GotoJobTillWeight(tillWeight)
ARGUMENTS tillWeight Maximum weight not to be exceeded by the sum of individual job weights.
RETURN TRUE = The cursor has reached the end of the internal job table before the maximum weight was reached.
FALSE = The cursor did not reach the end of the internal job table before the maximum weight was reached.
GotoRecNum
Moves the cursor to a defined dataset in the internal job table.
GotoRecNum
SYNTAX GotoRecNum(recNumber)
ARGUMENTS recNumber 0-based index of the dataset where you want to position the cursor.
Init
Initializes the envelope object. This function must be the first function called after the envelope object and filter object have been set. Initialized envelope objects must be freed at the end of a filter script with the
FreeObject function.
IncDate
SYNTAX Init(groupFields, jobSqlQuery, takeOverFields, takeOverValues)
360
ARGUMENTS groupFields jobSqlQuery takeOverFields
Comma-separated column names of the job table defining the group change.
Select statement to determine the job records for logical envelope stuffing.
Additional fields in the ODIN_ENVELOPE table to be filled when an envelope dataset is created. takeOverValues Information about where the values for the additional columns come from.
It is possible to use column names from the job table (specified with ':' before the name) as well as constant values.
InsertVJob
Inserts a virtual job before the internal cursor position in the internal job table.
InsertVJob
SYNTAX
ARGUMENTS
InsertVJob(renditionFileName, pageCount, formName) renditionFileName Full path name statement to the XPS file used as the document for the virtual job. pageCount formName
Number of document pages.
Name of the form.
Last
Positions the cursor on the last record in the internal job table.
Last
SYNTAX
EXAMPLE
Last()
EnvEnum.Last()
Next
Positions the cursor on the next record in the internal job table.
Next
SYNTAX Next()
Prev
Positions the cursor on the previous record in the internal job table.
Prev
SYNTAX Prev()
ReadNextEnvelope
361
Calculates the datasets for the next envelope according to specified group change fields.
For more information, refer to the Init function groupFields parameter.
ReadNextEnvelope
SYNTAX ReadNextEnvelope()
RETURN The number of jobs in this envelope or 0 if the end of the job table is reached.
Recnum
Reads the record index of the current cursor position in the internal job table.
Recnum
SYNTAX Recnum()
RETURN Current record index. The return value is 0-based. The return value -1 means EOF.
Rollback
Ends the database transaction that was started with the command StartTransaction .
All data modifications performed since the start of the transaction are discarded.
This function should be called in the event of an error.
RollBack
SYNTAX RollBack()
SetField
Writes a value in the current dataset of the internal job table. The new value inserts into the database when the job is updated.
SetField
SYNTAX
ARGUMENTS
SetField(fieldName, value) fieldName Name of the column value New value
Split
Sets a split marker at the current cursor position in the internal job table.
Allows you to split the datasets currently held in the internal job table into several envelopes.
Split
SYNTAX Split()
StartTimer
362
Launches the internal timer.
StartTimer
SYNTAX StartTimer()
StartTransaction
Starts a database transaction.
StartTransaction
SYNTAX StartTransaction()
Sample Script: simple enveloping filter with stack generation
;***********************************************
; Filter Script Demo
;Simple Enveloping Filter with Stack Generation
;***********************************************
; filterName = "FilterOutsourcing" printerName = "PrinterOutsourcing" postageDefinition = "PostageDefinition"
;
#region Postage/Printer
;
;set the Postage Definition filter.DefinePostageDefinitionByName(postageDefinition)
;
;set the Printer assigned to the Jobs when the Envelope is created filter.DefinePrinterByName(printerName,
ModusSuiteObjectType.OutsourcingPrinter)
;
#endregion
;
#region SQL-Definition
;
;Group field change to define Envelope end
GroupFields =
"ODJ_REC_NAME,ODJ_REC_AKZ,ODJ_REC_ZIP,ODJ_REC_CITY,ODJ_REC_STREET"
;
;Select to load the Jobs for enveloping
;datasets are locked using the function "Updlock"
; you must type a space before and after " FROM "
; the where condition must at least contain the following minimum conditions:
; ODJ_Stack_Id is NULL: Job is not assigned to a Stack
; Odj_Env_Id is NULL: Job is not assigned to an Envelope
; Odj_State = 1: Rendition created
JobSelect = "Select Odin_Job.* From Odin_Job with (Updlock) " +
363
"where (ODJ_Stack_Id is NULL) and (Odj_Env_Id is null) and (Odj_State = 1) "
+
"order by ODJ_REC_NAME,ODJ_REC_AKZ,ODJ_REC_ZIP,ODJ_REC_CITY,ODJ_REC_STREET"
;
;As an alternative, SQL statements can be read from a LookupTable
;Example
;Sql-Statement should be read from the entry "JobSelect" in the LookupTable
"odin"
;JobSelect = GetLookupValue("odin", "JobSelect")
;
;Content of columns from the Jobs to be inserted into the Envelope created
TakeOverFields =
"ODE_REC_NAME,ODE_REC_AKZ,ODE_REC_ZIP,ODE_REC_CITY,ODE_REC_STREET,ODE_DEVICE"
TakeOverValues =
":ODJ_REC_NAME,:ODJ_REC_AKZ,:ODJ_REC_ZIP,:ODJ_REC_CITY,:ODJ_REC_STREET,Device x"
;
#endregion
;
;Create Envelope instance outside the try-block
EnvEnum = filter.EnumEnvelopes()
;
#region Envelope Stuffing
; try
;initialize inside the block
EnvEnum.Init(GroupFields, JobSelect, TakeOverFields, TakeOverValues)
EnvEnum.StartTransaction()
;
JobsInEnvelope = EnvEnum.ReadNextEnvelope()
while (JobsInEnvelope > 0)
;
EnvelopeId = EnvEnum.CreateEnv()
JobsInEnvelope = EnvEnum.ReadNextEnvelope()
;
end-while
;
EnvEnum.Commit()
;
OnError
;
EnvEnum.Rollback()
Protocol("Exception: {0}", 10, Error.Message)
Protocol("StackTrace: {0}", 10, Error.StackTrace)
Raise(Error.Token, Error.Message)
; finally
;
;free object to
364
;free up internal resources
FreeObject("EnvEnum")
; end-try
;
#endregion
;
#region create Stack for Envelope with no Stack assignment
;
;read the DbAlias of the Filter component
DatabaseAliasName = filter.GetParam("DBALIAS_NAME")
;
;Get number of open Envelopes
InitDataset("OdinEnv", DatabaseAliasName)
StringListAdd("EnvCountSql", "Select count(*) EnvCount from Odin_envelope
Where (ODE_Stack_Id is null)")
SetSQL("OdinEnv", "EnvCountSql")
OpenSQL("OdinEnv")
OpenEnvCount = GetField("OdinEnv", "EnvCount")
;
;create Stack if open Envelopes found
;A Stack with Envelopes is created for each Postage Class of the selected
Postage Definition if open Envelopes are found where the column ODE_POSTAGE
;
;contains the name of the Postage Class if (OpenEnvCount > 0)
;
filter.SetParam("filtername", filterName)
filter.SetParam("holdtime", "10")
filter.SetParam("priority", "200")
filter.SetParam("STACKTYPE", "20")
;filter.SetParam("OMR_TYP", "C4_OMR")
filter.SetParam("OMR_TYP", "")
;
;"StackId" is a protected keyword and is replaced by the ID of the Stack created during processing.
;"Postage" is a user-defined keyword. The value is defined in the
UpdateParameter of the function Gen_Stack.
UpdateSql =
"Update Odin_Envelope "+
"Set ODE_Stack_Id = :StackId "+
"Where (ODE_Stack_Id is null) and (ODE_POSTAGE = :Postage)"
;
filter.SetParam("UPDATE_SQL", UpdateSql)
;
;returns the names of the Postage Classes defined in the loaded Postage
Definition (comma separated)
PostageNames = filter.GetParam("PostageDef_Str")
;
365
while (PostageNames <> "")
Postage = StrTok("PostageNames", ",")
if (Postage = "")
Postage = PostageNames
PostageNames = ""
end-if
;
Filter.SetParam("FilterName", Postage)
UpdateParameter = FormatStr("Postage=%s", Postage)
StackResult = Filter.Gen_Stack(UpdateParameter, "")
if (StackResult.NewStackId = "0")
Protocol("No Stacks for Postage Class '{0}' created", 10, Postage)
else
Protocol("Stack for Postage Class '{0}' has the ID '{1}' and contains '{2}' Envelopes", 10, Postage, StackResult.NewStackId,
StackResult.UpdatedRecordCount)
end-if
;
end-while
; else
Protocol("No Envelopes for processing found", 10) end-if
;
#endregion
366
Context OdinPrint
Properties of the context OdinPrint
Parameter Description
CurrentEnvelope Current envelope, if found.
Read-only property.
Functions
GetValue
Returns the value of the given column.
CurrentJob
GetValue
SYNTAX
ARGUMENTS
GetValue(string columnName) columnName Column name
RETURN Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Current job, if found.
Read-only property.
Functions
GetValue
367
CurrentStack
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
GetValue(string columnName) columnName Column name
RETURN Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Current stack.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
RETURN
GetValue(string columnName) columnName Column name
Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the
368
format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Functions of the Context OdinPrint
HasData
Checks whether data exists for the given type.
HasData
SYNTAX
ARGUMENTS
RETURN
HasData(OdinDataRowType dataType) dataType
Possible values
OdinDataRowType.Process
OdinDataRowType.Stack
OdinDataRowType.Envelope
OdinDataRowType.Job
OdinDataRowType.VirtualJob
TRUE = The data row specified exists.
FALSE = The data row specified does not exist.
369
Context OdinRendition
About the context OdinRendition
Use this context in scripts that convert document files of jobs to the Odin spool file format (XPS format).
Properties of the context OdinRendition
Property Description
CurrentJobRecord Read or write access to the current job dataset.
CurrentProcessId Specifies the ID of the currently processed Odin process.
Functions of the Context OdinRendition
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following functions.
Current Returns the current object.
MoveNext() Moves the position to the next object to process.
SYNTAX MoveNext()
RETURN TRUE = Successful
FALSE = The end of the collection is passed.
Reset Resets the enumerator to the beginning of the first element.
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
GetValue(columnName) columnName Name of the column.
Column value. If the data type of the database column is DATE, Datetime or any valid date type, the date read generally returns in the format MM/DD/YYYY hh:mm:ss.
GetObject("DateVar","MLDate")
…
StringDateVar = CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar = DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss",
StringDateVar ) v_LETTERDATE= DateVar.Int64ToDateString("dd.MM.yyyy hh:mm:ss ",
IntDateVar)
370
HasData
Checks whether data exists for the given type.
HasData
SYNTAX
ARGUMENTS
RETURN
HasData(OdinDataRowType dataType) dataType
Possible values
OdinDataRowType.Process
OdinDataRowType.Stack
OdinDataRowType.Envelope
OdinDataRowType.Job
OdinDataRowType.VirtualJob
TRUE = The data row specified exists.
FALSE = The data row specified does not exist.
SetValue
Writes a value in a database column of the current job dataset.
SetSQL
SYNTAX
ARGUMENTS
EXAMPLE
SetValue(columnName, newValue) columnName Column name newValue Column value
Printer = CurrentJobRecord.GetValue("ODJ_PRINTER_OID") if (Printer = "")
CurrentJobRecord.SetValue("ODJ_PRINTER_OID", "test-pr-5") end-if
371
Context OdinStream
About the context OdinStream
Use this context in scripts to provide a stream object that can be accessed with Stream.
Properties of the context OdinStream
Property Description
Stream Returns the IOdinStreamDocument interface.
Script alias: stream
functions of the IOdinStream-Interface
Sample Script LoadEnvelopes / LoadJobs
HasStream TRUE = A stream object exists in the Stream context property.
FALSE = No stream object exists in the Stream context property.
Functions of the IOdinStream-Interface
AppendDocument
Adds a document loaded with LoadDocument to a stream.
AppendDocument
SYNTAX AppendDocument(document, insertOMR, insertDVFrei)
ARGUMENTS document The document you want to add. insertOMR Defines whether OMR codes are printed on the document.
Note OMR codes are not printed on a stack cover page.
EXAMPLE insertDVFrei Parameter reserved for later implementation. No current function. document = stream.LoadDocument("d:\import\Empty_Page.xps",
OdinDuplexSetting.Simplex, "firstbin","nextbin") stream.AppendDocument(document, true, false)
GetProperty
Retrieves streaming values, for example page counter.
GetProperty
SYNTAX GetProperty(propertyName)
ARGUMENT
S
RETURN propertyName Name of the property.
Property value.
372
373
You can query the following properties. The identifiers in brackets are those defined in modus 4 that remain valid to ensure backward compatibility. These are automatically converted to the corresponding new names.
General
Property
EnvelopeId
Description
Envelope ID of the envelope currently streamed.
JobId
OMRCode
OMRReset
StackId
StreamFileName
Sysdate
Systime
VirtualPageDescription
(VPageDesc)
Job ID of the job or document currently streamed.
Current value of the OMR code.
Read-only property.
TRUE = A reset flag (all OMR marks set) is printed on all subsequent documents instead of the OMR code. The reset flag is printed until the property is set to FALSE.
The OnStackEnd event enables to insert an additional document or an additional page after the stack, which contains a reset flag for the production inserter.
Stack ID of the stack to stream.
Name of the stream file.
Current date.
Current time.
For a stack cover page = StackCoverPage.
For an envelope cover page = EnvelopeCoverPage.
Otherwise an empty string.
Stack
Property
StackEnvelope
Description
Envelope counter for the whole stack.
StackJob
StackPage
Job or document counter for the whole stack.
Page counter for the whole stack.
StackPaper Sheet counter for the whole stack.
TotalStackEnvelopes (EnvCount) Number of envelopes in a stack.
TotalStackJobs
TotalStackPages (StackPage)
TotalStackPapers
Envelope
Number of jobs or documents in a stack.
Number of pages in a stack.
Number of sheets in a stack.
Property
EnvelopeEnd
EnvelopeJob
EnvelopePage
EnvelopePaper
Description
TRUE = The current document is the last document of the envelope.
FALSE = The current document is not the last document of the envelope.
Job or document counter for the whole envelope.
Page counter for the whole envelope.
Sheet counter for the whole envelope.
EXAMPLE
EnvelopeStart (EnvStart)
TotalEnvelopeJobs
(JobCount)
TotalEnvelopePages
TotalEnvelopePapers
Job / Document
Property
JobPage (PageCount)
TRUE = The current document is the first document of the envelope.
FALSE = The current document is not the first document of the envelope.
Number of jobs or documents in an envelope.
Number of pages in an envelope.
Number of sheets in an envelope.
Definition
Page counter for a document.
JobPaper (PageCountExtended) Sheet counter for a document.
TotalJobPages Number of pages in a document.
TotalJobPapers Number of sheets in a document.
; Stack was processed by streaming...
; As an example, an additional page is inserted containing details of the number of pages/sheets, envelopes/jobs
;
TotalPages = stream.GetProperty("TotalStackPages")
TotalPapers = stream.GetProperty("TotalStackPapers")
TotalEnvelopes = stream.GetProperty("TotalStackEnvelopes")
TotalJobs = stream.GetProperty("TotalStackJobs")
;
; Load cover page for tray "coverpage" document = stream.LoadDocument("c:\PerceptiveSoftware\modusSuite\data\EmptyPa ge.xps", OdinDuplexSetting.Simplex, "coverpage", "coverpage")
;
; print text as a test document.SetFont("Tahoma", 16) document.EditPage(0) document.TextOut(20.5, 10.5, FormatStr("TotalPages/TotalPapers:
%d/%d", TotalPages, TotalPapers), false, false) document.TextOut(20.5, 17, "Number Envelopes/Jobs: %d/%d",
TotalEnvelopes, TotalJobs), false, false) document.Post()
;
; Print OMR-Reset character
Stream.SetProperty("OMRReset", true)
;
; Add document to stream stream.AppendDocument(document, true, false)
;
; Free up the loaded document
FreeObject("document")
374
LoadDocument
Loads an XPS document. You can then add this document as an additional stack or envelope cover page or as a virtual document by using the AppendDocument function.
LoadDocument
SYNTAX InitDataset(datasetName, aliasName, tableName)
ARGUMENTS fileName Name of the document to load. duplex firstBin nextBin
Possible values
OdinDuplexSetting.Simplex: Simplex mode - no duplex
OdinDuplexSetting.Horizontal: Horizontal duplex (long edge)
OdinDuplexSetting.Vertical: Vertical duplex (short edge)
Tray for the first page.
Tray for the following page.
RETURN
EXAMPLE
Returns the IOdinStreamDocument interface with the functions required to perform drawing operations on pages. document = stream.LoadDocument("d:\import\Empty_Page.xps",
OdinDuplexSetting.Simplex, "firstbin","nextbin")
LoadEnvelopes
Loads all envelope datasets of a stack to the virtual ENVELOPE table for further processing.
LoadEnvelopes
SYNTAX LoadEnvelopes()
RETURN Number of envelope datasets.
LoadJobs
Determines the envelope ID of the current envelope dataset, loads all corresponding envelope jobs, and makes them available in the virtual JOB table.
LoadJobs
SYNTAX LoadJobs()
RETURN Number of job datasets.
SetProperty
Allows you to specify new settings for properties.
Note Altering values affects counters. Use the function with great care.
SetProperty
SYNTAX SetProperty(propertyName, value)
ARGUMENTS propertyName Property name value Property value
375
Sample Script LoadEnvelopes / LoadJobs
The functions of the VirtualDatabase, GetField() for example, provide access to stack, envelope and job data.
Example 1
ods_id = GetField("STACK", "ODS_ID") ode_id = GetField("ENVELOPE", "ODE_ID") odj_id = GetField("JOB", "ODJ_ID")
Example 2
; load stack envelopes envelopeCount = stream.LoadEnvelopes()
First("ENVELOPE") while (Eof("ENVELOPE") = false)
;
; Envelope ID
EnvelopeId = GetField("ENVELOPE", "ODE_ID")
; Number of jobs in the envelope
EnvelopeJobCount = GetField("ENVELOPE", "ODE_JOB_COUNT")
; load all jobs to the envelope
JobsInEnvelope = stream.LoadJobs();
;
; Check the number of jobs defined in the envelope matches the number of actual jobs
if (EnvelopeJobCount <> JobsInEnvelope)
Protocol("Number of jobs is different (ODE_JOB_COUNT={0} / Job-
Anzahl={1}", 10, EnvelopeJobCount, JobsInEnvelope)
end-if
;
; get all job IDs
while (Eof("JOB") = false)
JobId = GetField("Job", "ODJ_ID")
;
Next("Job")
end-while
;
Next("ENVELOPE") end-while
Functions of the Context OdinStream
HasData
Checks whether data exists for the given type.
HasData
SYNTAX HasData(OdinDataRowType dataType)
376
ARGUMENTS
RETURN dataType
Possible values
OdinDataRowType.Process
OdinDataRowType.Stack
OdinDataRowType.Envelope
OdinDataRowType.Job
OdinDataRowType.VirtualJob
TRUE = The data row specified exists.
FALSE = The data row specified does not exist.
377
Context OdinStreamDocument
About the context OdinStreamDocument
Use this context in scripts to provide a stream object that can be accessed with streamDoc.
Note All position information, as well as width and height, are specified in millimeters.
Properties of the IOdinStreamDocument-Interface
Property Description
Stream Returns the IOdinStreamDocument interface.
Script alias: stream
functions of the IOdinStream-Interface
Sample Script LoadEnvelopes / LoadJobs
For more information, refer to Context OdinStream .
StreamDoc Returns the IOdinStreamDocument interface of the currently loaded job or document.
This document automatically inserts after the OnDocument script executes unless it is added by means of AppendDocument.
This enables you to insert a virtual document before or after the current document by using
LoadDocument and AppendDocument.
Script alias: streamdoc
For more information, refer to
Functions of the IOdinStreamDocument-Interface
.
AddBookmark
378
Functions of IOdinStreamDocument-Interface
AddBookmark
Adds a bookmark to a document. If the output format is PDF, a bookmark is created for every bookmark defined. The IDs must be unique for each bookmark.
AddBookmark
SYNTAX
AddBookmark(string id, string parentId, string title)
AddBookmark(string id, string parentId, string title, double x, double y)
ARGUMENTS id Bookmark ID
EXAMPLE parentId An empty string here means the bookmark is inserted at the highest level.
Otherwise, the bookmark is inserted as a child of the bookmark specified. title x
Text for the bookmark.
X-position on the page. y Y-position on the page. document.AddBookmark("doc1_page1", "doc1", "Page 1") document.AddBookmark("doc1_page2", "doc1", "Page 2", 0, 0)
AddComment
Writes a comment in the output file that means a NOP record in AFP.
AddComment
SYNTAX AddComment(string text)
ARGUMENTS
EXAMPLE text Comment text
; Add a NOP record to the first page streamdoc.EditPage(0) streamdoc.AddComment("my internal NOP-record for testing") streamdoc.Post()
Codepage for NOP comments
You can set the codepage for NOP comments in the AFP profile file mffafp.pro at the XML element commentsdefaultcodepage.
Examples
<commentsdefaultcodepage iana="IBM850" />
<commentsdefaultcodepage iana="windows-1252" />
AddPJLCommand
Writes a PJL command in a Postscript or PCL output file.
AddPJLCommand
SYNTAX AddPJLCommand(string value)
379
ARGUMENTS
EXAMPLE value PJL-Command
; Add PJL-Command for staple and punch to the first page streamdoc.EditPage(0) streamdoc.AddPJLCommand("@PJL SET STAPLE=OFF") streamdoc.AddPJLCommand("@PJL SET PUNCH=OFF") streamdoc.Post()
EditPage
EditPage sets the given page to edit mode so that character commands can be executed on the page.
EditPage
SYNTAX
ARGUMENTS
EditPage(pageNumber) pageNumber Number of the page to be processed, beginning with 0.
GetInputBin
Returns the input bin of a page. If the input bin is not set, it returns the tray for the first page or for the subsequent tray, depending on the page number.
GetInputBin
SYNTAX GetInputBin(pageNumber)
ARGUMENTS pageNumber Page number.
RETURN Input bin.
Image
Inserts an image file.
HasObjectPermission
SYNTAX Image(x, y, fileName)
Image(x, y, imageFileName, layer)
ARGUMENTS x X-position. y Y-position. filename File name. layer
Possible Values
OdinPageLayer.Foreground = Drawing is done on top of the original document.
OdinPageLayer.Background = Drawing is done behind the original document.
RETURN TRUE = The user has the corresponding object rights.
FALSE = The user does not have the corresponding object rights.
IsDuplex
380
Returns the duplex mode.
IsDuplex
SYNTAX IsDuplex()
RETURN TRUE = Duplex
FALSE = Simplex
IsPortrait
Returns the portrait mode.
IsPortrait
SYNTAX
ARGUMENTS
RETURN
IsPortrait(pageNumber) pageNumber Page number.
TRUE = Portrait
FALSE = Landscape
Line
Draws a line on the current page.
Line
SYNTAX
ARGUMENTS
Line(x1, y1, x2, y2)
Line(x1, y1, x2, y2, lineWidth, lineStyle, color)
Line(x1, y1, x2, y2, lineWidth, lineStyle, color, layer) x1 y1 x2 y2
X-position of the starting position of the line.
Y-position of the starting position of the line.
X-position of the end position of the line.
Y-position of the end position of the line. lineWidth Line width. lineStyle
Possible values
OdinLineStyle.Solid
OdinLineStyle.Dashed
OdinLineStyle.Dotted color Color
Possible value
The HTML color name or the ARGB value in format #AARRGGBB
(AA=Alpha-Transparency, RR=Red, GG=Green, BB=Blue).
HTML color name ARGB value
AliceBlue #FFF0F8FF
AntiqueWhite #FFFAEBD7
Aqua
Aquamarine
Azure
#FF00FFFF
#FF7FFFD4
#FFF0FFFF
381
382
#FFB8860B
#FFA9A9A9
#FF006400
#FFBDB76B
#FF8B008B
#FF556B2F
#FFFF8C00
#FF9932CC
#FF8B0000
#FFE9967A
#FF8FBC8B
#FF483D8B
#FF2F4F4F
#FF00CED1
#FF9400D3
#FFFF1493
#FF00BFFF
#FF696969
#FF1E90FF
#FFB22222
#FFF5F5DC
#FFFFE4C4
#FF000000
#FFFFEBCD
#FF0000FF
#FF8A2BE2
#FFA52A2A
#FFDEB887
#FF5F9EA0
#FF7FFF00
#FFD2691E
#FFFF7F50
#FF6495ED
#FFFFF8DC
#FFDC143C
#FF00FFFF
#FF00008B
#FF008B8B
DarkGoldenrod
DarkGray
DarkGreen
DarkKhaki
DarkMagenta
DarkOliveGreen
DarkOrange
DarkOrchid
DarkRed
DarkSalmon
DarkSeaGreen
DarkSlateBlue
DarkSlateGray
DarkTurquoise
DarkViolet
DeepPink
DeepSkyBlue
DimGray
DodgerBlue
Firebrick
Beige
Bisque
Black
BlanchedAlmond
Blue
BlueViolet
Brown
BurlyWood
CadetBlue
Chartreuse
Chocolate
Coral
CornflowerBlue
Cornsilk
Crimson
Cyan
DarkBlue
DarkCyan
383
#FF7CFC00
#FFFFFACD
#FFADD8E6
#FFF08080
#FFE0FFFF
#FFFAFAD2
#FFD3D3D3
#FF90EE90
#FFFFB6C1
#FFFFA07A
#FF20B2AA
#FF87CEFA
#FF778899
#FFB0C4DE
#FFFFFFE0
#FF00FF00
#FF32CD32
#FFFAF0E6
#FFFF00FF
#FF800000
#FFFFFAF0
#FF228B22
#FFFF00FF
#FFDCDCDC
#FFF8F8FF
#FFFFD700
#FFDAA520
#FF808080
#FF008000
#FFADFF2F
#FFF0FFF0
#FFFF69B4
#FFCD5C5C
#FF4B0082
#FFFFFFF0
#FFF0E68C
#FFE6E6FA
#FFFFF0F5
FloralWhite
ForestGreen
Fuchsia
Gainsboro
GhostWhite
Gold
Goldenrod
Gray
Green
GreenYellow
Honeydew
HotPink
IndianRed
Indigo
Ivory
Khaki
Lavender
LavenderBlush
LawnGreen
LemonChiffon
LightBlue
LightCoral
LightCyan
LightGoldenrodYellow
LightGray
LightGreen
LightPink
LightSalmon
LightSeaGreen
LightSkyBlue
LightSlateGray
LightSteelBlue
LightYellow
Lime
LimeGreen
Linen
Magenta
Maroon
384
#FFFFA500
#FFFF4500
#FFDA70D6
#FFEEE8AA
#FF98FB98
#FFAFEEEE
#FFDB7093
#FFFFEFD5
#FFFFDAB9
#FFCD853F
#FFFFC0CB
#FFB0E0E6
#FF800080
#FFFF0000
#FFBC8F8F
#FF4169E1
#FF8B4513
#FFFA8072
#FFF4A460
#FF2E8B57
#FF66CDAA
#FF0000CD
#FFBA55D3
#FF9370DB
#FF3CB371
#FF7B68EE
#FF00FA9A
#FF48D1CC
#FFC71585
#FF191970
#FFF5FFFA
#FFFFE4E1
#FFFFE4B5
#FFFFDEAD
#FF000080
#FFFDF5E6
#FF808000
#FF6B8E23
Orange
OrangeRed
Orchid
PaleGoldenrod
PaleGreen
PaleTurquoise
PaleVioletRed
PapayaWhip
PeachPuff
Peru
Pink
Plum
Purple
Red
RosyBrown
RoyalBlue
SaddleBrown
Salmon
SandyBrown
SeaGreen
MediumAquamarine
MediumBlue
MediumOrchid
MediumPurple
MediumSeaGreen
MediumSlateBlue
MediumSpringGreen
MediumTurquoise
MediumVioletRed
MidnightBlue
MintCream
MistyRose
Moccasin
NavajoWhite
Navy
OldLace
Olive
OliveDrab
layer
SeaShell
Sienna
Silver
SkyBlue
SlateBlue
SlateGray
Snow
SpringGreen
SteelBlue
Tan
Teal
Thistle
Tomato
Turquoise
Violet
Wheat
White
WhiteSmoke
Yellow
YellowGreen
Possible values
OdinPageLayer.Foreground
OdinPageLayer.Background
#FFFFFF00
#FF9ACD32
#FFFFF5EE
#FFA0522D
#FFC0C0C0
#FF87CEEB
#FF6A5ACD
#FF708090
#FFFFFAFA
#FF00FF7F
#FF4682B4
#FFD2B48C
#FF008080
#FFD8BFD8
#FFFF6347
#FF40E0D0
#FFEE82EE
#FFF5DEB3
#FFFFFFFF
#FFF5F5F5
Pagecount
Returns the number of pages of the current document.
PageCount
SYNTAX PageCount()
RETURN Number of pages.
Post
Writes character commands in the document layer.
Post
SYNTAX Post()
385
Rectangle
Draws a rectangle on the current page.
Rectangle
SYNTAX
ARGUMENTS
Rectangle(x, y, witdh, height, fill, fillcolor)
Rectangle(x, y, width, height, lineWidth, lineStyle, lineColor, fill, fillColor)
Rectangle(x, y, width, height, lineWidth, lineStyle, lineColor, fill, fillColor, layer) x y width height fill fillColor
X-position of the top left corner of the rectangle.
Y-position of the top left corner of the rectangle.
If the string list is empty, all fields are read. The string list must exist.
Width of the rectangle.
Height of the rectangle.
TRUE = The rectangle is filled.
FALSE = The rectangle is not filled.
The default value is FALSE.
Pad color.
Possible value
The HTML color name or the ARGB value in format #AARRGGBB
(AA=Alpha-Transparency, RR=Red, GG=Green, BB=Blue).
HTML color name ARGB value
AliceBlue #FFF0F8FF
AntiqueWhite #FFFAEBD7
Aqua
Aquamarine
Azure
Beige
Bisque
Black
BlanchedAlmond
Blue
BlueViolet
Brown
BurlyWood
CadetBlue
Chartreuse
Chocolate
Coral
CornflowerBlue
Cornsilk
Crimson
Cyan
#FF00FFFF
#FF7FFFD4
#FFF0FFFF
#FFF5F5DC
#FFFFE4C4
#FF000000
#FFFFEBCD
#FF0000FF
#FF8A2BE2
#FFA52A2A
#FFDEB887
#FF5F9EA0
#FF7FFF00
#FFD2691E
#FFFF7F50
#FF6495ED
#FFFFF8DC
#FFDC143C
#FF00FFFF
386
387
#FF00BFFF
#FF696969
#FF1E90FF
#FFB22222
#FFFFFAF0
#FF228B22
#FFFF00FF
#FFDCDCDC
#FFF8F8FF
#FFFFD700
#FFDAA520
#FF808080
#FF008000
#FFADFF2F
#FFF0FFF0
#FFFF69B4
#FFCD5C5C
#FF4B0082
#FFFFFFF0
#FFF0E68C
#FF00008B
#FF008B8B
#FFB8860B
#FFA9A9A9
#FF006400
#FFBDB76B
#FF8B008B
#FF556B2F
#FFFF8C00
#FF9932CC
#FF8B0000
#FFE9967A
#FF8FBC8B
#FF483D8B
#FF2F4F4F
#FF00CED1
#FF9400D3
#FFFF1493
DeepSkyBlue
DimGray
DodgerBlue
Firebrick
FloralWhite
ForestGreen
Fuchsia
Gainsboro
GhostWhite
Gold
Goldenrod
Gray
Green
GreenYellow
Honeydew
HotPink
IndianRed
Indigo
Ivory
Khaki
DarkBlue
DarkCyan
DarkGoldenrod
DarkGray
DarkGreen
DarkKhaki
DarkMagenta
DarkOliveGreen
DarkOrange
DarkOrchid
DarkRed
DarkSalmon
DarkSeaGreen
DarkSlateBlue
DarkSlateGray
DarkTurquoise
DarkViolet
DeepPink
388
#FF32CD32
#FFFAF0E6
#FFFF00FF
#FF800000
#FF66CDAA
#FF0000CD
#FFBA55D3
#FF9370DB
#FF3CB371
#FF7B68EE
#FF00FA9A
#FF48D1CC
#FFC71585
#FF191970
#FFF5FFFA
#FFFFE4E1
#FFFFE4B5
#FFFFDEAD
#FF000080
#FFFDF5E6
#FFE6E6FA
#FFFFF0F5
#FF7CFC00
#FFFFFACD
#FFADD8E6
#FFF08080
#FFE0FFFF
#FFFAFAD2
#FFD3D3D3
#FF90EE90
#FFFFB6C1
#FFFFA07A
#FF20B2AA
#FF87CEFA
#FF778899
#FFB0C4DE
#FFFFFFE0
#FF00FF00
LimeGreen
Linen
Magenta
Maroon
MediumAquamarine
MediumBlue
MediumOrchid
MediumPurple
MediumSeaGreen
MediumSlateBlue
MediumSpringGreen
MediumTurquoise
MediumVioletRed
MidnightBlue
MintCream
MistyRose
Moccasin
NavajoWhite
Navy
OldLace
Lavender
LavenderBlush
LawnGreen
LemonChiffon
LightBlue
LightCoral
LightCyan
LightGoldenrodYellow
LightGray
LightGreen
LightPink
LightSalmon
LightSeaGreen
LightSkyBlue
LightSlateGray
LightSteelBlue
LightYellow
Lime
389
#FF8B4513
#FFFA8072
#FFF4A460
#FF2E8B57
#FFFFF5EE
#FFA0522D
#FFC0C0C0
#FF87CEEB
#FF6A5ACD
#FF708090
#FFFFFAFA
#FF00FF7F
#FF4682B4
#FFD2B48C
#FF008080
#FFD8BFD8
#FFFF6347
#FF40E0D0
#FFEE82EE
#FFF5DEB3
#FF808000
#FF6B8E23
#FFFFA500
#FFFF4500
#FFDA70D6
#FFEEE8AA
#FF98FB98
#FFAFEEEE
#FFDB7093
#FFFFEFD5
#FFFFDAB9
#FFCD853F
#FFFFC0CB
#FFB0E0E6
#FF800080
#FFFF0000
#FFBC8F8F
#FF4169E1
SaddleBrown
Salmon
SandyBrown
SeaGreen
SeaShell
Sienna
Silver
SkyBlue
SlateBlue
SlateGray
Snow
SpringGreen
SteelBlue
Tan
Teal
Thistle
Tomato
Turquoise
Violet
Wheat
Olive
OliveDrab
Orange
OrangeRed
Orchid
PaleGoldenrod
PaleGreen
PaleTurquoise
PaleVioletRed
PapayaWhip
PeachPuff
Peru
Pink
Plum
Purple
Red
RosyBrown
RoyalBlue
390
White
WhiteSmoke
Yellow
YellowGreen
#FFFFFFFF
#FFF5F5F5
#FFFFFF00
#FF9ACD32 lineWidth Line width. lineStyle Line style.
Possible values
OdinLineStyle.Solid
OdinLineStyle.Dashed
OdinLineStyle.Dotted lineColor Line color.
Possible value is the HTML color name or the ARGB value in format
#AARRGGBB (AA=Alpha-Transparency, RR=Red, GG=Green,
BB=Blue).
HTML color name ARGB value
AliceBlue #FFF0F8FF
AntiqueWhite
Aqua
Aquamarine
Azure
Beige
Bisque
Black
BlanchedAlmond
Blue
BlueViolet
Brown
BurlyWood
CadetBlue
Chartreuse
Chocolate
Coral
CornflowerBlue
Cornsilk
Crimson
Cyan
DarkBlue
DarkCyan
DarkGoldenrod
#FFFAEBD7
#FF00FFFF
#FF7FFFD4
#FFF0FFFF
#FFF5F5DC
#FFFFE4C4
#FF000000
#FFFFEBCD
#FF0000FF
#FF8A2BE2
#FFA52A2A
#FFDEB887
#FF5F9EA0
#FF7FFF00
#FFD2691E
#FFFF7F50
#FF6495ED
#FFFFF8DC
#FFDC143C
#FF00FFFF
#FF00008B
#FF008B8B
#FFB8860B
391
#FFB22222
#FFFFFAF0
#FF228B22
#FFFF00FF
#FFDCDCDC
#FFF8F8FF
#FFFFD700
#FFDAA520
#FF808080
#FF008000
#FFADFF2F
#FFF0FFF0
#FFFF69B4
#FFCD5C5C
#FF4B0082
#FFFFFFF0
#FFF0E68C
#FFE6E6FA
#FFFFF0F5
#FF7CFC00
#FFA9A9A9
#FF006400
#FFBDB76B
#FF8B008B
#FF556B2F
#FFFF8C00
#FF9932CC
#FF8B0000
#FFE9967A
#FF8FBC8B
#FF483D8B
#FF2F4F4F
#FF00CED1
#FF9400D3
#FFFF1493
#FF00BFFF
#FF696969
#FF1E90FF
Firebrick
FloralWhite
ForestGreen
Fuchsia
Gainsboro
GhostWhite
Gold
Goldenrod
Gray
Green
GreenYellow
Honeydew
HotPink
IndianRed
Indigo
Ivory
Khaki
Lavender
LavenderBlush
LawnGreen
DarkGray
DarkGreen
DarkKhaki
DarkMagenta
DarkOliveGreen
DarkOrange
DarkOrchid
DarkRed
DarkSalmon
DarkSeaGreen
DarkSlateBlue
DarkSlateGray
DarkTurquoise
DarkViolet
DeepPink
DeepSkyBlue
DimGray
DodgerBlue
392
#FF800000
#FF66CDAA
#FF0000CD
#FFBA55D3
#FF9370DB
#FF3CB371
#FF7B68EE
#FF00FA9A
#FF48D1CC
#FFC71585
#FF191970
#FFF5FFFA
#FFFFE4E1
#FFFFE4B5
#FFFFDEAD
#FF000080
#FFFDF5E6
#FF808000
#FF6B8E23
#FFFFA500
#FFFFFACD
#FFADD8E6
#FFF08080
#FFE0FFFF
#FFFAFAD2
#FFD3D3D3
#FF90EE90
#FFFFB6C1
#FFFFA07A
#FF20B2AA
#FF87CEFA
#FF778899
#FFB0C4DE
#FFFFFFE0
#FF00FF00
#FF32CD32
#FFFAF0E6
#FFFF00FF
Maroon
MediumAquamarine
MediumBlue
MediumOrchid
MediumPurple
MediumSeaGreen
MediumSlateBlue
MediumSpringGreen
MediumTurquoise
MediumVioletRed
MidnightBlue
MintCream
MistyRose
Moccasin
NavajoWhite
Navy
OldLace
Olive
OliveDrab
Orange
LemonChiffon
LightBlue
LightCoral
LightCyan
LightGoldenrodYellow
LightGray
LightGreen
LightPink
LightSalmon
LightSeaGreen
LightSkyBlue
LightSlateGray
LightSteelBlue
LightYellow
Lime
LimeGreen
Linen
Magenta
393
#FF2E8B57
#FFFFF5EE
#FFA0522D
#FFC0C0C0
#FF87CEEB
#FF6A5ACD
#FF708090
#FFFFFAFA
#FF00FF7F
#FF4682B4
#FFD2B48C
#FF008080
#FFD8BFD8
#FFFF6347
#FF40E0D0
#FFEE82EE
#FFF5DEB3
#FFFFFFFF
#FFF5F5F5
#FFFFFF00
#FFFF4500
#FFDA70D6
#FFEEE8AA
#FF98FB98
#FFAFEEEE
#FFDB7093
#FFFFEFD5
#FFFFDAB9
#FFCD853F
#FFFFC0CB
#FFB0E0E6
#FF800080
#FFFF0000
#FFBC8F8F
#FF4169E1
#FF8B4513
#FFFA8072
#FFF4A460
SeaGreen
SeaShell
Sienna
Silver
SkyBlue
SlateBlue
SlateGray
Snow
SpringGreen
SteelBlue
Tan
Teal
Thistle
Tomato
Turquoise
Violet
Wheat
White
WhiteSmoke
Yellow
OrangeRed
Orchid
PaleGoldenrod
PaleGreen
PaleTurquoise
PaleVioletRed
PapayaWhip
PeachPuff
Peru
Pink
Plum
Purple
Red
RosyBrown
RoyalBlue
SaddleBrown
Salmon
SandyBrown
layer
YellowGreen #FF9ACD32
Possible values
OdinPageLayer.Foreground = Drawing is done on top of the original document.
OdinPageLayer.Background = Drawing is done behind the original document.
SetAfpCopyGroup
Set the copy group of a page.
SetAfpCopyGroup
SYNTAX SetAfpCopyGroup(copyGroup)
ARGUMENTS
EXAMPLE copyGroup Copy group to set
; set the CopyGroup "CG1" on first page of each document streamdoc.EditPage(0) streamdoc.SetAfpCopyGroup("CG1") streamdoc.Post()
SetFont
Defines the font specification for text output.
SetFont
SYNTAX
ARGUMENTS
SetFont(fontName, fontSize) fontName Name of the font, for example, Arial. fontSize Size of the font, for example, 10.
SetInputBin
Sets the input tray for a page. The function overwrites the predefined tray for the first page or for the follow-up as the case may be.
SetInputBin
SYNTAX
ARGUMENTS
SetInputBin(pageNumber, binName)
EXAMPLE pageNumber Page number. binName Name of the tray.
;Set the input tray for the last page of the document streamDoc.SetInputBin(streamdoc.PageCount - 1, "testBin")
TextOut
Writes a text on the current page.
394
CreateGuid
SYNTAX
ARGUMENTS
TextOut(x, y, text, bold, italic)
TextOut(x, y, text, bold, italic, color, angle)
TextOut(x, y, text, bold, italic, color, angle, layer) x y text bold italic color
X-position of the starting point
Y-position of the starting point
Text to write
TRUE = Formatting bold
FALSE = Formatting not bold
The default value is FALSE
TRUE = Formatting italic
FALSE = Formatting not italic
The default value is FALSE
Color
Possible value is the HTML color name or the ARGB value in format
#AARRGGBB (AA=Alpha-Transparency, RR=Red, GG=Green,
BB=Blue).
HTML color name ARGB value
AliceBlue #FFF0F8FF
AntiqueWhite
Aqua
Aquamarine
Azure
Beige
Bisque
Black
BlanchedAlmond
Blue
BlueViolet
Brown
BurlyWood
CadetBlue
Chartreuse
Chocolate
Coral
CornflowerBlue
Cornsilk
Crimson
Cyan
DarkBlue
DarkCyan
#FFFAEBD7
#FF00FFFF
#FF7FFFD4
#FFF0FFFF
#FFF5F5DC
#FFFFE4C4
#FF000000
#FFFFEBCD
#FF0000FF
#FF8A2BE2
#FFA52A2A
#FFDEB887
#FF5F9EA0
#FF7FFF00
#FFD2691E
#FFFF7F50
#FF6495ED
#FFFFF8DC
#FFDC143C
#FF00FFFF
#FF00008B
#FF008B8B
395
396
#FF1E90FF
#FFB22222
#FFFFFAF0
#FF228B22
#FFFF00FF
#FFDCDCDC
#FFF8F8FF
#FFFFD700
#FFDAA520
#FF808080
#FF008000
#FFADFF2F
#FFF0FFF0
#FFFF69B4
#FFCD5C5C
#FF4B0082
#FFFFFFF0
#FFF0E68C
#FFE6E6FA
#FFFFF0F5
#FFB8860B
#FFA9A9A9
#FF006400
#FFBDB76B
#FF8B008B
#FF556B2F
#FFFF8C00
#FF9932CC
#FF8B0000
#FFE9967A
#FF8FBC8B
#FF483D8B
#FF2F4F4F
#FF00CED1
#FF9400D3
#FFFF1493
#FF00BFFF
#FF696969
DodgerBlue
Firebrick
FloralWhite
ForestGreen
Fuchsia
Gainsboro
GhostWhite
Gold
Goldenrod
Gray
Green
GreenYellow
Honeydew
HotPink
IndianRed
Indigo
Ivory
Khaki
Lavender
LavenderBlush
DarkGoldenrod
DarkGray
DarkGreen
DarkKhaki
DarkMagenta
DarkOliveGreen
DarkOrange
DarkOrchid
DarkRed
DarkSalmon
DarkSeaGreen
DarkSlateBlue
DarkSlateGray
DarkTurquoise
DarkViolet
DeepPink
DeepSkyBlue
DimGray
397
#FFFF00FF
#FF800000
#FF66CDAA
#FF0000CD
#FFBA55D3
#FF9370DB
#FF3CB371
#FF7B68EE
#FF00FA9A
#FF48D1CC
#FFC71585
#FF191970
#FFF5FFFA
#FFFFE4E1
#FFFFE4B5
#FFFFDEAD
#FF000080
#FFFDF5E6
#FF808000
#FF6B8E23
#FF7CFC00
#FFFFFACD
#FFADD8E6
#FFF08080
#FFE0FFFF
#FFFAFAD2
#FFD3D3D3
#FF90EE90
#FFFFB6C1
#FFFFA07A
#FF20B2AA
#FF87CEFA
#FF778899
#FFB0C4DE
#FFFFFFE0
#FF00FF00
#FF32CD32
#FFFAF0E6
Magenta
Maroon
MediumAquamarine
MediumBlue
MediumOrchid
MediumPurple
MediumSeaGreen
MediumSlateBlue
MediumSpringGreen
MediumTurquoise
MediumVioletRed
MidnightBlue
MintCream
MistyRose
Moccasin
NavajoWhite
Navy
OldLace
Olive
OliveDrab
LawnGreen
LemonChiffon
LightBlue
LightCoral
LightCyan
LightGoldenrodYellow
LightGray
LightGreen
LightPink
LightSalmon
LightSeaGreen
LightSkyBlue
LightSlateGray
LightSteelBlue
LightYellow
Lime
LimeGreen
Linen
398
#FFF4A460
#FF2E8B57
#FFFFF5EE
#FFA0522D
#FFC0C0C0
#FF87CEEB
#FF6A5ACD
#FF708090
#FFFFFAFA
#FF00FF7F
#FF4682B4
#FFD2B48C
#FF008080
#FFD8BFD8
#FFFF6347
#FF40E0D0
#FFEE82EE
#FFF5DEB3
#FFFFFFFF
#FFF5F5F5
#FFFFA500
#FFFF4500
#FFDA70D6
#FFEEE8AA
#FF98FB98
#FFAFEEEE
#FFDB7093
#FFFFEFD5
#FFFFDAB9
#FFCD853F
#FFFFC0CB
#FFB0E0E6
#FF800080
#FFFF0000
#FFBC8F8F
#FF4169E1
#FF8B4513
#FFFA8072
SandyBrown
SeaGreen
SeaShell
Sienna
Silver
SkyBlue
SlateBlue
SlateGray
Snow
SpringGreen
SteelBlue
Tan
Teal
Thistle
Tomato
Turquoise
Violet
Wheat
White
WhiteSmoke
Orange
OrangeRed
Orchid
PaleGoldenrod
PaleGreen
PaleTurquoise
PaleVioletRed
PapayaWhip
PeachPuff
Peru
Pink
Plum
Purple
Red
RosyBrown
RoyalBlue
SaddleBrown
Salmon
Yellow
YellowGreen
#FFFFFF00
#FF9ACD32 angle Angle of rotation layer
Possible values
OdinPageLayer.Foreground = Drawing is done on top of the original document.
OdinPageLayer.Background = Drawing is done behind the original document.
399
Context OdinStreamPrint
Properties of the context OdinStreamPrint
Parameter Description
CurrentDocument Current document, if found.
Read-only property.
Functions
GetDocumentFileName
Returns the name of the original document.
GetDocumentFileName
SYNTAX GetDocumentFileName()
RETURN File name.
GetDuplex
Returns the duplex mode for this document.
GetDuplex
SYNTAX GetDuplex()
RETURN
Enumerator with the following functions.
OdinDuplexSetting.Simplex = No duplex.
OdinDuplexSetting.Horizontal = Duplex on the short edge.
OdinDuplexSetting.Vertical = Duplex on the long edge.
GetFileName
Returns the rendition file name of the document.
GetFileName
SYNTAX GetFileName()
RETURN Rendition file name.
GetFirstInputBin
Returns the tray for the first page of the document.
GetFirstInputBin
SYNTAX GetFirstInputBin()
RETURN Name of the tray.
GetId
Returns the ID of the document (= Job-ID or StackCoverPage /
EnvelopeCoverPage, as the case may be)
GetId
SYNTAX GetId()
RETURN Document ID.
GetNextInputBin
Returns the follow on tray for the 2-n pages of a document.
400
HasDocument
GetNextInputBin
SYNTAX GetNextInputBin()
RETURN Next input bin.
GetPageCount
Returns the number of pages.
GetPageCount
SYNTAX GetPageCount()
RETURN Number of pages
IsPortrait
Returns the portrait mode.
IsPortrait
SYNTAX
ARGUMENTS
IsPortrait(int pageNumber) pageNumber Page number
RETURN TRUE = Portrait
FALSE = Landscape
SetDuplex
Specifies the duplex mode for this document.
SetDuplex
SYNTAX
ARGUMENTS
SetDuplex(duplexMode) duplexMode OdinDuplexSetting.Simplex = No duplex
OdinDuplexSetting.Horizontal = Duplex on the short edge
OdinDuplexSetting.Vertical = Duplex on the long edge
SetFirstInputBin
Sets the tray for the first page of the document.
SetFirstInputBin
SYNTAX
SetFirstInputBin(string inputBin)
ARGUMENTS inputBin Tray
SetNextInputBin
Set the follow on tray for the 2-n pages of a document.
SetNextInputBin
SYNTAX
SetNextInputBin(string inputBin)
ARGUMENTS inputBin Tray
TRUE = A document is available.
FALSE = No document is available.
Read-only property.
401
CurrentEnvelope Current envelope, if found.
Read-only property.
Functions
GetValue
Returns the value of the given column.
CurrentJob
GetValue
SYNTAX
ARGUMENTS
GetValue(string columnName) columnName Column name
RETURN Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Current job, if found.
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX GetValue(string columnName)
402
CurrentStack
ARGUMENTS
RETURN columnName Column name
Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
EXAMPLE
GetObject("DateVar","MLDate")
…
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Current stack
Read-only property.
Functions
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
GetValue(string columnName) columnName Column name
Column value
If the data type of the database column is DATE, DATETIME or any valid date type, the date read generally returns in the format
MM/DD/YYYY hh:mm:ss.
GetObject("DateVar","MLDate")
…
403
StringDateVar =
CurrentEnvelope.GetValue("ODE_CREATE_AT")
;Convert date to the required format with the help of the MLDate object
IntDateVar =
DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE=
DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss
", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following methods.
Method Description
Current Returns the current object.
MoveNext Moves the position to the next object to be processed.
Reset Resets the enumerator to the beginning of the first element.
Functions of the Context OdinStreamPrint
HasData
Checks whether data exists for the given type.
HasData
SYNTAX
ARGUMENTS
RETURN
HasData(OdinDataRowType dataType) dataType
Possible values
OdinDataRowType.Process
OdinDataRowType.Stack
OdinDataRowType.Envelope
OdinDataRowType.Job
OdinDataRowType.VirtualJob
TRUE = The data row specified exists.
FALSE = The data row specified does not exist.
404
Context OnError
Properties of the context OnError
Property Description
LastErrorMessage Last error message
405
Context OnNavigateObject
Properties of the context OnNavigateObject
Property
Block
Description
Allows you to access the text block properties.
CancelIteration
ComponentType
TRUE = Cancel the navigation.
FALSE = Do not cancel the navigation.
Object type
Possible values
TextSystemObjectType.DocumentReference
TextSystemObjectType.Block
TextSystemObjectType.Variable
DocumentReference Allows you to access the document reference properties.
SkipChildren TRUE = Skip child objects.
FALSE = Do not skip child objects.
Variable Allows you to access the variable properties.
Sample Script OnNavigateObject
The following script checks which objects were activated manually by a user and writes these in the variable System.UsedBlocks.
;Standard script to filter UsedBlocks according to standard modus4 logic
; if (ComponentType = TextSystemObjectType.Block)
;
;This IF-query checks if the rule for the modus 4 filter is met.
;Is the text block Kann (BlockType = 1)
;Is the text block visible (also takes account of parent text blocks
(IsVisible)
;Was the block inserted? (IsInserted)
if ((Block.BlockType = "1") and (Block.IsVisible = true) and
(Block.IsInserted = true))
;
if (System.UsedBlocks = "")
System.UsedBlocks = Block.ObjectId
else
System.UsedBlocks = System.UsedBlocks + ", " + Block.ObjectId
end-if
;
end-if
;
;If the text block was not inserted, then its children do not need to be checked
if ((Block.IsInserted = false) or (Block.IsVisible = false))
SkipChildren = true
end-if
;
406
end-if
407
Context OnProcessError
Properties of the context OnProcessError
Property
LastErrorMessa ge
ModusProcess
ResetError
Description
Last error message
Provides the following properties and functions.
Properties
Objectname: Name of the process.
SystemOId: ID of the system in which the process runs.
Functions
Cancel
Cancels the process.
Cancel
SYNTAX Cancel()
EXAMPLE
ModusProcess.Cancel()
GetComponent
Enables access to the properties and methods of components.
GetComponent
SYNTAX GetComponent(string componentName)
ARGUMENT
S componentName Name of the component
EXAMPLE
DocumentCollection =
ModusProcess.GetComponent("DocumentCollectionMana ger")
SendInfoMessage
Sends an information message to logged on remote control clients. A time stamp is inserted before each message.
SendInfoMessage
SYNTAX SendInfoMessage(string message)
ARGUMENTS
EXAMPLE message The information message you want to send.
ModusProcess.SendInfoMessage("This is the message")
Stop
Ends running processes.
Stop
SYNTAX Stop()
EXAMPLE
ModusProcess.Stop()
Allows you to reset an error state in an OnError script.
408
TRUE = Prevents canceling a process in the event of an error.
FALSE = Allows canceling a process in the event of an error.
If the activities run in a timer, the current process reruns at the next timer interval. Otherwise, the process terminates.
ResumeOptions
Possible values
ProcessResumeOptions.NextActivity: The process resumes with the next activity.
ProcessResumeOptions.FromStart: The process starts from the beginning.
ProcessResumeOptions.FromStartWithIntervall: The process starts from the beginning at the next interval.
Notes
Variable pools are not reset.
Setting ResumeOptions only applies when the process runs in a timer.
409
Context Process
About the context Process
Use this context for scripts in processes.
Properties of the context Process
Property
ModusProces s
Description
Provides the following properties and functions.
Properties
Objectname: Name of the process.
SystemOId: ID of the system in which the process runs.
Functions
Cancel
Cancels the process.
Cancel
SYNTAX Cancel()
EXAMPLE
ModusProcess.Cancel()
GetComponent
Enables access to the properties and methods of components.
GetComponent
SYNTAX GetComponent(string componentName)
ARGUMENT
S
EXAMPLE componentName Name of the component
DocumentCollection =
ModusProcess.GetComponent("DocumentCollectionManage r")
SendInfoMessage
Sends an information message to logged on remote control clients. A time stamp is inserted before each message.
SendInfoMessage
SYNTAX SendInfoMessage(string message)
ARGUMENTS
EXAMPLE message The information message you want to send.
ModusProcess.SendInfoMessage("This is the message")
Stop
Ends running processes.
Stop
SYNTAX Stop()
EXAMPLE
ModusProcess.Stop()
410
411
Context ProcessTimer
About the context ProcessTimer
Use this context for timer scripts.
Properties of the context ProcessTimer
Property Description
ExecuteTimer TRUE = Execute timer logic.
FALSE = Do not execute timer logic.
Interval
ModusProces s
Interval in milliseconds the timer service triggers the process timer.
Provides the following properties and functions.
Properties
Objectname: Name of the process
SystemOId: ID of the system in which the process runs.
Functions
Cancel
Cancels the process.
Cancel
SYNTAX Cancel()
EXAMPLE
ModusProcess.Cancel()
GetComponent
Enables access to the properties and methods of components.
GetComponent
SYNTAX GetComponent(string componentName)
ARGUMENT
S
EXAMPLE componentName Name of the component
DocumentCollection =
ModusProcess.GetComponent("DocumentCollectionManage r")
SendInfoMessage
Sends an information message to logged on remote control clients. A time stamp is inserted before each message.
SendInfoMessage
SYNTAX SendInfoMessage(string message)
ARGUMENTS
EXAMPLE message The information message you want to send.
ModusProcess.SendInfoMessage("This is the message")
Stop
Ends running processes.
Stop
412
SYNTAX Stop()
EXAMPLE
ModusProcess.Stop()
413
Context SelectionQueryScript
Properties of the context SelectionQueryScript
Property Description
Db Database alias
414
Context TextComponent
About the context TextComponent
Use this context for scripts assigned to text blocks.
Properties of the context TextComponent
The name in brackets is the name of the property in modus 4, which for reasons of maintaining downwards compatibility, may also be used.
Property
BlockprotectionS
(Blockprotection)
BlockType (BlockType)
DataLink (Data Object)
Expandable
ExpandableS
IsVisible
TextBlockProtection
Title
Visible
VisibleS
XPathExpression
ErrorMessage
InsertObject
InsertObjectS (InsertObject)
IsInserted
ObjectId (ObjectIndex)
Description
Corresponds to the property TextComponentProtection for a text block.
For more information, refer to Text Block Properties.
0 = Deactivated
1 = Required
2 = Activated
3 = Disabled
Path to the data object.
Read-only property.
TRUE = The user can see the text block structure and is allowed to activate or deactivate its objects.
FALSE = The user cannot see the text block structure.
Y = The user can see the text block structure and is allowed to activate or deactivate its objects.
N = The user cannot see the text block structure.
Determines by the property of the parent text block or document.
TRUE = Visible
FALSE = Invisible
Read-only property.
TRUE = TextBlockProtection is activated.
FALSE = TextBlockProtection is not activated.
Name of the text block the user sees in the PDC Client.
TRUE = Visible
FALSE = Invisible
Y = Visible
N = Invisible
For more information, refer to Text Block Properties.
Error message. If a value is assigned, the generation aborts with the corresponding error message.
TRUE = Insert the object.
FALSE = Do not insert the object.
Y = Insert the object.
N = Do not insert the object.
TRUE = Object was inserted.
FALSE = Object was not inserted.
Read-only property.
Object ID
Read-only property.
415
ObjectName
ParentBlock
ParentDocument
Object name
Read-only property.
Parent text block
Read-only property.
Parent document
Read-only property.
Functions of the Context TextComponent
LoadExternalDocument
Loads an existing document and replaces the text block. You can specify the location of the document either as file path or as URL.
Use this function in a BeforeInsert script and use as a document a DOCX file created with Microsoft
Word 2010 or higher.
The text block using the Word document cannot contain nested text blocks or variables.
LoadExternalDocument
SYNTAX LoadExternalDocument(fileSource)
LoadExternalDocument(bytes)
ARGUMEN
TS fileSource Name and path of the document.
Possible values
Strings with preceding http:// or https:// substring, also in uppercase, are interpreted as URL.
Any other string is interpreted as a file path.
EXAMPLE bytes For loading a document from a byte array.
LoadExternalDocument("http://fileServer/Documents/How_To.docx")
LoadExternalDocument("C:\Documents\How_To.docx")
LoadExternalDocument(System.IO.File.ReadAllBytes("c:\Documents\Acco unt.docx"))
Navigate
Enables you to navigate through the child objects of the current object.
Navigate
SYNTAX
ARGUMENTS
Navigate(onObjectScript, onlyActiveNodes, filterTypes) onObjectScript Script that executes for each of the specified object types found.
This script must have the context OnNavigateObject assigned.
onlyActiveNodes TRUE = Only navigates active objects.
FALSE = Navigates all objects. filterTypes Filter defining the objects to navigate.
Possible values
TextSystemObjectType.Variable
TextSystemObjectType.Block
TextSystemObjectType.DocumentReferences
416
EXAMPLE
Navigate("Scriptname", true, TextSystemObjectType.Block,
TextSystemObjectType.Variable)
417
Context TextDocument
About the context TextDocument
Use this context for scripts assigned to documents.
Properties of the context TextDocument
The name in brackets is the name of the property in modus 4, which may also be used for reasons of maintaining downward compatibility.
Property
CustomIndex
MissingObjects
ErrorMessage
InsertObject
InsertObjectS
(InsertObject)
IsInserted
ObjectId (ObjectIndex)
Objectname
Description
Use this property in connection with dynamic bundles to pass on values to inserted documents.
Read-only property.
Comma-separated string containing the aliases of activated variable objects not found during document generation.
An empty string is returned when no missing objects exist.
Error message. If a value is assigned, generation is aborted with the corresponding error message.
TRUE = Insert the object.
FALSE = Do not insert the object.
Y = Insert the object.
N = Do not insert the object.
TRUE = Object was inserted.
FALSE = Object was not inserted.
Read-only property.
Object ID
Read-only property.
Object name
Read-only property.
Functions of the Context TextDocument
LoadExternalDocument
Loads a document and replaces the static document. You can specify the location of the document either as file path or as URL.
LoadExternalDocument
SYNTAX LoadExternalDocument(fileSource)
LoadExternalDocument(bytes)
ARGUMEN
TS fileSource Name and path of the document.
Possible values
Strings with preceding http:// or https:// substring, also in uppercase, are interpreted as URL.
Any other string is interpreted as a file path.
EXAMPLE bytes For loading a document from a byte array.
LoadExternalDocument("http://fileServer/Documents/How_To.pdf")
LoadExternalDocument("C:\Documents\How_To.pdf")
418
LoadExternalDocument(System.IO.File.ReadAllBytes("c:\Documents\Acco unt.pdf"))
Navigate
Enables you to navigate through the child objects of the current object.
Navigate
SYNTAX
ARGUMENTS
EXAMPLE
Navigate(onObjectScript, onlyActiveNodes, filterTypes) onObjectScript Script that executes for each of the specified object types found.
This script must have the context OnNavigateObject assigned.
onlyActiveNodes TRUE = Only navigates active objects.
FALSE = Navigates all objects. filterTypes Filter defining the objects to navigate.
Possible values
TextSystemObjectType.Variable
TextSystemObjectType.Block
TextSystemObjectType.DocumentReferences
Navigate("Scriptname", true, TextSystemObjectType.Block,
TextSystemObjectType.Variable)
419
Context TextDocumentCollection
About the context TextDocumentCollection
Use this context for scripts assigned to bundles.
This context provides the functions needed to insert documents and document copies into a bundle.
Properties of the context TextDocumentCollection
The name in brackets is the name of the property in modus 4, which may also be used for reasons of maintaining downward compatibility.
Property
AllDocumentNames
AllDocuments
AllowPrint
ArchiveData
BlockBundle
Data ID
Description
Comma-separated list of the names of all original documents contained in a bundle.
Read-only property.
Comma-separated list of the child IDs of all original documents contained in a bundle.
Read-only property.
TRUE = Printing allowed.
FALSE = Printing not allowed.
Archive data. This property is only contained for reasons of compatibility.
TRUE = Forward the bundle.
FALSE = Do not forward the bundle.
Returns the DataID assigned to the bundle object (root object in the bundle), or an empty string if no DataID is assigned.
Name of the user group the bundle is forwarded to. DestinationGroup
(DestUserGroup)
DestinationUser (DestUser)
DocumentGroupIndex
DocumentGroupName
DocumentNames
Documents
HoldTime
Priority
State
ErrorMessage
InsertObject
Name of the user the bundle is forwarded to.
BundleID
Read-only property.
Bundle name
Read-only property.
Comma-separated list of the names of all active documents.
Read-only property.
Comma-separated list of the child IDs of all active documents.
Read-only property.
Hold time for direct print stack.
Priority for direct print stack.
Bundle status
Read-only property.
Possible values
DocumentCollectionState.None: Initial state
DocumentCollectionState.DataProcessed: Data assigned and processed
(dynamic bundle)
DocumentCollectionState.Created: Documents were created.
DocumentCollectionState.Printed: Documents were printed.
Error message. If a value is assigned, generation is aborted with the corresponding error message.
TRUE = Insert the object.
420
InsertObjectS
IsInserted
ObjectId (ObjectIndex)
Objectname
FALSE = Do not insert the object.
Y = Insert the object.
N = Do not insert the object.
TRUE = Object was inserted.
FALSE = Object was not inserted.
Read-only property.
Object ID
Read-only property.
Object name
Read-only property.
Functions of the Context TextDocumentCollection
AddDocumentByName
Adds a document to a bundle. The document is referenced by its name in the repository.
AddDocumentByName
SYNTAX AddDocumentByName(string objectName, string childId, TextInsertionRule insertRule, string beforeInsertName, string afterInsertName, string conditionName, string defineSortName, string defineGroupName, string defineArchiveName, int numberOfCopies, string printerName, string formName, bool changingAllowed, OdinPrintTime printTime, bool doArchive, string customIndex, string documentName, string dataId, string password, bool isVisible, bool isExpandable,
DocumentType documentType, string title, string customUIName)
AddDocumentByName(string objectName, string childId, TextInsertionRule insertRule, string beforeInsertName, string afterInsertName, string conditionName, string defineSortName, string defineGroupName, string defineArchiveName, int numberOfCopies, string printerName, string formName, bool changingAllowed, OdinPrintTime printTime, bool doArchive, string customIndex, string documentName, string dataId, string password, bool isVisible, bool isExpandable,
DocumentType documentType, string title, string customUIName, OdinPrinterType printerType)
ARGUME
NTS objectName Name of the document in the bundle. childId Freely definable document ID. This must be unique within the bundle. insertRule TextInsertionRule
Available types
TextInsertionRule.Activated
TextInsertionRule.Deactivated
TextInsertionRule.Required
TextInsertionRule.Disabled beforeInsertName afterInsertName conditionName defineSortName
Name of the BeforeInsert script.
Name of the AfterInsert script.
Conditions
Name of the DefinitionSorting script. defineGroupName Name of the DefinitionGrouping script. defineArchiveName Name of the DefinitionArchiving script. numberOfCopies printerName
Number of copies.
Printers
421
EXAMPLE formName changingAllowed printTime doArchive customIndex documentName dataId password isVisible isExpandable documentType
Form name.
TRUE = The user can modify the document..
FALSE = The user cannot modify the document.
Printing time
Available types
OdinPrintTime.Direct: Immediately
OdinPrintTime.Shifted: Shifted
OdinPrintTime.Unknown: Unknown
OdinPrintTime.Local: Local
TRUE = Archive the document.
FALSE = Do not archive the document.
Freely definable index, for example, for subsequent queries.
Name of the document.
Selection
Password
TRUE = Visible
FALSE = Invisible
TRUE = Expandable
FALSE = Not expandable
Document type
Available types
DocumentType.Unknown
DocumentType.DynamicWord
DocumentType.StaticWord
DocumentType.StaticPdf
DocumentType.StaticTiff
DocumentType.StaticXps title Title of the document in the bundle.
If you set this parameter, it replaces the object name.
CustomUI customUIName printerType Printer type
Available types
OdinPrinterType.Online
OdinPrinterType.Email
The default value is OdinPrinterType.Online.
AddDocumentByName("DocumentOriginal","ChildID_Original",TextInserti onRule.Activated, "BeforeInsertDocument", "AfterInsertDocument",
"True_Document", "SortingDocument", "GroupingDocument",
"ArchivingDocument", 1, "Printer", "Form", true,
OdinPrintTime.Shifted, false, "CustomIndex", "StaticPdf",
"Partner_V2","Password", true, true, DocumentType.StaticPdf,
"Title_Original", "CustomUIName")
422
AddDocumentByObjectId
Adds a document to a bundle. The document is referenced by its object ID.
AddDocumentByObjectId
SYNTAX AddDocumentByObjectId(string objectName, string childId, TextInsertionRule insertRule, string beforeInsertOID, string afterInsertOID, string conditionOID, string defineSortOID, string defineGroupOID, string defineArchiveOID, int numberOfCopies, string printerOID, string formOID, bool changingAllowed, OdinPrintTime printTime, bool doArchive, string customIndex, string documentOID, string dataId, string password, bool isVisible, bool isExpandable, DocumentType documentType, string title, string customUIOID)
ARGUMENTS objectOID Object Id of the document in the bundle. childId insertRule beforeInsertOID afterInsertOID conditionOID defineSortOID
Freely definable document ID. This must be unique within the bundle.
TextInsertionRule
Available types
TextInsertionRule.Activated
TextInsertionRule.Deactivated
TextInsertionRule.Required
TextInsertionRule.Disabled
Object ID of the BeforeInsert script.
Object ID of the AfterInsert script.
Object ID of the condition.
Object ID of the DefinitionSorting script. defineGroupOID Object ID of the DefinitionGrouping script. defineArchiveOID Object ID of the DefinitionArchiving script. numberOfCopies Number of copies. printerOID Object ID of the printer. formOID Object ID of the form. changingAllowed TRUE = The user can modify the document.
FALSE = The user cannot modify the document. printTime Printing time
Available types
OdinPrintTime.Direct: Immediately
OdinPrintTime.Shifted : shifted
OdinPrintTime.Unknown: Unknown
OdinPrintTime.Local: Local doArchive customIndex documentOID dataId password isVisible
TRUE = Archive the document.
FALSE = Do not archive the document.
Freely definable index, for example, for subsequent queries.
Object ID of the document.
Selection
Password isExpandable
TRUE = Visible
FALSE = Invisible
TRUE = Expandable
FALSE = Not expandable
423
EXAMPLE documentType title
Document Type
Available types
DocumentType.Unknown
DocumentType.DynamicWord
DocumentType.StaticWord
DocumentType.StaticPdf
DocumentType.StaticTiff
DocumentType.StaticXps
Title of the document in the bundle.
If this parameter is set, it replaces the object name. customUIName Object ID of the CustomUI.
AddDocumentByObjectId("Document", "ChildID_Original2",
TextInsertionRule.Activated, "15072011-226-sc-ts","15072011-227sc-ts","10072011-186-cd-ts","15072011-230-sc-ts","15072011-229sc-ts","15072011-228-sc-ts", 0, "04092011-43-pr-ts", "18112011-
482-fo-ts", true, OdinPrintTime.Shifted, false, "CustomIndex_2",
"14072011-204-td-ts", "Partner_V2", "Password", true, true,
DocumentType.StaticPdf, "Titel_Original2", "06092011-67-cui-ts")
AddDocumentCopyByName
Adds a document copy to a bundle. The document is referenced by its name in the repository.
AddDocumentCopyByName
SYNTAX
AddDocumentCopyByName(string objectName, string childId,
TextInsertionRule insertRule, string beforeInsertName, string afterInsertName, string conditionName, string defineSortName, string defineGroupName, string defineArchiveName, int numberOfCopies, string printerName, string formName, bool changingAllowed, OdinPrintTime printTime, bool doArchive, string customIndex, string copyLabel, string originalId, bool isVisible, string title)
AddDocumentCopyByName(string objectName, string childId,
TextInsertionRule insertRule, string beforeInsertName, string afterInsertName, string conditionName, string defineSortName, string defineGroupName, string defineArchiveName, int numberOfCopies, string printerName, string formName, bool changingAllowed, OdinPrintTime printTime, bool doArchive, string customIndex, string copyLabel, string originalId, bool isVisible, string title, OdinPrinterType printerType)
ARGUMENTS objectName Name of the document in the bundle. childId insertRule beforeInsertName
Freely definable document ID. This must be unique within the bundle.
TextInsertionRule
Available types
TextInsertionRule.Activated
TextInsertionRule.Deactivated
TextInsertionRule.Required
TextInsertionRule.Disabled
Name of the BeforeInsert script.
424
EXAMPLE afterInsertName conditionName defineSortName defineGroupName defineArchiveName Name of the DefinitionArchiving script. numberOfCopies printerName
Number of copies.
Printers formName changingAllowed printTime
Form name.
TRUE = The user can modify the document.
FALSE = The user cannot modify the document.
Printing time.
Available types
OdinPrintTime.Direct: Immediately
OdinPrintTime.Shifted: Shifted
OdinPrintTime.Unknown: Unknown
OdinPrintTime.Local: Local doArchive
Name of the AfterInsert script.
Name of the condition.
Name of the DefinitionSorting script.
Name of the DefinitionGrouping script. customIndex copyLabel originalId isVisible title
TRUE = Archive the document.
FALSE = Do not archive the document.
Freely definable index, for example, for subsequent queries.
Text on document copy.
Child ID of the original.
TRUE = Visible
FALSE = Invisible
Title of the document in the bundle.
If this parameter is set, it replaces the object name. printerType Printer type
Available types
OdinPrinterType.Online: Online printer
OdinPrinterType.Email:Email-Printer
If the parameter is not set, the printer type OdinPrinterType.Online is used.
AddDocumentCopyByName("Document_Copy", "ChildID_Copy",
TextInsertionRule.Activated, "BeforeInsertDocument",
"AfterInsertDocument", "True_Document","SortingDocument",
"GroupingDocument", "ArchivingDocument", 1 ,"Printer", "Form", true, OdinPrintTime.Shifted, false, "CustomIndex_K", "CopyLabel",
"ChildID_Original", true, "CopyTitle")
AddDocumentCopyByObjectID
Adds a document copy to a bundle. The document is referenced by its ID in the repository.
AddDocumentCopyByObjectId
SYNTAX AddDocumentCopyByObjectId(string objectName, string childId, TextInsertionRule insertRule, string
425
ARGUME
NTS
EXAMPLE beforeInsertOId, string afterInsertOId, string conditionOId, string defineSortOId, string defineGroupOId, string defineArchiveOId, int numberOfCopies, string printerOId, string formOId, bool changingAllowed, OdinPrintTime printTime, bool doArchive, string customIndex, string copyLabel, string originalId, bool isVisible, string title) objectOid childId insertRule
Name of the document in the bundle.
Freely definable document ID. This must be unique within the bundle.
TextInsertionRule
Available types
TextInsertionRule.Activated
TextInsertionRule.Deactivated
TextInsertionRule.Required
TextInsertionRule.Disabled beforeInsertOid afterInsertOid conditionOid defineSortOid
Object ID of the BeforeInsert script.
Object ID of the AfterInsert script.
Object ID of the condition.
Object ID of the DefinitionSorting script. defineGroupOid Object ID of the DefinitionGrouping script. defineArchiveOid Object ID of the DefinitionArchiving script. numberOfCopies Number of copies. printerOid Object ID of the printer. formOid Object ID of the form. changingAllowed TRUE = The user can modify the document.
FALSE = The user cannot modify the document. printTime doArchive customIndex copyLabel originalId isVisible
Printing time
Available types
OdinPrintTime.Direct: Immediately
OdinPrintTime.Shifted: Shifted
OdinPrintTime.Unknown: Unknown
OdinPrintTime.Local: Local
TRUE = Archive the document.
FALSE = Do not archive the document.
Freely definable index, for example for subsequent queries.
Text on copy.
Child Id of the original.
TRUE = Visible
FALSE = Invisible title Title of the document in the bundle.
If this parameter is set, it replaces the object name.
AddDocumentCopyByObjectId("Document_Copy","ChildId_Copy",TextInsert ionRule.Activated, "15072011-226-sc-ts", "15072011-227-sc-ts",
"10072011-186-cd-ts", "15072011-230-sc-ts","15072011-229-sc-ts",
"15072011-228-sc-ts", 1, "04092011-43-pr-ts", "18112011-482-fo-ts", true, OdinPrintTime.Shifted, false, "CustomIndexCopy", "CopyLabel",
"ChildID_Original", true, "Titlecopy")
426
Navigate
Enables you to navigate through the child objects of the current object.
Navigate
SYNTAX
ARGUMENTS
EXAMPLE
Navigate(onObjectScript, onlyActiveNodes, filterTypes) onObjectScript Script that executes for each of the specified object types found.
This script must have the context OnNavigateObject assigned.
onlyActiveNodes TRUE = Only navigates active objects.
FALSE = Navigates all objects. filterTypes Filter defining the objects to navigate.
Possible values
TextSystemObjectType.Variable
TextSystemObjectType.Block
TextSystemObjectType.DocumentReferences
Navigate("Scriptname", true, TextSystemObjectType.Block,
TextSystemObjectType.Variable)
SetArchiveAttribute
Sets an attribute for the archiving process.
SetArchiveAttribute
SYNTAX SetArchiveAttribute(name, value)
ARGUMENTS name Attribute name value Attribute value
EXAMPLE Refer to Identical archive attributes for all documents in a bundle.
SetDataContext
Defines the current data context. Scripts that contain SelVariable statements now address this dataset.
If dataid returns null or an empty string, the data context is reset. This means that SelVariable statements result in an error. An exception is thrown if no data context exists for the specified ID.
SetDataContext
SYNTAX SetDataContext(dataId)
ARGUMENTS dataId The ID of the data context to set
427
Context TextDocumentReference
About the context TextDocumentReference
Use this context for scripts assigned to documents in a bundle.
Properties of the context TextDocumentReference
The name in brackets is the name of the property in modus 4, which may also be used for reasons of maintaining downward compatibility.
Property
CustomIndex
Description
Use this property in connection with dynamic bundles to pass on values to inserted documents.
DoArchive
DocumentGroupIndex
DocumentGroupName Bundle name
Read-only property.
Expandable TRUE = Expandable
FALSE = Not expandable
ExpandableS Y = Expandable
N = Not expandable
Reads the name of the form assigned or sets the form by specifying a name. FormName
Grouping
InsertionRule
Grouping information
0 = Deactivated
1 = Required
2 = Activated
3 = Disabled
You can use this property in OnNavigateObject scripts.
IsActivated
TRUE = Archive
FALSE = Do not archive
BundleID
Read-only property.
IsCopy
MissingObjects
NumberOfCopies
PrinterName
Sorting
Title
Transportpools
TRUE = The document reference is activated in the bundle.
FALSE= The document reference is not activated in the bundle.
Read-only property.
Note IsActivated is true when the TextInsertionRule document property is set to
Required or Activated.
TRUE = Document is a copy.
FALSE = Document is an original.
Read-only property.
Comma-separated string containing the aliases of activated variable objects not found during document generation.
An empty string is returned when no missing objects exist.
Number of copies.
Name of the assigned printer.
Read-only property.
Sorting information
Name of the document the user sees in the PDC Client.
Pools whose variables are transferred to the PDC Client.
Scripts executed in the context TextDocumentReference can set variables of
TransportPools to transfer the variables of the specified pools to the PDC Client.
428
The evaluation of variables set in TransportPools is carried out in the end processing of a document.
The pools are defined by their names in a comma separated list. This can refer to pools that already exist, for example, ModusUser, and to pools created by the
MonaLisa command CreatePool.
Example setting in DefinitionArchiving
TransportPools = "MyPool,ModusUser"
The transfer of serialized pools is implemented as a sub element of the document structure in the element
<archiving>.
After end processing, the return structure of the document contains the sub element <archiving>.
<object title="Partner_Application" type="D" name="Partner_Application" index="02062008-823-tdr-itl1" reference="10DE6C09-79CF-4547-97AA-6302CF976185" state="1" enabled="1" print_asktime="0" form="TestForm" printer="" printer_type="" printtime="2" print_changeable="1" copycount="0"
copy="0" password="modus" filename="Partner_Application_10DE6C09-79CF-4547-97AA-
6302CF976185_O.docx">
<archiving>
<pools>
<pool name="MyPool">
<poolvar name="TESTVALUE" type="S">MyVariableInMyPool</poolvar>
</pool>
</pools>
</archiving>
</object>
Visible
VisibleS
ErrorMessage
InsertObject
InsertObjectS
(InsertObject)
TRUE = Visible
FALSE = Invisible
Y = Visible
N = Invisible
Error message. If a value is assigned, the generation aborts with the corresponding error message.
TRUE = Insert the object.
FALSE = Do not insert the object.
Y = Insert the object.
N = Do not insert the object.
IsInserted TRUE = Object was inserted.
FALSE = Object was not inserted.
Read-only property.
ObjectId (ObjectIndex) Object ID
Read-only property.
Objectname Object name
429
Read-only property.
Functions of the Context TextDocumentReference
DefinePrinterByName
Defines a printer by its name and type.
DefinePrinterByName
SYNTAX DefinePrinterByName(printerName)
ARGUMENTS printerName Printer name. printerType Printer type.
Possible values
ModusSuiteObjectType.Printer
Description
Online printer.
ModusSuiteObjectType.EMailPrinter Email printer.
ModusSuiteObjectType.OutsourcingPrinter Outsourcing printer. formName Form name. allowChange TRUE = The user can modify the printer.
FALSE = The user cannot modify the printer. printTime Printing time.
Possible values
OdinPrintTime.Direct
OdinPrintTime.Shifted
Description
Immediately
Shifted
OdinPrintTime.Unknown Unknown
OdinPrintTime.Local Local
DefinePrinterByOId
Defines a printer by its object ID.
DefinePrinterByOId
SYNTAX DefinePrinterByOId(printerOId, formOId, allowChange, printTime)
ARGUMENTS printerOID Object ID of the printer. formOID formName
Object ID of the form.
Form name. allowChange TRUE = The user can modify the printer.
FALSE = The user cannot modify the printer. printTime Printing time.
Possible values
OdinPrintTime.Direct
Description
Immediately
OdinPrintTime.Shifted Shifted
OdinPrintTime.Unknown Unknown
430
OdinPrintTime.Local Local
SetArchiveAttribute
Sets an attribute for the archiving process.
SetArchiveAttribute
SYNTAX SetArchiveAttribute(name, value)
ARGUMENTS name Attribute name value Attribute value
EXAMPLE Refer to Identical archive attributes for all documents in a bundle.
431
Context TextVariable
About the context TextVariable
Use this context for scripts assigned to text variables.
Generation of dynamic charts
Document Composition provides a property editor to predefine dynamic charts. The property editor
variable, that must be an image variable.
The TextVariable context provides functions and properties that enable you to define a dynamic chart.
These elements allow you to add data points to existing series (containing a collection of data points) to the predefined chart, which results in painting a chart for the according image variable when the document is generated.
Properties of the context TextVariable
The name in brackets is the name of the property in modus 4, which, for reasons of maintaining downward compatibility, may also be used.
Property
AttributeName
ChartDefinition
Content
DataLink
ErrorMessage
FormattedContent
HasChartDefinition
InsertObject
InsertObjectS (InsertObject)
IsFreeInput
IsFreeInputS (InputEnabled)
IsInputRequired
IsInputRequiredS
(InputRequired)
Description
Attribute name (database field or pool variable).
Read-only property.
Contains the ChartDefinitionXmlString provided by the dynamic chart editor.
Content of the variable.
Path to the data object or the name of a variable pool.
Read-only property.
Error message.
If a value is assigned, the generation aborts with the corresponding error message.
Formatted content of the variable.
Read-only property.
TRUE = A value is assigned to property ChartDefinition. Object Chart (see below) can be used.
FALSE = No value is assigned to property ChartDefinition.
TRUE = Insert the object.
FALSE = Do not insert the object.
Y = Insert the object.
N = Do not insert the object.
Evaluated when a value help is assigned.
TRUE = The user can also specify a value manually.
FALSE = The user can only select a value from the value help.
Evaluated when a value help is assigned.
Y = The user can also specify a value manually.
N = The user can only select a value from the value help.
TRUE = The variable is required.
FALSE = The variable is not required.
Y = The variable is required.
N = The variable is not required.
432
IsInserted
IsManual
IsManualS (Input)
ObjectId (ObjectIndex)
Objectname
ParentBlock
ParentDocument
Prompt
XPathExpression
TRUE = The object was inserted.
FALSE = The object was not inserted.
Read-only property.
TRUE = The user can input a value.
FALSE = The user cannot input a value.
Y = The user can input a value.
N = The user cannot input a value.
Object ID
Read-only property.
Object name
Read-only property.
Parent text block
Read-only property.
Parent document
Read-only property.
Prompt text for manual variables.
XPath Expression
Read-only property.
Object Description
Chart Allows you to modify dynamic chart values within a script.
Properties
Property Description
Chart.Title Sets or gets the first title of the chart.
Chart.Xml
Functions
AddDataPoint
Returns the deserialized chart object as an XML string.
Adds a data point to the series.
AddDataPoint
SYNTAX AddDataPoint(string seriesName, double xValue, double yValue);
ARGUMENTS seriesName Case-sensitive name of the series. xValue X-value of the data point. yValue Y-value of the data point.
RETURN
EXAMPLE
The new data point. dataPoint = Chart.AddDataPoint("MySeriesName", 0,
10)
AddLegend
Adds a legend to a chart area.
AddLegend
433
434
SYNTAX
ARGUMENTS
AddLegend(chartAreaName) chartAreaName Name of the chart area assigned to the legend.
RETURN
EXAMPLE
The added legend. legend = Chart.AddLegend("MyChartAreaName")
CreateDataPoint
Creates a data point and adds it to the specified series. You can use the returned object to specify the properties of the data point.
CreateDataPoint
SYNTAX CreateDataPoint(seriesName)
ARGUMENTS seriesName Name of the series to which the data point is created and added.
RETURN
EXAMPLE
The new data point. dataPoint = Chart.CreateDataPoint("MySeriesName")
ClearLegends
Clears all legend definitions of the chart.
ClearLegends
SYNTAX
ClearLegends()
EXAMPLE
Chart.ClearLegends()
ChartAreaExists
Checks whether the chart area with the provided name exists.
ChartAreaExists
SYNTAX ChartAreaExists(string chartAreaName)
ARGUMENTS chartAreaName Case-sensitive name of the chart area to check.
RETURN
EXAMPLE
TRUE = The chart area with the provided name exists.
FALSE = The chart area with the provided name does not exist. if (Chart.ChartAreaExists("MyChartAreaName"))
... end-if
SeriesExists
Checks whether the series with the provided name exists.
SeriesExists
SYNTAX SeriesExists(string seriesName)
ARGUMENTS seriesName Case-sensitive name of the series to check.
RETURN
EXAMPLE
TRUE = The series with the provided name exists.
FALSE = The series with the provided name does not exist. if (Chart.SeriesExists("MySeriesName"))
...
end-if
Datapoint Allows you to modify the properties of the data point.
Properties
Property Description
Datapoint.Exploded Sets or gets the custom property Exploded for the data point.
Is used, for example, in pie charts.
Datapoint.Font
Datapoint.Label
Datapoint.XValue
The font of the data point.
The label for the data point.
The X-axis value of the data point.
The Y-axis value of the data point. Datapoint.YValue
Functions
SetColor
Defines the color of the data point.
SetColor
SYNTAX
ARGUMENTS
EXAMPLE
SetColor(int red, int green, int blue)
SetColor(int red, int green, int blue, int alpha) red Red portion of the color. green Green portion of the color. blue Blue portion of the color. alpha Alpha value of the color. dataPoint.SetColor(41,91,207)
SetLabelForeColor
Defines the fore color of the label for the data point.
SetLabelForeColor
SYNTAX SetLabelForeColor(int red, int green, int blue)
ARGUMENTS
EXAMPLE red Red portion of the color. green Green portion of the color. blue Blue portion of the color. dataPoint.SetLabelForeColor(48,243,53)
ClearYValues
Resets the Y-axis values of the data point.
ClearYValues
SYNTAX ClearYValues()
435
Font
Legend
EXAMPLE datapoint.ClearYValues()
SetYValues
Defines the Y-axis values for the data point.
SetYValues
SYNTAX
ARGUMENTS
EXAMPLE
SetYValues(params object[] yValue) yValue Multiple y-values to set for the data point. dataPoint.SetYValues(180)
Allows you to modify the font properties
Properties
Property Description
Font.FontName Sets or gets the name of the font to use.
Example: Arial
Font.Size Sets or gets the size of the font.
Allows you to modify the properties of the legend
Properties
Property Description
Legend.DisplayInChartArea Determines if the legend displays within the chart area or outside in the common area of the chart.
Legend.Font
Legend.Title
Legend.TitleFont
Functions
AddToSeries
Sets or gets the font of the legend.
Sets the title of the legend.
The font of the title.
Adds the legend to a given series.
AddToSeries
SYNTAX AddToSeries(string seriesName)
ARGUMENTS
EXAMPLE seriesName Name of the series for which the legend will be used. legend.AddToSeries("MySeriesName")
SetForeColor
Defines the color of the legend.
SetForeColor
436
SYNTAX
ARGUMENTS
EXAMPLE
SetForeColor(int red, int green, int blue) red Red portion of the color. green Green portion of the color. blue Blue portion of the color. legend.SetForeColor(239,52,211)
SetPosition
Sets the position of the legend within the chart area.
SetPosition
SYNTAX
ARGUMENTS
EXAMPLE
SetPosition(position) position Position.
Possible values
Top
Right
Bottom
Left legend.SetPosition("Left")
Functions of the Context TextVariable
Navigate
Enables you to navigate through the child objects of the current object.
Navigate
SYNTAX
ARGUMENTS
EXAMPLE
Navigate(onObjectScript, onlyActiveNodes, filterTypes) onObjectScript Script that executes for each of the specified object types found.
This script must have the context OnNavigateObject assigned.
onlyActiveNodes TRUE = Only navigates active objects.
FALSE = Navigates all objects. filterTypes Filter defining the objects to navigate.
Possible values
TextSystemObjectType.Variable
TextSystemObjectType.Block
TextSystemObjectType.DocumentReferences
Navigate("Scriptname", true, TextSystemObjectType.Block,
TextSystemObjectType.Variable)
Sample Script: Generate a chart
Assign the script to the "BeforeInsert" event of the text block variable that is defined as a picture variable.
437
The predefined chart is assuming to have a series named "MySeriesName" and a chart area named
"MyChartAreaName". if(HasChartDefinition) if (Chart.ChartAreaExists("MyChartAreaName")) if (Chart.SeriesExists("MySeriesName"))
Chart.ClearLegends()
legend = Chart.AddLegend("MyChartAreaName")
legend.AddToSeries("MySeriesName")
legend.DisplayInChartArea = false
legend.SetForeColor(239,52,211)
legend.Title = "The Legend"
legend.SetPosition("Left")
font = legend.Font
font.Size = 11
font.FontName = "Algerian"
legend.Font = font
font = legend.TitleFont
font.Size = 17
font.FontName = "Algerian"
legend.TitleFont = font
dataPoint = Chart.CreateDataPoint("MySeriesName")
dataPoint.XValue = 0
dataPoint.YValue = 90
dataPoint.Label = "90°"
dataPoint.SetColor(41,91,207)
dataPoint = Chart.CreateDataPoint("MySeriesName")
dataPoint.XValue = 0
dataPoint.SetYValues(180)
dataPoint.Label = "180°"
dataPoint.SetColor(52,192,239)
dataPoint.SetLabelForeColor(48,243,53)
dataPoint.Exploded = true
dataPoint = Chart.AddDataPoint("MySeriesName", 0, 10)
dataPoint.Label = "10°"
dataPoint.SetColor(152,192,239)
dataPoint.SetLabelForeColor(48,243,70)
; After all modifications have been done, assign the context object’s XML to the textblock variable property Content in order to get the chart generated when generating the document.
Content = Chart.Xml end-if end-if end-if
438
439
Context XsdSetXmlData
About the context XsdSetXmlData
Use this context for scripts assigned to an XSD selection object.
The script is executed if the DataSelectionManager component retrieves XSD selection data.
Properties of the context XsdSetXmlData
Property Description
XmlData Contains the business data of an XSD selection object.
The script assigns an XML string.
Sample Script XsdSetXmlData
;selection parameter are available in the systempool id = System.CustomerId
;do something to acquire the xml from an external DB, file share etc.
;...
;finally assign the xml string to the context property "XmlData"
XmlData = "<customer><id>"+ id
+"</id><surname>John</surname><lastname>Doe</lastname></customer>"
440
Script Order
The following figure shows the order in which scripts and conditions execute in a bundle
Bundle
AfterDataRetrieval
__________
------------------------->Query manual variables
of all active objects
OnGetManualVariable
BeforeCreatingDocuments
InitializeDocumentCreation
DocumentReference
BeforeInsert
Condition
Document
Load
Condition
Text Block
BeforeInsert
Condition
Variable
BeforeInsert
Condition
AfterInsert
Child Text Block
BeforeInsert
Condition
AfterInsert
Variable
BeforeInsert
Condition
AfterInsert
AfterInsert
Unload
------------------------> DocX created
DefinitionSorting
DefinitionGrouping
DefinitionArchiving
AfterInsert
441
AfterCreateDocuments
__________ _____________________________
BeforePrintingAndArchiving
InitializePrintAndArchive
BeforePrintingDocument
442
Alias Tables
About alias tables
Alias tables enable you to store assignments for variable text blocks or variable documents.
Create an alias table
Complete the following steps to create an alias table for a variable text block or an variable document.
1. In the bottom pane of the Navigator, right-click and click New > Alias Table.
2. In the Create New Alias Table dialog box, type a name for the alias table and click OK.
3. On the Lookup alias table tab, click the New Key button.
4. In the Create New Key dialog box, type the value contained in the corresponding variable for the key and click OK.
Example
A variable contains a country code. Depending on the value of this variable, a different text block is inserted into a document.
Create a key for every single possible value of the variable, for example DE, GB, NL, FR.
5. In the Editor window, select a key.
6. On the Lookup alias table tab, click the New Reference button.
7. In the Select an object dialog, select the text block or the document you want to insert when the variable contains the value of the key.
For more information, refer to Define a variable text block and Define a variable document.
443
Lookup Tables
About lookup tables
Lookup tables enable you to specify value assignments to replace variable contents during document creation.
Create a lookup table
To create a lookup table, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Lookup Table.
2. In the Create New Lookup Table dialog box, type a name for the lookup table and click OK.
3. In the Editor window, type the value pairs in the following format
Variable content=value to be inserted
Note Type each value pair on a separate line.
Example
A variable contains a salutation code. Create the following value pairs for the variable.
001=Mrs.
002=Mr.
003=Company
If this lookup table is assigned to a text block variable that contains the value 003, the content of the variable is replaced with the content Company.
444
Transfer Jobs
About transfer jobs
Transfer jobs are a collection of objects you want to transfer to another system.
Use the System Administration to define the available target systems.
Transfer of versioned objects
You can transfer both work versions and release versions to other systems.
To allow the import of work versions, open the System Administration and set the Import Work
Versions property of the appropriate system to True.
On transfer, the object in the target system receives the same version number as the object in the source system.
Transfer of release versions
If the version number of the object in the source system is equal or lower than in the target system, the transfer does not execute for this object.
If the version number of the object in the source system is higher than in the target system, the transfer executes for this object.
If the object in the target system is logically deleted, the following rules apply.
If the version number of the object in the source system is lower than in the target system, the transfer does not execute for this object.
If the version number of the object in the source system is equal to the version number in the target system, the object undeletes in the target system.
If the version number of the object in the source system is higher than in the target system, the transfer executes for this object. The object undeletes in the target system.
Transfer of work versions
If the version number of the object in the source system is lower than in the target system, the transfer does not execute for this object.
If the version number of the object in the source system is equal to the version number in the target system, the following rules apply.
If the timestamp (last modified at) in the source system is newer than in the target system, the transfer executes for this object.
Important
The transfer is not revocable for this object!
If the timestamp (last modified at) in the source system is older than in the target system, the transfer does not execute for this object.
If the version number of the object in the source system is higher than in the target system, the transfer executes for this object.
If the object in the target system is logically deleted, the following rules apply.
If the version number of the object in the source system is lower than in the target system, the transfer does not execute for this object.
If the version number of the object in the source system is equal to the version number in the target system, the object undeletes in the target system. The following rules apply.
445
If the timestamp (last modified at) in the source system is newer than in the target system, the transfer executes for this object.
Important
The transfer is not revocable for this object!
If the timestamp (last modified at) in the source system is older than in the target system, the transfer does not execute for this object.
If the version number of the object in the source system is higher than in the target system, the transfer executes for this object. The object undeletes in the target system.
Transfer History
For more information, refer to Transfer History.
Revoke a transfer
For more information, refer to Revoke a transfer.
Create a transfer job
To create a transfer job, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Transfer Job.
2. In the Create New Transfer Job dialog box, type a name for the transfer job and click OK.
3. From the Navigator pane, drag the required objects to the left-hand pane of the Editor window.
4. Select the objects that might contain child objects that are not yet included in the transfer job. Then, on the Object Transfer tab, in the Edit group, click the Show required objects button.
5. In the Object 'XY' references the following objects dialog box, select the objects that you want to add to the transfer job.
6. In the right-hand pane of the Editor window, select the required target systems.
7. Optional. To flag objects as write-protected in the target system, in the right-hand pane of the Editor window, select the Set Write Protection check box.
8. To start the transfer, on the Object Transfer tab, under Execute, click the Execute button.
Note If version control is not licensed, existing objects in the target system will be overwritten.
Transfer status
After executing a transfer, in the Editor window, the Status column displays a transfer status icon for each object.
Icon Description
Transfer successfully executed.
Transfer to at least one system not executed.
For more information refer to the transfer log file. Path and name of the log file display in the Output window.
Transfer failed. Check the error message in the Output pane.
446
Create a scheduled transfer job
To create a scheduled transfer job, complete the following steps.
Prerequisites
You must have a Versioning license to create scheduled transfer jobs.
The user assigned to the modus_core Windows service must have user role access to the intended target system of the scheduled transfer.
1. In the bottom pane of the Navigator, right-click and click New > Transfer Job.
2. In the Create New Transfer Job dialog box, type a name for the transfer job and click OK.
3. From the Navigator pane, drag the required objects to the left-hand pane of the Editor window.
4. Select the objects that might contain child objects that are not yet included in the transfer job. Then, on the Object Transfer tab, in the Edit group, click the Show required objects button.
5. In the Object 'XY' references the following objects dialog box, select the objects that you want to add to the transfer job.
6. In the right-hand pane of the Editor window, select the required target systems.
7. Optional. To flag objects as write-protected in the target system, in the right-hand pane of the Editor window, select the Set Write Protection check box.
8. On the Object Transfer tab, in the Execute group, click the Schedule button.
9. In the Schedule Transfer dialog box, select the deferred execution date and time for the scheduled transfer.
Note The date can be specified to the nearest hour.
10. Click OK.
Notes
At the specified time, the transfer process starts the transfer job.
An Administration Function allows you to edit or delete scheduled transfers.
Export objects
If you need to transfer individual objects or complete systems to another computer, you can export them to a file system and import them into the target computer.
To export objects, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Transfer Job.
2. In the Create New Transfer Job dialog box, type a name for the transfer job and click OK.
3. From the Navigator pane, drag the required objects to the left-hand pane of the Editor window.
4. Select the objects that might contain child objects that are not yet included in the transfer job. Then, on the Object Transfer tab, in the Edit group, click the Show required objects button.
5. In the Object 'XY' references the following objects dialog box, select the objects that you want to add to the transfer job.
6. To start the export, on the Object Transfer tab, under Execute, click the Export button.
447
7. In the Export to File System dialog box, type a name for the subdirectory where you want to export the objects.
Note This directory appears directly below the RWS work directory. Its name is a combination of the computer and user name as well as the date and time.
For information about importing objects, refer to Repository Import.
Transfer job editor tools
Icon Name
Execute
Description
Starts the transfer.
Export Starts the export to the file system.
Schedule
Cancel
Add
Creates a scheduled deferred transfer.
Cancels a running transfer.
Opens a dialog where you can select objects you want to add to the transfer.
Remove
Show required objects
Create Release
Version
Refresh
Removes the selected object from the transfer job.
Shows the objects required by the selected objects.
Creates release versions for all selected objects in the transfer.
If no objects are selected, release versions are created for all work versions in the transfer.
Refreshes the transfer objects.
448
Value Helps
About value helps
Value helps assist users when typing input into manual variables.
Static Value Helps
About static value helps
Static value helps provide equal input options on each occurrence of a manual variable.
Create a text box with input mask value help
This value help type allows you to specify an input mask to define how to insert input into manual variables.
To create a text box with input mask value help, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Value Help.
2. In the Create New Value Help dialog box, type a name for the value help and click OK.
3. In the Value Help Types dialog box, select Text Box with Input Mask and click OK.
4. In the Input Mask box, type the input mask using the required Formatting Characters.
A a
C c
0
9
#
\
L
I
Character Meaning in the Input Mask
! Specifies that optional characters are displayed as leading spaces in the input mask. If ! is not specified, optional characters are displayed as trailing spaces in the mask.
>
<
<>
Converts all following characters to uppercase until the end of the mask is reached or the character < is detected.
Converts all following characters to lowercase until the end of the mask is reached or the character > is detected.
If both signs are used together, no case sensitivity check is made. The data specified is formatted in exactly the same way a user types it.
Specifies that the subsequent character is displayed as a placeholder in the input mask.
Specifies that only letters are valid entries (A-Z, a-z). An entry is not required.
Specifies that only alphanumeric characters are valid (A-Z, a-z, 0-9). An entry is not required.
Any character is allowed. An entry is not required.
Specifies that only numeric characters are valid. An entry is not required.
:
/
Specifies that only a numeric character or a plus or minus sign is allowed. An entry is not required.
A colon separates hours, minutes, and seconds in defining a time.
If a different character is specified in the Windows regional settings, that character displays instead of a colon.
A slash separates the date entries day, month, and year from each other.
If a different character is specified in the Windows regional settings, that character displays instead of the slash.
449
; A semicolon separates the three mask parameters from each other.
_ The underline character _ automatically inserts a space in the text. The cursors skips over these characters when data is typed.
5. You can use any characters not listed in the above table as placeholders for input.
6. These characters are inserted automatically and skipped by the cursor on data entry.
7. The special mask characters listed in the table above can also be used as placeholders as long as the "\" character is specified first.
8. Optional. In the Mask Test box, type a value to test how the input mask affects the specified variables.
9. Optional. In the Description box, type a description.
10. On the Value Help tab, click the Test Value Help
11. In the Test Value Help dialog box, test the input mask.
button.
Create a drop-down value help
This value help type allows you to define a list of values that display in a drop-down menu during manual variable input.
To create a drop-down value help, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Value Help.
2. In the Create New Value Help dialog box, type a name for the value help and click OK.
3. In the Value Help Types dialog box, select Drop-down.
4. In the Entries in the selection list box, type the list of required values with each value on a separate line.
Note You can also define values in the form of [ModusUser.AttributeName].
5. Optional. To display the list in alphabetic order, select the Sort List check box.
6. Optional. In the Description box, type a description.
7. On the Value Help tab, click the Test Value Help
8. In the Test Value Help dialog box, test the input mask.
button.
Create a popup calendar value help
This value help type provides a calendar as a way to select a date.
To create a popup calendar value help, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Value Help.
2. In the Create New Value Help dialog box, type a name for the value help and click OK.
3. In the Value Help Types dialog box, select Popup Calendar.
4. In the Predefined Formats list, select the preferred date format from the following options.
Long Date in the form of Monday, 5.November 2011
Short Date in the form of 05.11.2011
Custom User-defined date format
In the Self-defined format box, type the preferred date format.
You can use any of the following definitions to set up a custom date format.
450
Definition Result
dd Day, numeric two digits ddd dddd
MM
MMM
MMMM yy yyyy hh mm ss
Name of the weekday (abbreviated)
Name of the weekday (full)
Month, numeric two digits
Name of the month (abbreviated)
Name of the month (full)
Year, numeric two digits
Year, numeric four digits
Hours
Minutes
Seconds
Example
dddd, MMMM dd, yyyy hh:mm:ss
Result
Tuesday, November 05, 2013 10:58:59
5. Optional. In the Description box, type a description.
6. On the Value Help tab, click the Test Value Help
7. In the Test Value Help dialog box, test the input mask.
button.
Create a numeric input field value help
Use this value help type to define the value range of a numeric variable.
To create a numeric input field value help, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Value Help.
2. In the Create New Value Help dialog box, type a name for the value help and click OK.
3. In the Value Help Types dialog box, select Numeric Input Field.
4. In the Minimum Value box, specify the minimum value for the variable.
5. In the Maximum Value box, specify the maximum value for the variable.
6. In the Number of decimal places box, specify the number of decimal places.
7. In the Increment box, specify the value of the individual increment steps.
8. Optional. In the Description box, type a description.
9. On the Value Help tab, click the Test Value Help
10. In the Test Value Help dialog box, test the input mask.
button.
Create a multiline text box value help
Use this value help type to type multiple lines of text when specifying the variable value.
To create a multiline text box value help, complete the following steps.
451
1. In the bottom pane of the Navigator, right-click and click New > Value Help.
2. In the Create New Value Help dialog box, type a name for the value help and click OK.
3. In the Value Help Types dialog box, select Multiline Textbox.
4. Optional. To restrict the text length, select the Restrict text field input check box and specify the value in the Maximum Text Length box.
5. Optional. Type an explanatory text in the Description field.
6. On the Value Help tab, click the Test Value Help
7. In the Test Value Help dialog box, test the input mask.
button.
Dynamic Value Helps
About dynamic value helps
Dynamic value helps extend static value helps by allowing value definition at runtime. This feature prevents the presentation of inapplicable input options to the end user.
The processing of dynamic value help is carried out by scripts executed in the ManualVariable context.
When manual variables are queried, the OnGetManualVariable event executes for each variable.
452
Word User Interfaces
About Word user interfaces
Word User Interfaces enable you to restrict user editing functions when finishing documents in Word.
To do this, you need to assign the Word User Interface to a document in a bundle.
Create a Word user interface
To create a Word user interface, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Word User Interface.
2. In the Create New Word User Interface dialog box, type a name for the Word user interface and click OK.
3. To insert a template, on the Word User Interface Tools tab, click the Load XML
Template
button.
4. Modify the template according to your specific requirements.
For more information, refer to the Microsoft documentation.
5. Optional. To format the code, on the Word User Interface Tools tab, click the Format
XML
button.
6. To check the code, on the Word User Interface Tools tab, click the Check XML button.
7. Optional. In the Object Inspector pane, type a free text description for the Description property.
Assign a Word user interface to a document
To assign a Word user interface to a document, complete the following steps.
1. Open the bundle that contains the respective document.
2. In the Editor window, click the document.
3. In the Object Inspector pane, click the Word User Interface property and click the ellipsis button next to the property.
4. In the Select an object dialog box, select a Word user interface and click the Select button.
453
Word Templates
About Word templates
To work with Word templates, the user must possess the Word Template (74) object right.
Document Composition supports the import of Word templates, allowing you to load a Normal.dotm into the system.
You can use Word templates to specify the Normal.dotm you want to use in a particular system. You are able to edit the Normal.dotm as an object in Studio and to export the file for external use.
You can assign a specific Word template containing a Normal.dotm to each system. Without an assignment, Document Composition uses the template specified in the Document Composition configuration. For more information, refer to Assign a Word Template.
You can transfer or export Word templates into any other system. After being assigned, these Word templates are ready for use in the target system. For more information, refer to Assign Word Template.
A Normal.dotm template contains styles you can use in a Word document. Each new document you create in Word will use this template until you select a different, specific template file.
Document Composition utilizes Normal.dotm in various situations. When organizing document creation, take care to provide the appropriate Normal.dotm during the steps of document processing.
Creating new objects and modifying existing objects in Composition Studio. When you create documents with a Normal.dotm different from the one used for text administration, document styles differ accordingly.
Generating documents. You have to use identical Normal.dotm templates for creation and final generation of documents.
Re-working generated documents in the Client. You have to use identical Normal.dotm templates on the client computer used for re-working and on the server used for creation.
Note We recommend to use only self-defined styles of a Normal.dotm template in Document
Composition.
The use of standard styles may cause issues when you work with multiple languages or when standard styles are changed.
Microsoft Word does not assign a consistent ID for standard styles used in additional languages.
Microsoft Word does not reset standard styles after the cancellation of additional definitions.
Create a Word template
To create a Word template, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Word Template.
2. In the Create New Word Template dialog box, type a name for the Word template and click OK.
3. On the Editor Tools tab, click the Import Word Template
4. In the Open dialog box, select a Word document template.
button.
5. Optional. In the Object Inspector pane, type a free text description for the Description property.
6. In Composition Studio, save the Word template.
7. Assign the Word template to a system.
2
Modify a Word template
To modify a Word template, complete the following steps.
1. Open a Word template.
2. On the Editor Tools tab, click the Show Word Document
3. Modify the document styles.
Note The Word document should remain empty.
4. In Composition Studio, save the Word template.
button.
Note When a text administrator saves changes to a word template assigned to a specific system, these changes are immediately visible to him.
As another text administrator working with the studio on a different machine in the same system, you initially will not recognize the changes made to the word template.
Complete one of these steps to be able to see the changes.
Restart the Studio.
Switch to another system and then switch back to the previously used system.
Export a Word template
Document Composition supports the export of Word templates, allowing you to save a template object of the system as a Normal.dotm file.
To export a Word template, complete the following steps.
1. Open a Word template.
2. On the Editor Tools tab, click the Export Word Template button.
In the Save as dialog box, select a directory, type a name for the file in the File name box, and then click
Save.
3
Processes
About Processes
The process object enables you to make simple graphical representation of processing sequences.
The process designer provides you with a graphical user interface to create, save, and edit models of your work processes.
A distinction is made between "Standard Processes" that control processes and sequences within
Composition Studio and "MWS Processes" that control processes and sequences in the Document
Composition Client.
Create a process
To create a process, complete the following steps.
5.
6.
7.
1. In the bottom pane of the Navigator, right-click and click New > Process.
2. In the Create New Process dialog box, type a name for the process and click OK.
3. In the Process Selection dialog box, select one of the following options.
4. Optional. In the Object Inspector pane, edit the properties of the process.
From the Toolbox, drag the preferred modules to the Editor window.
In the Editor window, position and connect the process designer modules as preferred.
From the Toolbox, drag the preferred components to the Editor window.
8.
9.
10.
In the Process Designer Tools tab, click the Compile button.
Observe success or failure messages in the Output pane.
Properties of a standard process
Property Description
Description Free text description.
Context
The context of a standard process is always Process.
OnError Script that executes in case of an error.
Context: OnProcessError
Objectname Name of the process.
Properties of an MWS process
Property
Description
Context
OnGetInfoScript
OnNewProcessScript
Description
Free text description.
The context of a MWS process is always MwsProcess.
Script called by the Process_GetInfo. function The script sets information for activities.
Script that executes when a new process is created.
4
OnProcessEndScript Script that executes when a process is closed using Process_Close.
OnSetOptionsScript
OnStatusChangeScript Script that executes when the structure of the business component is modified.
ProcessRootDirectory Used to specify the directory where MWS process data is stored.
The specification can also contain variables, for example "$server\processes".
The temporary directory is used if this property is empty.
OnError
Script that executes when XML options are set for activities.
This always refers to external information that has nothing to do with the MWS process itself.
Objectname
Script that executes in case of an error.
Context: OnProcessError
Name of the process.
Process Designer Tools
The toolbar provides you with a number of functions for editing processes.
Icon Name
Align
Description
Adjusts the horizontal and vertical position of blocks.
Cut Deletes the selected object and copies it to the clipboard.
Copy
Paste
Undo
Repeat
Compile
Execute
Copies the selected object.
Inserts an object from the clipboard.
Undoes the last action.
Repeats the last action.
Compiles the process.
Runs the process.
Stop
Pause
Cancel
Zoom In
Stops the process.
Pauses the process.
Cancels the process.
Zooms in the editor window.
Zoom out
Normal Size
Adjust
Zooms out the editor window.
Returns the view of the editor window to normal size.
Fits the size of the view of the editor window to make all process blocks visible.
5
6
Process Designer Modules
Areas of a process module
Port
Connection point to other modules
Name
Freely definable module name
Can automatically display the name of the attached script
Border
Port
Connection point to other modules
Check
A check module can contain one ore more sequentially checked conditions.
Properties of a check module
Property name Description
Check Type
First: One of the conditions defined must return True for processing to continue.
Any: Any of the conditions defined must return True for processing to continue.
Icon
Grip
Surface
Allows you to modify the module size
Container
Used to hold other modules
(Only for containermodules)
7
Condition
Conditions group in a check module. This defines the order in which conditions are checked.
Properties of a condition module
Description Property name
Condition
Condition
Type
Condition object.
Type
Complex
Effect
This condition type corresponds to an IF-query.
WhenNone Choose this condition type if none of the complex type conditions in the check module apply and you need the check module to react to this. You can then assign a script to the condition to pass on an error message.
WhenAny
WhenAll
Choose this condition type if one of the complex type conditions in the check module apply and you need the check module to react to this.
Choose this condition type if all of the complex type conditions in the check module apply and you need the check module to react to this.
Optional explanatory text. Description
IF-Check
IF-ELSE-Check
An IF-ELSE-Check comprises of a
The first condition is set by default to the condition type Complex and corresponds to the If-query.
The second condition is set by default to the condition type WhenNone and corresponds to the Elsequery.
Comment
Use comment modules to add explanatory text to the process.
Loop
A loop module enables you to repeat a sequence of steps up to the point the condition is no longer valid.
Properties of a loop module
Property name Description
Condition Condition object
Description Optional explanatory text
8
Script Execution
A script execution module functions as a placeholder for a script and makes starting a script from a process possible.
Note If the script name exceeds a certain length, it truncates for clarity. Right-click the script and click
Show Complete Name to display the full name.
Properties of a script execution module
Property name Description
Script Script object
Description Optional explanatory text
Universal Timer
A universal timer module can contain any kind of Process Designer modules and enables you to run processes within a specific time frame.
Properties of a universal timer module
Property name Description
Script Script object
OnError
Description
Enabled
Interval
Synchronous
UniversalTimer
Script that executes in case of an error.
Optional explanatory text
TRUE: the timer is active
FALSE: the timer is not active
Interval between two timer events in milliseconds
TRUE: synchronous timer operating mode
FALSE: asynchronous timer operating mode
To create at timer, complete the following steps.
1. Double-click the UniversalTimer property.
2. Click the ellipsis button to the right of the UniversalTimer property.
3. In the Settings dialog box, specify the timer settings.
Position and Connect Process Designer Modules
About positioning and connecting process modules
You can drag process modules from the Toolbox to the Editor window.
You can drag existing scripts directly from the Navigator to the Editor window.
You can drop a process module as soon as you move it towards another process module. This is signaled by the existing process module by changing the color of its frame.
Examples: Add modules to a process
Add a loop to a process
To add a loop , complete the following step.
9
From the Toolbox, drag a loop module to the Editor window.
Insert a script execution in the loop
To insert a script execution in the loop, complete the following steps.
1. From the Toolbox, drag a script execution module to the loop in the Editor window and drop the script execution exactly onto the light green area of the loop.
2. In the Object Inspector pane, click the Script property and click the ellipsis property.
3. In the Select an object dialog box, select the preferred script and click Select.
button next to the
Insert another script execution in the loop
To insert another script execution in the loop, complete the following steps.
1. From the Toolbox, drag a script execution module to the loop in the Editor window. Depending on whether you want to position the script execution before or after the first script, move it towards the top edge or bottom edge of the script, then drop the script execution when the border of the first script changes to red dashes.
2. In the Object Inspector pane, click the Script property and click the ellipsis property.
3. In the Select an object dialog box, select the preferred script and click Select.
button next to the
Insert a script execution as loop successor
To insert a script as loop predecessor or successor, complete the following steps.
10
1. From the Toolbox, drag a script execution and move it towards the top edge or the bottom edge of the loop until the border changes its appearance to red dashes, then drop it.
Note This change in appearance signals that the loop accepts the script as a predecessor or successor.
2. In the Object Inspector pane, click the Script property and click the ellipsis property.
3. In the Select an object dialog box, select the preferred script and click Select.
button next to the
Notes
Predecessor and successor means that the script is on the same hierarchy level as the loop.
A predecessor is signaled by an arrow running from the bottom edge of the script to the top edge of the loop.
A successor is shown by an arrow running from the bottom edge of the loop to the top edge of the script.
Example
Move a script between two already linked scripts
To move Script_3 from its logical position as loop successor and insert it between scripts 1 and 2, perform the following step.
11
Press CTRL and drag Script_3 to a position between Script_1 and Script_2 until the borders of both scripts change their appearance to red dashes, then drop Script_3.
Move a script to a position outside the loop
To use Script_3 as a predecessor of the loop, complete the following step.
Press CTRL and drag Script_3 over the top edge of the loop until the border changes to red dashes, then drop Script_3.
Insert a script between a script and a loop
To insert Script_2 between Script_3 and the loop, complete the following step.
12
Press CTRL and drag Script_2 to a position between the loop and Script_3 until the borders of both these two objects change to red dashes, the drop Script_2.
Insert a script back in a loop
To insert Script_2 back in the loop before Script, complete the following step.
Press CTRL and drag Script_2 over the top edge of Script inside the loop until the border of Script changes its appearance to red dashes, then drop Script_2.
Arrange conditions in succession
To arrange conditions in succession, complete the following steps.
1. From the Toolbox, drag a condition module to the Editor window.
2. In the Object Inspector pane, edit the properties of the condition module.
3. From the Toolbox, drag another condition module to the border of the first condition module so that the border changes its appearance to red dashes and a small PLUS sign displays, then drop the condition to position it after the first condition.
13
4. In the Object Inspector pane, edit the properties of the second condition module.
Nest conditions
To nest conditions, complete the following steps.
1. From the Toolbox, drag a condition module to the Editor window.
2. In the Object Inspector pane, edit the properties of the condition module.
3. From the Toolbox, drag another condition module inside the border of the first condition module.
Note The border stays as a black line.
4. Optional. Drag other objects, for example a script, into the condition module.
Note These objects execute if the condition is valid.
14
Process Designer Components
About Process Designer Components
Process Designer components provide a process with the necessary properties and functions to perform the specific processing tasks for which the process is designed.
DataSelectionManager
About DataSelectionManager
You must have an Xdata license installed to use the DataSelectionManager component.
This component enables you to execute data retrieval defined by an Xdata selection in a process.
Properties of the DataSelectionManager
Property
DebugMode
Description
TRUE = Run the selection in the debugger.
FALSE = Do not run the selection in the debugger.
LastError
NavigatorXml
Returns the error message of the last executed data collection as a string. An empty string is returned when no error exists.
If the function GetDataExtended is called with the parameter writeNavigatorXml = True, you can access the navigation XML here.
For more information, refer to GetDataExtended .
SelectionReference Defines the selection the component executes.
Selection parameters pass on with the help of system pool variables. For more
information, refer to the sample script .
SystemOId If a system OID is set, the selection is either taken from the corresponding system or from the same system as the process itself.
ElapsedMilliseconds Returns the duration of last executed data collection in elapsed milliseconds as long.
XmlData Returns the XML of the last executed data collection as a string.
DataSelectionManager Functions
GetData
Executes data retrieval.
GetData
SYNTAX
ARGUMENTS
GetData(raiseError) raiseError TRUE = An error is thrown if a reading script tries to read a data object with
SelVariable that does not exist.
FALSE = No error is thrown if a reading script tries to read a data object with
SelVariable that does not exist.
<> 0 if an error occurred. RETURN
GetDataExtended
Executes data retrieval.
15
GetDataExtended
SYNTAX GetDataExtended(raiseError, writeNavigatorXml)
ARGUMENTS raiseError TRUE = An error is thrown if a reading script tries to read a data object with SelVariable that does not exist.
FALSE = No error is thrown if a reading script tries to read a data object with SelVariable that does not exist. writeNavigatorXml TRUE = The navigation schema is written to the NavigatorXml property when data retrieval executes.
FALSE= No navigation schema is written.
RETURN <> 0 if an error occurred.
LoadSelection
Sets the selection reference used by the next data retrieval.
LoadSelection
SYNTAX LoadSelection(selectionReference)
ARGUMENTS selectionReference Selection reference.
LoadSelectionByName
Loads a selection specified by name and optionally by type.
LoadSelectionByName
SYNTAX LoadSelectionByName(selectionName, objectType)
ARGUMENTS selectionName Name of the selection.
EXAMPLE objectType
Possible values
ModusSuiteObjectType.Selection (default value if the parameter is not specified)
ModusSuiteObjectType.XsdSelection
This parameter is optional. The default value is
ModusSuiteObjectType.Selection.
LoadSelectionByName("Invoice")
LoadSelectionByName("Invoice", ModusSuiteObjectType.XsdSelection)
LoadSelectionByOId
Loads a selection specified by object ID and optionally by type.
LoadSelectionByOId
SYNTAX LoadSelectionByOId(selectionOId, objectType)
ARGUMENTS selectionOId Object ID of the selection. objectType
Possible values
ModusSuiteObjectType.Selection (default value if the parameter is not
16
EXAMPLE
WriteXml
Saves the XML from the last data collection to a file.
TrimStart
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
WriteXml(fileName, prettyXml) fileName Name of the file the XML saves prettyXml Defines whether the XML saves in a readable (indented) format
<> 0 if an error occurred.
Selection = ModusProcess.GetComponent("DataSelectionManager")
Selection.GetData(true)
Selection.WriteXml("c:\sel.txt", true) specified)
ModusSuiteObjectType.XsdSelection
This parameter is optional. The default value is
ModusSuiteObjectType.Selection.
LoadSelectionByOId("15072011-226-sc-ts")
LoadSelectionByOId("15072011-226-sc-ts",
ModusSuiteObjectType.XsdSelection)
Sample Script DataSelectionManager
SelManager = ModusProcess.GetComponent("DataSelectionManager")
;Insert selection parameter in the System pool
System.CustomerId = "0815"
;Execute selection
Res = SelManager.GetData(False)
;Save xml result into a file
OutputFileName = "c:\temp\" + System.CustomerId + ".txt"
SelManager.WriteXml(OutputFileName, true)
; Assign xml result to a local variable myStringVariable = SelManager.XmlData
17
DocumentCollectionManager
About DocumentCollectionManager
This component enables you to generate documents from a bundle and to forward them to other downstream systems in a process.
Properties of the DocumentCollectionManager
Property
BundleSystemOId
Description
Reads or sets the system OID of the system from which the bundle loads.
DocumentCollection
MissingObjects
Specifies the bundle you want to create.
Comma-separated string containing the objects not found during document generation.
An empty string is returned when no missing objects exist.
InsertTextComponentIndicators TRUE = Insert text block indicators.
FALSE = Do not insert text block indicators.
InsertCustomUI
IsDocumentCollectionLoaded
TRUE = Assign a CustomUI object to an inserted document.
FALSE = Do not assign a CustomUI object.
TRUE = A bundle was loaded.
FALSE= No bundle was loaded.
DestinationDirectory Target directory for document generation.
DocumentCollectionManager Functions
AssignData
Assigns data to a data reference.
AssignData
SYNTAX
ARGUMENTS
EXAMPLE
AssignData(dataId, xmlData) dataId Data ID xmlData XML
AssignData(System.DataId, System.LastXml)
CreateDocuments
Executes document generation.
CreateDocuments
SYNTAX CreateDocuments()
DefinePrinterForBundleByName
Defines a printer and print time for all references of the bundle.
DefinePrinterForBundleByName
18
SYNTAX
ARGUMENTS
DefinePrinterForBundleByName(printerName, printerType, printTime)
DefinePrinterForBundleByName(printerName, printerType, printTime, formName) printerName Printer name. printerType Printer type.
Possible values
ModusSuiteObjectType.Printer
ModusSuiteObjectType.EMailPrinter
Description
Online printer.
Email printer.
ModusSuiteObjectType.OutsourcingPrinter Outsourcing printer. printTime Printing time.
Possible values
OdinPrintTime.Direct
Description
Immediately
OdinPrintTime.Shifted Shifted
OdinPrintTime.Unknown Unknown
OdinPrintTime.Local Local formName Form name.
GetDataReferenceEnumerator
Returns an enumerator containing all text data references.
GetDataReferenceEnumerator
SYNTAX GetDataReferenceEnumerator()
RETURN Enumerator with the following properties and functions.
Objectname Object name.
IsAssigned
IsActiveDataSelection TRUE = Active selection (data is actively retrieved).
FALSE = Not an active selection.
IsPassiveDataSelection TRUE = Passive selection (data is not actively retrieved).
FALSE = Not a passive selection.
Assign(xml)
TRUE = Data is already assigned to the data reference.
FALSE = No data is assigned to the data reference.
GetXml()
Assigns data to the data reference. xml: XML string.
Returns the data XML of this data reference or an empty string if no data is assigned.
GetManualVariables
Returns an XML string containing the manual variables of all original documents.
GetManualVariables
SYNTAX GetManualVariables()
RETURN XML string.
19
GetSelectionParameters
Returns an XML string containing the selection parameters of all data references.
GetSelectionParameters
SYNTAX GetSelectionParameters()
RETURN XML string containing the selection parameters.
LoadByAlias
Loads a bundle by an alias as defined in an alias table.
LoadByAlias
SYNTAX LoadByAlias(aliasTableName, alias)
ARGUMENTS aliasTableName Name of the alias table. alias Alias identifier.
LoadById
Loads a bundle by its object ID from the same system the process resides in.
LoadById
SYNTAX
ARGUMENTS
LoadById(objectId) objectId Object ID.
LoadByName
Loads a bundle by its name from the same system the process resides in.
LoadByName
SYNTAX LoadByName(objectName)
ARGUMENTS objectId Object name.
PrintAndArchive
Prints and archives documents or forwards them to the downstream output system.
PrintAndArchive
SYNTAX PrintAndArchive(processId, processType, processTitle)
PrintAndArchive(processId, processType, processTitle, bundlePrintSequence)
ARGUMENTS processId Process ID. processType Process type.
20
processTitle Process title. bundlePrintSequence
Possible values
BundlePrintSequence.BundleSequence = Default setting if the parameter is not defined. Originals and copies pass on to Odin in the same order as they are positioned in the bundle.
BundlePrintSequence.OriginalsFirst = First passes all originals on to
Odin and then the copies.
Modus process info XML (Import XML for Odin) as XML string. RETURN
ProcessData
Executes the AfterDataRetrieval script.
ProcessData
SYNTAX ProcessData()
ResetDocuments
Resets the status of all original documents to not inserted.
ResetDocuments
SYNTAX ResetDocuments()
SetManualVariables
Sets manual variables using an XML string.
SetManualVariables
SYNTAX SetManualVariables(manualVariables)
ARGUMENTS manualVariables XML string
SetSelectionParameters
Sets selection parameters using an XML string.
SetSelectionParameters
SYNTAX SetSelectionParameters(selectionParameters)
ARGUMENTS selectionParameters XML string
Sample script DocumentCollectionManager
batchManager = ModusProcess.GetComponent("ModusBatchManager")
DocumentCollection = ModusProcess.GetComponent("DocumentCollectionManager")
;
;Load bundle by specifying the name
21
bundleName = batchManager.DocumentCollection documentCollection.BundleSystemOId = batchManager.SystemOId documentCollection.LoadByName(bundleName)
; documentCollection.DestinationDirectory = batchManager.Directory
22
ModusBatchManager
About ModusBatchManager
The ModusBatchManager component enables you to generate documents in batch processes.
Properties of the ModusBatchManager
Property
BeginJobScript
Description
Start script for the preparation of document creation.
DB Alias Database alias for the virtual database within the component.
EndJobScript Script for the end processing of document creation.
ProcessRootDirectory Directory in which the generated bundles are saved.
ModusBatchManager Functions
DoWork
Executes the BatchManager start script.
DoWork
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
DoWork()
DoWork(string xml) xml XML data assigned to the BatchManager context.
TRUE = Successful
FALSE = Unsuccessful batchManager.DoWork()
FinishWork
Executes the BatchManager end script.
FinishWork
SYNTAX
ARGUMENTS
EXAMPLE
FinishWork()
FinishWork(xml) xml XML data assigned to the BatchManager context. batchManager.FinishWork()
23
MwsActivityStatus
These components are only available in MWS processes and are responsible for storing information on process activities (states).
An MwsActivityStatus is identified by a unique object name.
Scripts able to use the Context MwsProcess can access MWSActivity with the command
GetActivityStatus.
24
MwsAssistantManager
About MwsAssistantManager
The MwsAssistantManager component enables you to delete finished MWS processes.
Properties of the MwsAssistantManager
Property Description
Condition Condition defining the processes to be deleted in the following form.
MWS_STATUS=2
In this example, all processes with the value 2 in the MWS_STATUS field are deleted.
DB Alias Database alias enabling use of the virtual database inside this component.
MwsAssistantManager Functions
DeleteFinishedProcesses
Deletes the processes selected by the condition.
DeleteFinishedProcesses
SYNTAX DeleteFinishedProcesses()
RETURN
EXAMPLE
Number of deleted processes. deletedRecords = mwsAssistant.DeleteFinishedProcesses()
Sample Script MWSAssistantManager
mwsAssistant = ModusProcess.GetComponent("MWSAssistantManager") deletedRecords = mwsAssistant.DeleteFinishedProcesses() if (deletedRecords > 0)
Protocol("===== MWSAssistant deleted {0} process(es) =====", 8, deletedRecords) end-if
25
OdinArchive
About OdinArchive
The OdinArchive component enables you to archive a stack.
Properties of OdinArchive
Property
DB Alias
Description
Odin database on which the component executes its actions.
NextStackType Specifies the next stack type set after successful execution and after calling the End function.
The drop-down list displays all possible stack types.
Any additionally required stack types must be defined in the file
ModusSuite.Common.PropertyEditors.dll.config.
Default stack types
Name Description Stack type
0 Print Stack is ready to be printed to an online printer or email printer (online print).
10
20
30
40
50
99
PortoOptimization Stack is ready for IT franking. This function is currently not supported.
Streaming
Convert
Stack is ready for streaming.
Stack is ready to be converted to the appropriate output format.
StreamPrint
Archive
Finish
Stack (stream) is ready for batch printing to an outsourcing printer.
Stack is ready for archiving.
Stack processing is finished, no further action.
OnArchive
StackSelect
Script that executes when the ArchiveJob function is called.
The script only executes when the job is to be archived (ODJ_TO_ARCHIVE = "Y").
The script must check whether the job has already been archived (ODJ_ARCHIVED = "Y/N").
Available context
Context OdinArchive
SQL select to identify the next stack to process.
Either specify the select statement directly or refer to a lookup table (for example
$OdinSQL.PrintStackSelect$).
Events of OdinArchive
Event
OnAfterStack
OnArchive
Meaning
This event is executed when the End() function is called after a stack has been processed.
The current stack dataset can be accessed in the context property CurrentStack.
Available context:
Context OdinArchive
This event provides access to stack, envelope or job data.
In the assigned script, for example, the rendition file can be converted to an archive format (for example Tiff or PDF) by using the OdinFileConvert component and then
26
written to a database.
OnBeforeStack
This event is executed when the Start() function is called before a stack has been processed.
The current stack dataset can be accessed in the context property CurrentStack.
Available context:
Context OdinArchive
OdinArchive Functions
ArchiveJob
Archives the given job or the of an envelope. The job and the envelope are set in the context OdinArchive and are thus available to the OnArchive event.
ArchiveJob
SYNTAX
ARGUMENTS
EXAMPLE
ArchiveJob(job)
ArchiveJob(envelope, job) envelope The envelope you want to archive. job The job you want to archive.
OdinArchive.ArchiveJob(job)
OdinArchive.ArchiveJob(envelope, job)
End
Ends archiving.
End
SYNTAX End()
GetCurrentStackRow
After calling Start() and before calling End() the function returns an object whose interface provides read access to the current stack dataset.
GetCurrentStackRow
SYNTAX GetCurrentStackRow()
RETURN Object interface that provides read access to the current stack dataset.
The following functions are available.
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
RETURN
GetValue(columnName) columnName Column name
The column value.
27
EXAMPLE
If the data type of the database column is DATE, Datetime or any valid date type, the date read generally returns in the format MM/DD/YYYY hh:mm:ss.
GetObject("DateVar","MLDate")
StringDateVar =
CurrentJobRecord.GetValue("ODJ_create_at")
;Convert date to the required format with the help of the MLDate object
IntDateVar = DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE= DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss ", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following functions.
Current Returns the current object.
MoveNext() Moves the position to the next object to process.
SYNTAX MoveNext()
RETURN TRUE = Successful
FALSE = The end of the collection is passed.
Reset Resets the enumerator back to the beginning of the first element.
GetEnvelopeEnumerator
Returns an envelope enumerator. Use the GetValue() function to retrieve envelope data.
GetEnvelopeEnumerator
SYNTAX GetEnvelopeEnumerator()
RETURN Enumerator with the following functions.
Current Returns the current envelope.
MoveNext() Moves the position to the next envelope to process.
SYNTAX MoveNext()
RETURN
EXAMPLE
TRUE = Successful
FALSE = The end of the collection is passed. envEnumerator =
OdinPrint.GetEnvelopeEnumerator() nextElement = envEnumerator.MoveNext() while (nextElement)
envelope = envEnumerator.Current;
...
nextElement = envEnumerator.MoveNext()
Reset Resets the enumerator to the beginning of the first element.
28
GetJobEnumerator
Returns a job enumerator. Use the GetValue() function to retrieve job data.
GetJobEnumerator
SYNTAX GetJobEnumerator()
GetJobEnumerator(envelope)
ARGUMENTS envelope The envelope whose jobs you want to access.
RETURN Enumerator with the following functions.
Current Returns the current job.
MoveNext()
SYNTAX
RETURN
MoveNext()
EXAMPLE
TRUE = successful
FALSE = The end of the collection is passed. jobEnumerator =
OdinPrint.GetJobEnumerator() nextElement = envEnumerator.MoveNext() while (nextElement)
;
job = jobEnumerator.Current;
;
...
nextElement = jobEnumerator.MoveNext()
Reset Resets the enumerator to the beginning of the first element.
GetNextStack
Determines the next stack to convert according to the corresponding SQL, which is stored in the
StackSelect property, and returns its ID.
GetNextStack
SYNTAX GetNextStack()
RETURN ID of the stack found, or an empty string if none found.
HasEnvelopes
Checks whether the stack loaded by the Start function contains envelopes.
HasEnvelopes
SYNTAX HasEnvelopes()
RETURN TRUE = The stack contains envelopes.
FALSE = The stack contains no envelopes.
Start
29
Initializes archiving of a stack.
Start
SYNTAX
ARGUMENTS
Start(stackId) stackId Stack ID
Sample Script OdinArchive
; To convert the rendition file by the OdinFileConvert component in the
OnArchive script, the component must be stored in the system pool.
; SystemPool.FileConvert = ModusProcess.GetComponent("OdinFileConvert")
; Get archive components
OdinArchive = ModusProcess.GetComponent("OdinArchive")
; determine next stack stackID = OdinArchive.GetNextStack() if (stackID <> "")
; Yes, then initialize stack archiving
OdinArchive.Start(stackID)
; Does the stack contain envelopes ?
if (OdinArchive.HasEnvelopes)
; Outsourcing Stack:
; Yes, get an envelope enumerator
envEnumerator = OdinArchive.GetEnvelopeEnumerator()
; run through all envelopes and archive jobs
nextEnv = envEnumerator.MoveNext()
while (nextEnv)
; get current envelope from enumerator
envelope = envEnumerator.Current
; as a test get envelope ID
envelopId = envelope.GetValue("ODE_ID")
; get an job enumerator for the envelope.
jobEnumerator = OdinArchive.GetJobEnumerator(envelope)
; run through all envelope jobs and archive
nextJob = jobEnumerator.MoveNext()
while (nextJob)
; get current job from enumerator
job = jobEnumerator.Current
; as a test get job ID
jobId = job.GetValue("ODJ_ID")
; and now archive, call the OnArchive script
OdinArchive.ArchiveJob(envelope, job)
; process next Job
nextJob = jobEnumerator.MoveNext()
end-while
; process next envelope
nextEnv = envEnumerator.MoveNext()
end-while
else
30
; Online Stack: get an job enumerator for the stack
jobEnumerator = OdinArchive.GetJobEnumerator()
; run through all stack jobs and archive
nextJob = jobEnumerator.MoveNext()
while (nextJob)
; get current job ID from enumerator
job = jobEnumerator.Current
; as a test get job ID
jobId = job.GetValue("ODJ_ID")
; and now archive, call the OnArchive script
OdinArchive.ArchiveJob(job)
; process next Job
nextJob = jobEnumerator.MoveNext()
end-while
end-if
; Finish archive
OdinArchive.End() end-if
31
OdinConvert
About OdinConvert
The OdinConvert component enables you to convert an Odin print stream to a print format like PDF, PCL,
AFP, PS, or TIFF.
Note The component does not read the job datasets from the database but from the description file of the stream, as long as the description file is created during streaming.
Modify the output tray list in a Compart profile
The Odin outsourcing printer has 5 defined trays, tray 1 - 3 as well as firstbin and nextbin.
Example: Output tray list of the PCL profile mffpcl.pro
...
<output>
<traylist>
...
<!-- paper output bins -->
<outputtray deviceid='15' name="Tray1" />
<outputtray deviceid='259' name="Tray2"/>
<outputtray deviceid='260' name="Tray3"/>
<outputtray deviceid='15' name="firstbin"/>
<outputtray deviceid='250' name="nextbin"/>
...
</traylist>
</output>
To modify the output tray list in the Compart profile of the respective output format to map the virtual
trays to the corresponding physical trays, compete the following step.
In the [InstallationDirectory]\profiles, open the respective profile and modify the deviceid.
Properties of OdinConvert
Property
ConvertOptions
Description
Comma separated string containing the metadata and options used during conversion.
You can also set these options in the OnConvertStart event to use, for example, the stack data to define the metadata.
Metadata
TITLE Document title.
SUBJECT Document subject.
AUTHOR Document author.
KEYWORDS Document keywords.
Options
32
33
PDF 1.3/1.4
TRUE = PDF security attributes for Document Assembly, Page
TEXTNOTE_CHANGES
Extraction, Comment, Sign and Create Template are set to True.
FALSE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to False.
CHANGES
PDF 1.3/1.4
TRUE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to True.
FALSE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to False.
FILL
COPY
PDF 1.4
TRUE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to True.
FALSE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to False.
PDF 1.4
TRUE = PDF security attributes for Document Assembly, Copy
Content, Copy Content for Accessibility, Page Extraction, Comment,
Sign and Create Template are set to True.
FALSE = PDF security attributes for Document Assembly, Copy
Content, Copy Content for Accessibility, Page Extraction, Comment,
Sign and Create Template are set to False.
DIGITAL_COPY
ASSEMBLE
ACCESSIBILITY
DUPLEX_ADDPAGE
DUPLEX_OPTIMIZE
MAP_COLOR
PDF 1.4
TRUE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to True.
FALSE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to False.
PDF 1.4
TRUE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to True.
FALSE = PDF security attributes for Document Assembly, Page
Extraction, Comment, Sign and Create Template are set to False.
Assembling more than one document is not allowed.
PDF 1.4
TRUE = PDF security attributes for Copy Content, Copy Content for
Accessibility, Page Extraction are set to True.
FALSE = PDF security attributes for Copy Content, Copy Content for Accessibility, Page Extraction are set to False.
TRUE = This option specifies whether an empty page should be added to a duplex document with an odd number of pages.
FALSE = Default setting. This option sets simplex mode for the last page of a duplex document with an odd number of pages.
TRUE = Duplex settings are only set in the output stream, when duplex mode changes.
FALSE = Duplex settings are set in the output stream.
TRUE/FALSE
This parameter is used to define whether color mapping for the
AFP-HighlightColor Definition is executed or not. The individual
DB Alias
ImagePath color definitions can be specified as MapColor_1 to MapColor_n.
Example:
Map_Color=TRUE,"MapColor_1=-
1,20,black","MapColor_2=0,20,red"
Note As MapColor parameters contain comma separated values themselves, the complete string must be enclosed in quotation marks.
The structure is as follows:
MapColor_???= HSB-Color,Threshold,ColorName
HSB-Color=HSB Color Angle
Threshold= Threshold value of the HSB color
ColorName= Name of the color as defined in the AFP profile under
HighlightColorList.
The example above requires the following definitions in the AFP profile:
</highlightcolorlist>
<highlightcolor name='red' type='OCA' number='0x0002' foreground-rgb="#00FF0000" />
<highlightcolor name='black' type='OCA' number='0x0008' foreground-rgb="#00000000" />
</highlightcolorlist> and
<optimizepa value="never"/>
<color value="FALSE" />
<usehighlightcolor value="TRUE" />
<enablebilevelimage value="TRUE" />
SHOW_BOOKMARKS
TRUE = Bookmarks show in the opened PDF.
FALSE = Bookmarks do not show in the opened PDF.
OVERLAYS
MERGEFONTS
TRUE = OVERLAYS are created.
FALSE = Default. OVERLAYS are not created.
TRUE: Default
FALSE
TRUE = Default, PCL output optimization is activated.
FALSE = PCL output optimization is deactivated.
MERGE_SPLITWORDS
This option should be set to FALSE if you have character spacing problems in a generated PCL.
The default value is TRUE.
TRUE = If page orientation is landscape, the page rotates by 90°.
ROTATE_LANDSCAPE FALSE = The page does not rotate.
The default value is TRUE.
Odin database on which the component executes its actions.
Main path to the image files, which can be added to the documents using the Image command.
34
The declaration is optional.
LicenceFilename Path and name of the Compart .NET Toolkit license file, for example cpsdk.lic.
MasterPath
NextStackType
Main path to documents and spool files.
The declaration is optional.
Specifies the next stack type set after successful execution and after calling the End function.
The drop-down list displays all possible stack types.
Any additionally required stack types must be defined in the file
ModusSuite.Common.PropertyEditors.dll.config.
Default stack types
Stack type
0
Name
Description
Stack is ready to be printed to an online printer or email printer (online print).
10
20
30
40
50
99
PortoOptimization Stack is ready for IT franking. This function is currently not supported.
Streaming
Convert
Stack is ready for streaming.
Stack is ready to be converted to the appropriate output format.
StreamPrint
Archive
Finish
Stack (stream) is ready for batch printing to an outsourcing printer.
Stack is ready for archiving.
Stack processing is finished, no further action.
OutputFileName Returns the current name of the output file.
This property is only visible on the component, not in the Object Inspector.
OutputFormat The output format to which the stream converts. Corresponds to the file extension PCL, PS,
AFP, or PDF.
OutputPath
ProfilePath
StackSelect
Path to output directory.
Directory for the Compart profile files.
SQL select statement to identify the next stack to be processed.
You can either specify the select statement or refer to a lookup table, for example
$OdinSQL.PrintStackSelect$.
TraceFileName
Trace level
Name of the Compart trace file.
Specifies which error categories are written to the trace file.
OdinConvert Events
Property
OnConvertEnd
Meaning
The specified script is executed at the end of the process when calling the End function.
OnConvertStart
The specified script is executed at the start of the processing when calling the Start function.
The script can also be used to define component properties.
OnDocumentConvert The specified script is executed for each document.
OnEnvelopeEnd
OnEnvelopeStart
The specified script is executed at the end of the envelope.
The specified script is executed at the beginning of the envelope.
35
OnStackEnd
OnStackStart
The specified script is executed at the end of the stack.
The specified script is executed at the beginning of the stack.
OdinConvert Functions
ConvertDocument
Converts a document and writes it to the output stream.
ConvertDocument
SYNTAX ConvertDocument(doc)
ARGUMENTS doc The document you want to convert.
End
Ends conversion and executes an update on the stack. A script assigned to the OnConvertEnd event is executed here.
End
SYNTAX End()
GetCurrentStackRow
After calling Start() and before calling End() the function returns an object whose interface provides read access to the current stack dataset.
GetCurrentStackRow
SYNTAX GetCurrentStackRow()
RETURN Object interface that provides read access to the current stack dataset.
The following functions are available.
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
GetValue(columnName) columnName Column name
The column value.
If the data type of the database column is DATE, Datetime or any valid date type, the date read generally returns in the format MM/DD/YYYY hh:mm:ss.
GetObject("DateVar","MLDate")
StringDateVar =
CurrentJobRecord.GetValue("ODJ_create_at")
;Convert date to the required format with the help of the MLDate object
IntDateVar = DateVar.DateStringToInt64("MM/dd/yyyy
36
hh:mm:ss", StringDateVar ) v_LETTERDATE= DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss ", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following functions.
Current Returns the current object.
MoveNext() Moves the position to the next object to process.
SYNTAX MoveNext()
RETURN TRUE = Successful
FALSE = The end of the collection is passed.
Reset Resets the enumerator back to the beginning of the first element.
GetDocumentEnumerator
Returns a document enumerator.
GetDocumentEnumerator
SYNTAX GetDocumentEnumerator()
RETURN
Enumerator with the following functions.
Current Returns the current document.
MoveNext() Moves the position to the next document to process.
SYNTAX MoveNext()
RETURN
EXAMPLE
TRUE = Successful
FALSE = The end of the collection is passed. docEnumerator =
OdinPrint.GetDocumentEnumerator() nextElement = docEnumerator.MoveNext() while (nextElement)
envelope = docEnumerator.Current;
...
nextElement = docEnumerator.MoveNext()
Reset Resets the enumerator to the beginning of the first element.
GetNextStack
Determines the next stack to convert according to the corresponding SQL, which is stored in the
StackSelect property, and returns its ID.
37
GetNextStack
SYNTAX GetNextStack()
RETURN ID of the stack found, or an empty string if none found.
SetStackError
Sets the status of a stack to error.
SetPdfSigner
SYNTAX SetStackError(errorMessage)
ARGUMENTS errorMessage Error message
Start
Initializes the stack for conversion. A script assigned to the OnConvertStart event executes here.
Start
SYNTAX
ARGUMENTS
Start(stackId) stackId Stack ID
Sample Script OdinConvert
; Get component for converting
OdinConvert = ModusProcess.GetComponent("OdinConvert")
;
; Determine the next stack for streaming stackId = OdinConvert.GetNextStack()
;
; Stack found ? if (stackID <> "")
;
; Yes, then initialize stack / conversion.
OdinConvert.Start(stackId)
;
;
; Get a document enumerator
enumerator = OdinConvert.GetDocumentEnumerator()
;
; Are there more documents in the stream?
nextDoc = enumerator.MoveNext()
while (nextDoc = true)
;
; Yes, then determine the document
doc = enumerator.Current
;
38
; For tests determine the number of pages and name of the document
pageCount = doc.PageCount
fileName = doc.FileName
id = doc.Id
;
; and log
Protocol("id: {0} - pages: {1} - {2}", 0, id, pageCount, fileName)
;
; and write to output stream
OdinConvert.ConvertDocument(doc)
;
; Are there more documents in the stream?
nextDoc = enumerator.MoveNext()
;
end-while
; end of conversion, update stack
OdinConvert.End() end-if
39
OdinCustomProcess
About OdinCustomProcess
You must have an Odin license installed to use the OdinCustomProcess component.
The OdinCustomProcess component enables you to process stacks and works similar to the OdinArchive
component.
Define an additional stack type
You can define your own stack types in the file ModusSuite.Common.PropertyEditors.dll.config so that these too will appear in the drop-down list for StackType and NextStacktype.
Sample ModusSuite.Common.PropertyEditors.dll.config
<PropertyEditor>
<Odin>
<StackTypes>
<StackType value="60" name="Transfer"/>
</StackTypes>
<OutputFormat>
<Format value="pdf" name="Portable Document Format" />
<Format value="pcl" name="Printer Command Language" />
<Format value="pos" name="Postscript" />
<Format value="afp" name="Advanced Function Presentation" />
<Format value="tif" name="Tagged Image File Format" />
</OutputFormat>
</Odin>
</PropertyEditor>
Properties of OdinCustomProcess
Property
DB Alias
Description
Odin database on which the component executes its actions.
NextStackType Specifies the next stack type set after successful execution and after calling the End function.
The drop-down list displays all possible stack types.
Any additionally required stack types must be defined in the file
ModusSuite.Common.PropertyEditors.dll.config.
Default stack types
Name Description Stack type
0 Print Stack is ready to be printed to an online printer or email printer (online print).
10 PortoOptimization Stack is ready for IT franking. This function is currently not supported.
20
30
40
Streaming
Convert
StreamPrint
Stack is ready for streaming.
Stack is ready to be converted to the appropriate output format.
Stack (stream) is ready for batch printing to an
40
StackSelect
StackType
50
99
Archive
Finish outsourcing printer.
Stack is ready for archiving.
Stack processing is finished, no further action.
SQL select to identify the next stack to be processed.
You can either specify the select statement or refer to a lookup table, for example
$OdinSQL.PrintStackSelect$.
Specifies the stack type that this component processes.
Select the stack type previously defined in the custom process.
OdinCustomProcess Events
Event
OnAfterStack
Meaning
The specified script is executed after the stack processing when calling the End function.
The event corresponds to the AfterStack event of a printer in modus 4.
Available context:
Context OdinCustomProcess
OnBeforeStack The specified script is executed when calling the Start() function, before executing the stack processing.
The event corresponds to the AfterStack event of a printer in modus 4.
Available context:
Context OdinCustomProcess
OnProcessData The specified script is executed when the component ProcessJob function is called. Stack, envelope or job datasets are made available.
Available context:
Context OdinCustomProcess
OdinCustomProcess Functions
End
Ends conversion and executes an update on the stack. A script assigned to the OnConvertEnd event is executed here.
End
SYNTAX End()
GetCurrentStackRow
After calling Start() and before calling End() the function returns an object whose interface provides read access to the current stack dataset.
GetCurrentStackRow
SYNTAX GetCurrentStackRow()
RETURN Object interface that provides read access to the current stack dataset.
41
The following functions are available.
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
GetValue(columnName) columnName Column name
The column value.
If the data type of the database column is DATE, Datetime or any valid date type, the date read generally returns in the format MM/DD/YYYY hh:mm:ss.
GetObject("DateVar","MLDate")
StringDateVar =
CurrentJobRecord.GetValue("ODJ_create_at")
;Convert date to the required format with the help of the MLDate object
IntDateVar = DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE= DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss ", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following functions.
Current Returns the current object.
MoveNext() Moves the position to the next object to process.
SYNTAX MoveNext()
RETURN TRUE = Successful
FALSE = The end of the collection is passed.
Reset Resets the enumerator back to the beginning of the first element.
GetEnvelopeEnumerator
Returns an envelope enumerator. Use the GetValue() function to retrieve envelope data.
GetEnvelopeEnumerator
SYNTAX GetEnvelopeEnumerator()
RETURN Enumerator with the following functions.
Current Returns the current envelope.
MoveNext() Moves the position to the next envelope to process.
SYNTAX MoveNext()
RETURN
EXAMPLE
TRUE = Successful
FALSE = The end of the collection is passed. envEnumerator =
42
Reset
OdinPrint.GetEnvelopeEnumerator() nextElement = envEnumerator.MoveNext() while (nextElement)
envelope = envEnumerator.Current;
...
nextElement = envEnumerator.MoveNext()
Resets the enumerator to the beginning of the first element.
GetJobEnumerator
Returns a job enumerator. Use the GetValue() function to retrieve job data.
GetJobEnumerator
SYNTAX GetJobEnumerator()
GetJobEnumerator(envelope)
ARGUMENTS envelope The envelope whose jobs you want to access.
RETURN Enumerator with the following functions.
Current Returns the current job.
MoveNext()
SYNTAX
RETURN
MoveNext()
EXAMPLE
TRUE = successful
FALSE = The end of the collection is passed. jobEnumerator =
OdinPrint.GetJobEnumerator() nextElement = envEnumerator.MoveNext() while (nextElement)
;
job = jobEnumerator.Current;
;
...
nextElement = jobEnumerator.MoveNext()
Reset Resets the enumerator to the beginning of the first element.
GetNextStack
Determines the next stack to convert according to the corresponding SQL, which is stored in the
StackSelect property, and returns its ID.
GetNextStack
SYNTAX GetNextStack()
RETURN ID of the stack found, or an empty string if none found.
HasEnvelopes
Checks whether the stack loaded by the Start function contains envelopes.
43
HasEnvelopes
SYNTAX HasEnvelopes()
RETURN TRUE = The stack contains envelopes.
FALSE = The stack contains no envelopes.
Process
Processes the specified job. The job is set in the OdinCustomProcessContext and is available to the
OnProcessData event.
Process
SYNTAX
ARGUMENTS
Process(job) job Job to process.
ProcessJob
Processes the given job of the specified envelope.
The job and the envelope are set in the OdinCustomProcessContext and are thus available to the
OnProcessData event.
ProcessJob
SYNTAX
ARGUMENTS
ProcessJob(envelope, job) envelope Envelope job Job to process.
ProcessJobs
Processes all jobs of the specified envelope.
The job is set in the OdinCustomProcessContext and is thus available to the OnProcessData event.
ProcessJobs
SYNTAX ProcessJobs(envelope)
ARGUMENTS envelope Envelope
Start
Initializes the stack for conversion. A script assigned to the OnConvertStart event executes.
Start
SYNTAX
ARGUMENTS
Srv_Start(stackId) stackId Stack ID
44
Sample Script OdinCustomProcess
; Get CustomProcess component
OdinCustomProcess = ModusProcess.GetComponent("OdinCustomProcess")
; determine next stack stackID = OdinCustomProcess.GetNextStack()
; if (stackID <> "")
;
; Yes, then initialize stack processing,
; Execute the OnBeforeStack script.
OdinCustomProcess.Start(stackID)
;
; Does the stack have envelopes ?
if (OdinCustomProcess.HasEnvelopes)
;
; Outsourcing Stack:
; Yes, get an envelope enumerator
envEnumerator = OdinCustomProcess.GetEnvelopeEnumerator()
;
; run through all envelopes and process the jobs
nextEnv = envEnumerator.MoveNext()
while (nextEnv)
;
; get current envelope from enumerator
envelope = envEnumerator.Current
; as a test get envelope ID
envelopId = envelope.GetValue("ODE_ID")
;
; get an job enumerator for the envelope.
jobEnumerator = OdinCustomProcess.GetJobEnumerator(envelope)
;
; run through and process all envelope jobs
nextJob = jobEnumerator.MoveNext()
while (nextJob)
;
; get current job from enumerator
job = jobEnumerator.Current
; as a test get job ID
jobId = job.GetValue("ODJ_ID")
;
; Process job, call the OnProcessData script
OdinCustomProcess.ProcessJob(envelope, job)
;
; process next Job
nextJob = jobEnumerator.MoveNext()
;
end-while
;
45
; process next envelope
nextEnv = envEnumerator.MoveNext()
;
end-while
else
; Online Stack:
; get an job enumerator for the stack
jobEnumerator = OdinCustomProcess.GetJobEnumerator()
;
; run through and process all stack jobs
nextJob = jobEnumerator.MoveNext()
while (nextJob)
; get current job from enumerator
job = jobEnumerator.Current
; as a test get job ID
jobId = job.GetValue("ODJ_ID")
;
; and process, the OnProcessData script is called
OdinCustomProcess.ProcessJob(job)
;
; process next Job
nextJob = jobEnumerator.MoveNext()
end-while
end-if
; Stack processing finished, call the OnAfterStack script
OdinCustomProcess.End() end-if
46
OdinDbTasks
About OdinDbTasks
The OdinDbTasks component enables you to delete and reset Odin datasets.
Properties of OdinDbTasks
Property
DB Alias
Description
Defines the Odin database in which the component executes its actions.
OnDeleteJob
Script that executes after OnDeleteStack for each job the component deletes.
OnDeleteStack
Script that executes before OnDeleteJob for each stack the component deletes.
OdinDbTasks Functions
DeleteStack
Deletes a stack including all envelopes and jobs belonging to it. The document files of the jobs are also deleted. If empty import directories are left over after the document files are deleted, these are also deleted.
DeleteStack
SYNTAX DeleteStack(CustomStackSelect)
ARGUMENTS
CustomStackSelect Select statement to find the stacks you want to delete.
If the argument is an empty string, the standard select statement is used.
Standard select for an SQL Server
Select TOP 1 ODS_ID FROM dbo.ODIN_STACK WITH
(updlock, rowlock)
WHERE (ODS_STATE IN (2,4)) and (ODS_DELETE_AT <= GETDATE()) and (ODS_LOCKBY is NULL)
Standard select for an Oracle database
Select ODS_ID FROM ODIN_STACK
Where (ODS_STATE In (2,4)) and (ODS_DELETE_AT <= SYSDATE) and (ODS_LOCKBY is NULL) and (RowNum = 1) for update
RETURN
EXAMPLE
The ID of the deleted stack or an empty string if no stack was deleted.
DbTask = ModusProcess.GetComponent("OdinDbTasks")
;no select statement defined, the default statement is used
DeletedStackId = DbTask.DeleteStack("")
;if a stack is deleted, its ID is returned. Otherwise an empty string is returned. if (StrLen(DeletedStackId) > 0)
Protocol("Stack with the ID {0} was deleted",
10,DeletedStackId) else
Protocol("No stack deleted", 10) end-if
47
DeleteProcessRecords
Deletes process datasets from the Odin_Process table to which no more job datasets are assigned.
DeleteProcessRecords
SYNTAX DeleteProcessRecords(NumberOfDataSets)
ARGUMENTS
NumberOfDataSets Maximum number of process datasets to delete by the function call.
The higher the number, the longer the execution time.
RETURN
EXAMPLE
Number of deleted processes.
DbTask = ModusProcess.GetComponent("OdinDbTasks")
ProcessCounter = DbTask.DeleteProcessRecords(100)
Protocol("'{0}' Process(es) deleted", 10, ProcessCounter)
SetBackStackState
Automatic reset of stacks with the status Locked to the status Wait.
Each call of this function looks for a stack dataset that meets the following conditions.
ODS_STATE = 3 (Locked)
ODS_RETRY_AT <= current time
ODS_LOCKBY is NULL
If a dataset exists, it is reset.
In addition, the following database fields are updated.
ODS_STATE = 0 (Wait)
ODS_MESSAGE_TEXT = automatic reset
SetBackStackState
SYNTAX SetBackStackState()
RETURN
EXAMPL
E
The ID of the reset stack or an empty string if no stack is found or processed.
;*******************************************************************
**
;Reset stack with status Locked to Wait
;*******************************************************************
**
;
DbTask = ModusProcess.GetComponent("OdinDbTasks")
StackId = DbTask.SetBackStackState()
;
;if a stack is reset, its ID returns. Otherwise an empty string returns. if (StrLen(StackId) > 0)
Protocol("Stack with the ID {0} was reset", 10, StackId) else
Protocol("No stack reset", 10)
48
end-if
Sample Script OdinDbTasks
DbTask = ModusProcess.GetComponent("OdinDbTasks")
StackId = DbTask.SetBackStackState()
;
;if a stack is reset, it's ID is returned. Otherwise an empty string is returned. if (StrLen(StackId) > 0)
Protocol("Stack with the ID {0} was reset", 10, StackId) else
Protocol("No stack reset", 10) end-if
49
OdinEmail
About OdinEmail
The OdinEmail component enables you to send emails through an SMTP server.
Properties of OdinEmail
Property
BodyHtml
Description
Sets or returns the HTML body text of the email.
BodyHmtlImages Sets or returns the body HTML images as a comma separated string.
The string can have the following structure.
id=file name
Example pic1=c:\images\pic1.jpg,picN=c:\images\picN.jpg
Just the file name. In this case, the name without a file extension is used as the ID.
Example c:\images\pic1.jpg,c:\images\picN.jpg
Or a mix of both
Example pic1=c:\images\pic1.jpg,c:\images\test.jpg,picN=c:\images\picN
.jpg
The values always return in the form of id=file name.
Sets or returns the body text of the email. BodyText
Encoding
EncodingCodepage
IsBodyHtml
Sets or returns the encoding used for the email.
Sets or returns the encoding code page used for the email.
Sets or returns whether the email is in HTML format.
TRUE = Use BodyHtml as HTML text and BodyText as alternative plain text.
FALSE = Use only the BodyText as plain text.
Sets or returns the Bcc recipient of the email. MailBcc
MailCC
MailFrom
MailReplyTo
MailTo
SmtpDomain
SmtpHost
SmtpPassword
SmtpPickupDirectory
Sets or returns the CC recipient of the email. Use a comma separated list to specify more than one recipient.
Sets or returns the sender of the email.
Sets or returns the reply to address of the email.
Sets or returns the recipient of the email. Use a comma separated list to specify more than one recipient.
Specifies the domain or the computer on which the login information is checked.
Host on which the SMTP server is running.
Password to authenticate to the SMTP server. The password must be encoded.
Note To encode the password, use the tool Encoder.exe in the installation directory.
Sets or returns the directory to which emails are saved, if
SmtpDeliveryMethod.SpecifiedPickupDirectory is set.
Port of the SMTP server.
User name for SMTP server authentication.
SmtpPort
SmtpUserName
Subject Sets or returns the subject of the email. useDefaultCredentials TRUE = Authenticate to the SMTP server using the logged in user.
FALSE = Authenticate to the SMTP server using SmtpUserName and SmtpPassword.
UseSsl TRUE = An encoded SSL connection is used to communicate with the SMTP server.
50
FALSE = No encoded connection is used to communicate with the SMTP server.
The default value is FALSE.
OdinEmail Functions
AddAttachment
Adds an attachment to an email.
AddAttachment
SYNTAX AddAttachment(string fileName)
ARGUMENTS
EXAMPLE filename Name of the attachment file. email.AddAttachment("c:\temp\test.pdf")
AddBodyHtmlImage
Adds an image to the HTML body.
AddBodyHtmlImage
SYNTAX AddBodyHtmlImage(string id, string imageFileName)
ARGUMENTS id ID of the image (cid). If no ID is specified, the file name without its extension is used.
EXAMPLE imageFileName File name of the image. email.AddBodyHtmlImage("", "c:\temp\no-fear.jpg")
AddToHeader
Adds a name and value entry to an email header.
AddToHeader
SYNTAX AddToHeader(string name, string value)
ARGUMENTS name Name of the entry.
If the entry already exists, its value is overwritten. Otherwise, a new entry is created.
EXAMPLE value Entry value.
Email.AddToHeader("Organization", "Perceptive Software")
ClearAttachments
Deletes all loaded attachments.
ClearAttachments
SYNTAX ClearAttachments()
EXAMPLE
ClearAttachments()
51
ClearBodyHtmlImages
Deletes all images loaded in the HTML body.
ClearBodyHtmlImages
SYNTAX
EXAMPLE
ClearBodyHtmlImages()
ClearBodyHtmlImages()
ClearCertificates
Deletes all loaded or defined certificates.
ClearCertificates
SYNTAX ClearCertificates()
GetAttachments
Returns a comma separated string containing the file names of all attachments.
GetAttachments
SYNTAX GetAttachments()
GetDeliveryNotificationOptions
Returns the notification options for emails.
GetDeliveryNotificationOptions
SYNTAX GetDeliveryNotificationOptions()
RETURN
OdinDeliveryNotificationOptions.None No notification.
OdinDeliveryNotificationOptions.OnSuccess Notification on successful delivery.
OdinDeliveryNotificationOptions.OnFailure
OdinDeliveryNotificationOptions.Delay
OdinDeliveryNotificationOptions.Never
Notification on unsuccessful delivery
Notification on delayed delivery.
No notification.
GetMailPriority
Returns the priority of an email.
GetMailPriority
SYNTAX GetMailPriority()
RETURN
OdinMailPriority.Normal The email has normal priority.
OdinMailPriority.Low
OdinMailPriority.High
The email has low priority.
The email has high priority.
52
GetSmtpDeliveryMethod
Returns the option of how emails are delivered.
GetSmtpDeliveryMethod
SYNTAX GetSmtpDeliveryMethod()
RETURN
Value
OdinSmtpDeliveryMethod.Network
Description
Emails are sent through the configured
SMTP server (SmptHost / SmtpPort).
OdinSmtpDeliveryMethod.SpecifiedPickupDirectory Emails are copied to the directory specified in the property SmtpPickupDirectory and must be sent by an external program.
OdinSmtpDeliveryMethod.PickupDirectoryFromIis Emails are copied to the directory configured in the Internet Information Server
(IIS).
LoadBodyFromFile
Loads a body text from a file.
LoadBodyFromFile
SYNTAX LoadBodyFromFile(fileName, isHtml)
ARGUMENTS fileName File name, isHtml TRUE = Is HTML
FALSE = Is not HTML
LoadCertificateFromCertFile
Loads the X.509 certificate from the specified file to send the email.
LoadCertificateFromCertFile
SYNTAX LoadCertificateFromCertFile(fileName)
ARGUMENTS fileName File name.
LoadCertificateFromSignedFile
Loads the X.509 certificate from the specified file to send the email.
LoadCertifacteFromSignedFile
SYNTAX LoadCertifacteFromSignedFile(fileName)
ARGUMENTS fileName File name.
RemoveAttachment
Removes an attachment from an email.
53
RemoveAttachment
SYNTAX RemoveAttachment(fileName)
ARGUMENTS fileName Name of the file to remove from the attachments.
RemoveFromHeader
Removes an entry from an email header.
RemoveFromHeader
SYNTAX RemoveFromHeader(name)
ARGUMENTS
EXAMPLE name Name of the entry to remove.
Email.RemoveFromHeader("Organisation")
Reset
Resets settings to defined component values.
Reset
SYNTAX Reset()
Send
Send the email with the current settings.
Send
SYNTAX Send()
SetCredentials
Sets the user credentials user name, password, and domain.
SetCredentials
SYNTAX SetCredentials(userName, password, domain)
ARGUMENTS userName User name password domain
Encoded password
Note To encode the password, use the tool Encoder.exe in the installation directory.
Domain
RETURN TRUE = Attribute value is set.
FALSE = Attribute value could not be set.
SetDeliveryNotificationOptions
54
Defines delivery notification for emails.
SetDeliveryNotificationOptions
SYNTAX SetDeliveryNotificationOptions(deliveryNotificationOptions)
ARGUMENTS deliveryNotificationOptions
Possible values
OdinDeliveryNotificationOptions.None = No notification
OdinDeliveryNotificationOptions.OnSuccess = Notification on successful delivery
OdinDeliveryNotificationOptions.OnFailure = Notification on unsuccessful delivery
OdinDeliveryNotificationOptions.Delay = Notification on delayed delivery
OdinDeliveryNotificationOptions.Never = No notification whatsoever
SetMailPriority
Sets the priority of an email.
SetMailPriority
SYNTAX SetMailPriority(mailPriority)
ARGUMENTS mailPriority
Possible values
OdinMailPriority.Normal = The email has normal priority.
OdinMailPriority.Low = The email has low priority.
OdinMailPriority.High = The email has high priority.
SetSmtpDeliveryMethod
Defines how emails are delivered.
SetSmtpDeliveryMethod
SYNTAX SetSmtpDeliveryMethod(smtpDeliveryMethod)
ARGUMENTS smtpDeliveryMethod
Possible values
OdinSmtpDeliveryMethod.Network = Emails are sent through the configured SMTP Server (SmptHost / SmtpPort).
OdinSmtpDeliveryMethod.SpecifiedPickupDirectory = Emails are copied to the directory specified in the property SmtpPickupDirectory and must be sent by an external program.
OdinSmtpDeliveryMethod.PickupDirectoryFromIis = Emails are copied to the directory configured in the Internet Information Server (IIS).
SetSmtpServer
Sets the SMTP server properties host, port, and useDefaultCredentials.
SetSmtpServer
SYNTAX SetSmtpServer(host, port, useDefaultCredentials)
ARGUMENTS host Host on which the SMTP server runs
55
port Port of the SMTP server useDefaultCredentials TRUE = Authenticate to SMTP server using the logged on user.
FALSE = Authenticate to SMTP server using SmptUserName and
SmtpPassword.
Sample Script OdinEmail
; Get Email component email = ModusProcess.GetComponent("OdinEmail")
;
; Test: Encoding by display name / name / code page email.Encoding = "Western European" (Windows)
;email.Encoding = "windows-1252"
;email.EncodingCodepage = 1252
;
; SMTP-Server + User email.SmtpHost = "192.168.24.166" email.SmtpPort = 25 email.UseDefaultCredentials = false email.SmtpUserName = "test" email.SmtpPassword = "test" email.SmtpDomain = ""
;
; Can alternatively be set by the function SetSmtpServer/SetCredentials
;email.SetSmtpServer("192.168.24.166", 25, false)
;email.SetCredentials("test", "test", "")
;
; SetSmtpDeliveryMethod (OdinSmtpDeliveryMethod ->
Network/SpecifiedPickupDirectory/PickupDirectoryFromIis)
;email.SetSmtpDeliveryMethod(OdinSmtpDeliveryMethod.Network)
;email.SmtpPickupDirectory = "c:\temp\"
;
; Email From/To/CC/Bcc/ReplyTo
; The comma separated string for email addresses can have the following structure.
; a) "DisplayName" <email@domain>,<email@domain>,email@domain
; or: "displayName-1" <[email protected]>,"displayName-N" <email-N@domain-
N.de>,<[email protected]>,[email protected]
; b) in string list format: DisplayName=email address or just email address
(without DisplayName)
; or.: [email protected],[email protected]
; [email protected],email@test,[email protected] ... email.MailFrom = """Jo"" <[email protected]>" email.MailTo = """Test"" <[email protected]>,[email protected]" email.MailReplyTo = """Jo"" <[email protected]>"
;
; SetMailPriority (OdinMailPriority -> Normal/High/Low) email.SetMailPriority(OdinMailPriority.High)
56
;
; SetDeliveryNotification (OdinDeliveryNotificationOptions ->
None/OnSuccess/OnFailure/Delay/Never) email.SetDeliveryNotificationOptions(OdinDeliveryNotificationOptions.None)
;
; Subject + Body email.Subject = "test-mail..." email.BodyText = "plain-text body" email.BodyHtml = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0
Transitional//EN""><HTML><HEAD><META http-equiv=Content-Type content=""text/html; charset=iso-8859-1""><HEAD><BODY><DIV><FONT face=Arial color=#ff0000 size=5>test: this is a html mail from Jo</FONT></DIV><img alt="""" hspace=0 src=""cid:No-Fear"" align=baseline border=0></BODY></HTML>" email.IsBodyHtml = true
;
; Alternatively, bodies can be loaded using LoadBodyFromFile()
;email.LoadBodyFromFile("plain.txt", false) ; = BodyText
;email.LoadBodyFromFile("html.txt", true) ; = BodyHtml
;
; image is inserted using cid: No-Fear, that means insert image
; If no ID is specified, the file name without its extension is used as the
ID. email.AddBodyHtmlImage("", "c:\temp\no-fear.jpg")
;
; Insert PDF as attachment email.AddAttachment("c:\temp\test.pdf")
;
; or possibly load X509 certificate (SSL is then used)
;email.LoadCertificateFromCertFile("certFile.cer")
;email.LoadCertifacteFromSignedFile("signedFile.cer")
;
; and send email... email.Send()
57
OdinFileConvert
About OdinFileConvert
The OdinFileConvert component enables you to convert and collate 1-n documents in the output format.
The available output formats, for example, PDF or TIFF, depend on the license.
You can use this component in archiving processes to convert an XPS rendition in the output format before the rendition is archived.
Note You can still modify the documents during batch conversion.
Properties of OdinFileConvert
Property
LicenceFilename
Meaning
Path and name of the Compart .NET Toolkit license file.
NumberOfFilesConverted Returns the number of files already converted and appended to the output file during batch conversion.
OutputFormat Returns the output format of the stream.
The drop-down list shows all the possible output formats as defined in the
ModusSuite.Common.PropertyEditors.dll.config file.
The formats depend on the corresponding Compart .NET-Toolkit license.
Sample ModusSuite.Common.PropertyEditors.dll.config
<PropertyEditor>
<Odin>
<StackTypes>
<StackType value="60" name="Transfer"/>
</StackTypes>
<OutputFormat>
<Format value="pdf" name="Portable Document
Format" />
<Format value="pcl" name="Printer Command
Language" />
<Format value="pos" name="Postscript" />
<Format value="afp" name="Advanced Function
Presentation" />
<Format value="tif" name="Tagged Image File
Format" />
</OutputFormat>
</Odin>
</PropertyEditor>
ProfilePath
TraceFileName
Path to the Compart profiles set in the respective input and output filters.
Path and name of the trace file for the Compart .NET-Toolkit.
OdinFileConvert Functions
AddDocument
Converts the specified Odin document and adds it to the output file.
AddDocument
SYNTAX AddDocument(document)
58
ARGUMENTS
EXAMPLE document Document you want to add.
OdinFileConverter.AddDocument(document)
AddFile
Converts the specified file and adds it to the output file during batch conversion.
AddFile
SYNTAX
ARGUMENTS
EXAMPLE
AddFile(fileName) filename The file you want to add.
OdinFileConverter.AddFile("c:\temp\Document.xps")
CreatePdfSigner
The functions create a PDF signer and return its IOdinPdfSigner interface.
The certificate used for signing can either come from an exported certificate file (PFX) or from a certificate store.
The PDF signer object can be used to assign a digital signature to a PDF file.
This can be used after an output file has been created from conversion in an OnConvertEnd event, or can be used by an email printer in the event OnConvert (see Context OdinEmailConvert ).
Syntax
CreatePdfSigner(string pfxFileName, string password)
CreatePdfSigner(OdinStoreName storeName, OdinStoreLocation storeLocation,
OdinX509FindType findType, object findValue, bool validOnly)
CreatePdfSigner
SYNT
AX
CreatePdfSigner(pfxFileName, password)
CreatePdfSigner(storeName, storeLocation, findType, findValue, validOnly)
ARGU
MENT
S
The password required for access to X.509 certificate data.
The password must be encrypted.
To encode the password, use the tool Encoder.exe in the Bin-Directory. store
Name
One of the OdinStoreName values:
Value
OdinStoreName.AddressBook
Definition
The X.509 certificate store for other users.
OdinStoreName.AuthRoot The X.509 certificate store for third-party certificate authorities
(CAs).
OdinStoreName.CertificateAuthority The X.509 certificate store for intermediate certificate authorities (CAs).
OdinStoreName.Disallowed The X.509 certificate store for revoked certificates.
59
OdinStoreName.My
OdinStoreName.Root
OdinStoreName.TrustedPeople
OdinStoreName.TrustedPublisher
The X.509 certificate store for personal certificates.
The X.509 certificate store for trusted root certificate authorities (CAs).
The X.509 certificate store for directly trusted people and resources.
The X.509 certificate store for directly trusted publishers. s toreL ocatio n
One of the OdinX509FindType values:
Value
password
Name of the certificate file.
Encoded password required for access to X.509 certificate data.
Note To encode the password, use the tool Encoder.exe in the installation directory. storeName One of the OdinStoreName values.
Possible values
OdinStoreName.AddressBook
Description
The X.509 certificate store for other users.
OdinStoreName.AuthRoot The X.509 certificate store for third-party certificate authorities
(CAs).
OdinStoreName.CertificateAuthority The X.509 certificate store for intermediate certificate authorities
(CAs).
OdinStoreName.Disallowed
OdinStoreName.My
OdinStoreName.Root
The X.509 certificate store for revoked certificates.
The X.509 certificate store for personal certificates.
The X.509 certificate store for trusted root certificate authorities
(CAs).
OdinStoreName.TrustedPeople
OdinStoreName.TrustedPublisher
The X.509 certificate store for directly trusted people and resources.
The X.509 certificate store for directly trusted publishers. s toreLocation f indType
One of the OdinX509StoreLocation values.
Possible values
OdinStoreLocation.CurrentUser
Description
The X.509 certificate store used by the current user.
OdinStoreLocation.LocalMachine The X.509 certificate store for third-party certificate authorities
(CAs).
One of the OdinX509FindType values.
Possible values
OdinX509FindType.FindByThumbprint
Description
The findValue parameter must be a string representing the thumbprint of the certificate.
OdinX509FindType.FindBySubjectName
OdinX509FindType.FindBySubjectDistinguishedName The findValue parameter must be a string representing the subject distinguished name of the certificate.
OdinX509FindType.FindByIssuerName
OdinX509FindType.FindByIssuerDistinguishedName
The findValue parameter must be a string representing the subject name of the certificate.
The findValue parameter must be a string representing the issuer name of the certificate.
The findValue parameter must be a string representing the issuer distinguished name of the certificate.
OdinX509FindType.FindBySerialNumber
OdinX509FindType.FindByTimeValid
The findValue parameter must be a string representing the serial number of the certificate as it is displayed by the UI. The serial number must be in reverse order because it is an integer.
The findValue parameter must be a DateTime value in local time, for example Now.
60
61 findValue v alidOnly
OdinX509FindType.
FindBySerialNumber
OdinX509FindType.FindByTimeNotYetValid
OdinX509FindType.FindByTimeExpired
OdinX509FindType.FindByTemplateName
OdinX509FindType.FindByApplicationPolicy
OdinX509FindType.FindByCertificatePolicy
OdinX509FindType.FindByExtension
OdinX509FindType.FindByKeyUsage
OdinX509FindType.FindBySubjectKeyIdentifier
The findValue parameter must be a DateTime value in local time, for example Now.
The findValue parameter must be a DateTime value in local time, for example Now.
The findValue parameter must be a string representing the template name of the certificate, for example "ClientAuth".
A template name is an X509 version 3 extension that specifies the uses of the certificate.
The findValue parameter must be a string representing either the application policy friendly name or the object identifier (OID) of the certificate. For example, "Encrypting File System" or
"1.3.6.1.4.1.311.10.3.4" can be used. For an application that is localized, the OID value must be used, because the friendly name is localized.
The findValue parameter must be a string representing either the friendly name or the object identifier (OID) of the certificate policy. The best practice is to use the OID, such as
"1.3.6.1.4.1.311.10.3.4". For an application that will be localized, the OID value must be used, because the friendly name is localized.
The findValue parameter must be a string describing the extension to find. The object identifier
(OID) is most commonly used to direct the Find function to search for all certificates that have an extension matching that OID value.
The findValue parameter must be either a string representing the key usage or an integer representing a bit mask containing all the requested key usages. Only one key usage at a time can be specified for the string value.
The findValue parameter must be a string representing the subject key identifier in hexadecimal, such as "F3E815D45E83B8477B9284113C64EF208E897112", as displayed in the UI.
Search criteria as string or date time.
The findValue parameter must be a string representing the issuer distinguished name of the certificate.
The findValue parameter must be a string representing the serial number of the certificate as it is displayed by the UI. The serial number must be in reverse order because it is an integer.
The findValue parameter must be a DateTime value in local time, for example
Now.
The findValue parameter must be a DateTime value in local time, for example
Now.
OdinX509FindType.
FindByTimeValid
OdinX509FindType.
FindByTimeNotYetV alid
OdinX509FindType.
FindByTimeExpired
OdinX509FindType.
FindByTemplateNam e
OdinX509FindType.
FindByApplicationPol icy
OdinX509FindType.
FindByCertificatePoli cy
OdinX509FindType.
FindByExtension
The findValue parameter must be a DateTime value in local time, for example
Now.
The findValue parameter must be a string representing the template name of the certificate, for example "ClientAuth".
A template name is an X509 version 3 extension that specifies the uses of the certificate.
The findValue parameter must be a string representing either the application policy friendly name or the object identifier (Oid) of the certificate. For example, "Encrypting File System" or "1.3.6.1.4.1.311.10.3.4" can be used.
For an application that will be localized, the OID value must be used, because the friendly name is localized.
The findValue parameter must be a string representing either the friendly name or the object identifier (Oid) of the certificate policy. The best practice is to use the OID, such as "1.3.6.1.4.1.311.10.3.4". For an application that will be localized, the OID value must be used, because the friendly name is localized.
The findValue parameter must be a string describing the extension to find.
The object identifier (OID) is most commonly used to direct the Find function
to search for all certificates that have an extension matching that OID value.
OdinX509FindType.
FindByKeyUsage
OdinX509FindType.
FindBySubjectKeyId entifier
The findValue parameter must be either a string representing the key usage or an integer representing a bit mask containing all the requested key usages. Only one key usage at a time can be specified for the string value.
The findValue parameter must be a string representing the subject key identifier in hexadecimal, such as
"F3E815D45E83B8477B9284113C64EF208E897112", as displayed in the
UI.
Search criteria as string or date time. RETU
RN v alidO nly
True, so only valid certificates are returned by the search.
Return value
Interface IOdinPdfSigner functions of the IOdinPdfSigner Interface
AddSignature
Inserts a digital signature into a PDF file using the certificate for signing defined when the PDF signer was created.
Notes
If no certificate exists, a dialog box is displayed to select the certificate (My Certificates / Current
Users).
If the PDF is password protected, the password must be defined in the property PdfPassword.
Syntax
AddSignature(string inputFileName, string outputFileName)
AddSignature(string inputFileName, string outputFileName, string pdfPassword)
Parameter
inputFileName : Name of the PDF file to be signed. outputFileName: Name of the signed PDF to be created. pdfPassword: PDF password. The password must be encoded. To encode the password, use the tool
Encoder.exe in the Bin-Directory.
Return value
-
Initialize
Initializes the PDF signer.
Syntax
Initialize(OdinSignatureStyle signatureStyle, int pageNumber, bool visible, string fieldName, string signatureImage)
62
Parameter
Parameter Meaning
signatureStyle Defines how the signature is to be created.
Possible values:
OdinSignatureStyle.Text: Shows only the specified text.
OdinSignatureStyle.Description: Shows only the description (date/reason/place) and not the specified text.
OdinSignatureStyle.ImageAndText: Shows text and signature image.
OdinSignatureStyle.ImageAndDescription: Shows the description and signature image. pageNumber Defines on which page the signature is to be inserted. visible fieldName
Specifies whether the signature is visible.
Specifies the name of the signature field to be inserted. signatureImage Specifies the image to be shown alongside the text.
Return value
-
RegisterFont
Registers a font file.
Syntax
RegisterFont(string fileName)
RegisterFont(string fileName, string alias)
Parameter
fileName: Name of the TrueType or Type1/3 font file. alias: Alias name the font is registered as.
Return value
-
RegisterFontDirectory
Registers all fonts in a specified directory.
All fonts in c:/windows/fonts and c:/winnt/fonts are registered by default.
63
Syntax
RegisterFontDirectory(string directoryName)
Parameter
directoryName: Name of the directory that contains the fonts to be registered.
Return value
-
SetFont
Defines the font specification for text output.
Syntax
SetFont(string fontName, int fontSize, int fontStyle, string fontColor)
Parameter
fontName: Name of the font. fontSize: Size of the font. fontStyle: Style of the font. See OdinFontStyle. fontColor: Color of the font, for example: "AARRGGBB" or a prescribed name such as "Grey".
Return value
-
SetPosition
Defines the position, size in points and, if required, the background image of the signature.
Conversion of mm -> points: mm / 25,4 => inch * 72 = points
Syntax
SetPosition(double xpos, double ypos, double width, double height, string imageFileName)
Parameter
Xpos: X-position of the signature.
Ypos: Y-position of the signature.
Width: Width of the signature.
Height: Height of the signature. imageFileName: Name of the background image.
Return value
-
SetText
Sets the signature or description text and the contact information of the signer.
64
Syntax
SetText(string text, string reason, string location, string contact)
Parameter
text: Defines the signature text (in the case of OdinSignatureStyle.Text or
OdinSignatureStyle.ImageAndText) reason: Defines the reason (in the case of OdinSignatureStyle.Description or
OdinSignatureStyle.ImageAndDescription) location: Defines the location (in the case of OdinSignatureStyle.Description or
OdinSignatureStyle.ImageAndDescription) contact: Defines the contact information of the signer.
Return value
-
SetTimeStampServer
Sets the URL and the user / password properties of the time stamp server to be used.
Syntax
SetTimeStampServer(string tsaServerUrl, string tsaUser, string tsaPassword)
Parameter
Parameter Meaning
tsaServerUrl URL of the time stamp server tsaUser User name of the time stamp server tsaPassword Password of user.
The password must be encoded.
To encode the password, use the tool Encoder.exe in the Bin-Directory.
Return value
-
Properties of the IOdinPdfSigner Interface
Property
saServer :string
Definition
URL of the time stamp server, for example "http://dse200.ncipher.com/TSS/HttpTspServer"
If this is empty, the current time of the computer is used and not detected/encrypted through the TSA server.
User name of the TSA server. TsaUserName
:string
TsaPassword
:string
FieldName
:string
ImageFileName
:string
Password of the TSA server.
Name of the signature field in the PDF, by default "Signature".
Specifies the name of the image file to be used for the Signature.
65
Text :string
Reason :string
Location :string
Text of the signature. (is used by OdinSignatureStyle.Text or
OdinSignatureStyle.ImageAndText).
Reason for the signature (is used by OdinSignatureStyle.Description or
OdinSignatureStyle.ImageAndDescription).
Location of the signature (is used by OdinSignatureStyle.Description or
OdinSignatureStyle.ImageAndDescription).
Contact information of the signer. Contact :string
PageNumber :int Page the signature will be inserted on.
Visible :bool
XPos :double
Specifies whether the signature is visible.
X-position of the signature in points.
YPos :double
Width :double
Y-position of the signature in points.
Width of the signature in points.
Height :double Height of the signature in points.
FontName
:string
Name of the font used for the signature.
FontColor :string Font color. eg.: "AARRGGBB" or "Gray"
Size of the font. FontSize :int
FontStyle :int Style of the font (a combination of: 0=Normal, 1=Bold, 2=Italic, 4=Underline,
8=Strikethrough)
Property
saServer
Description
URL of the time stamp server, for example
"http://dse200.ncipher.com/TSS/HttpTspServer".
If this property is empty, the current time of the computer is used and not detected or encrypted through the TSA server.
TsaUserName User name of the TSA server.
TsaPassword Password of the TSA server.
FieldName Name of the signature field in the PDF. The default value is
"Signature".
ImageFileName Specifies the name of the image file to be used for the signature.
Text
Reason
Location
Contact
Text of the signature (used by OdinSignatureStyle.Text or
OdinSignatureStyle.ImageAndText).
Reason for the signature (used by OdinSignatureStyle.Description or OdinSignatureStyle.ImageAndDescription).
Location of the signature (used by OdinSignatureStyle.Description or OdinSignatureStyle.ImageAndDescription).
Contact information of the signer.
66
PageNumber
Visible
XPos
YPos
Width
Height
Page the signature is inserted on.
Specifies whether the signature is visible.
X-position of the signature in points.
Y-position of the signature in points.
Width of the signature in points.
Height of the signature in points.
FontName
FontColor
FontSize
Name of the font used for the signature.
Font color, for example "AARRGGBB" or "Gray".
Size of the font.
FontStyle Style of the font.
Possible values
OdinPdfFontStyle.Normal
OdinPdfFontStyle.Bold
Description
0
1
OdinPdfFontStyle.Italic
OdinPdfFontStyle.Underline
2
4
OdinPdfFontStyle.Strikethrough 8
You can define the integer values in combination, for example:
OdinPdfFontStyle.Bold + OdinPdfFontStyle.Italic.
SignatureImage Signature image (is shown by OdinSignatureStyle.ImageAndText or
OdinSignatureStyle.ImageAndDescription).
PdfPassword PDF owner password.
EXAMPLE
; get OdinFileConvert component
OdinFileConvert = ModusProcess.GetComponent("OdinFileConvert")
;
; define variables
; Time stamp server tsaServer = "http://dse200.ncipher.com/TSS/HttpTspServer" tsaUser = "" tsaPassword = ""
;
; Pdf-/Image-Filename inputPdf = "C:\Perceptive\data\Test.pdf" outputPdf = "C:\Perceptive\data\Test_signed.pdf" pdfPassword = ""
67
imageFileName = "C:\Perceptive\data\signature.JPG" bgndImageFileName = ""
;
; Signature-Text fieldName = "Signature" reason = "Reason" location = "Place" contact = "Contact" signatureText = "Signature" signatureStyle = OdinSignatureStyle.Text
;
; Signature position visible = true pageNo = 1 xpos = 100 ypos = 100 width = 150 height = 50
;
; Font fontName = "Verdana" fontSize = 8 fontColor = "00808080" fontStyle = OdinPdfFontStyle.Bold + OdinPdfFontStyle.Italic
;
; create Pdf-Signer with certificate from a PFX file
;pdfSigner =
OdinFileConvert.CreatePdfSigner("C:\Perceptive\Certificates\PS.pfx",
"PerceptiveSoftware")
; create Pdf-Signer with a certificate from the store (My Certificates /
Current Users). pdfSigner = OdinFileConvert.CreatePdfSigner(OdinStoreName.My,
OdinStoreLocation.CurrentUser, OdinX509FindType.FindBySubjectName,
"PerceptiveSoftware", true)
;
; initialize signer pdfSigner.Initialize(signatureStyle, pageNo, visible, fieldName, imageFileName)
;
; initialize position pdfSigner.SetPosition(xpos, ypos, width, height, bgndImageFileName)
;
; initialize text/description
;pdfSigner.SetText("", reason, location, contact) pdfSigner.SetText(signatureText, reason, location, contact)
;
; initialize font pdfSigner.SetFont(fontName, fontSize, fontStyle, fontColor)
;
68
; initialize time stamp server pdfSigner.SetTimeStampServer(tsaServer, tsaUser, tsaPassword)
;
; insert signature to PDF pdfSigner.AddSignature(inputPdf, outputPdf, pdfPassword)
ConvertSingleFile
Converts a single file to the specified format.
Available formats are dependent on the Compart license for input and output filters.
ConvertSingleFile
SYNTAX ConvertSingleFile(inputFileName, outputFileName)
ConvertSingleFile(inputFileName, outputFileName, singlePage)
ConvertSingleFile(inputFileName, outputFileName, singlePage, convertOptions)
ARGUMENTS inputFileName The file to convert. outputFileName The file to create. singlePage TRUE = Write one output file per page according to the following naming convention
FILENAME_#PAGENUMBER#.outputformat
Example
OutputFilename_001.pdf
The default value is FALSE. convertOptions Comma separated string containing the metadata and options used during conversion. Their use is dependent on the output format. The parameters are optional.
Metadata
TITLE Document title.
SUBJECT
AUTHOR
Document subject.
Document author.
KEYWORDS
Document keywords.
Options
PDF 1.3/1.4
TRUE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
TEXTNOTE_CHANGES
Create Template are set to True.
FALSE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to False.
CHANGES
PDF 1.3/1.4
TRUE = PDF security attributes for Document
69
70
FILL
COPY
DIGITAL_COPY
ASSEMBLE
ACCESSIBILITY
DUPLEX_ADDPAGE
DUPLEX_OPTIMIZE
Assembly, Page Extraction, Comment, Sign and
Create Template are set to True.
FALSE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to False.
PDF 1.4
TRUE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to True.
FALSE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to False.
PDF 1.4
TRUE = PDF security attributes for Document
Assembly, Copy Content, Copy Content for
Accessibility, Page Extraction, Comment, Sign and Create Template are set to True.
FALSE = PDF security attributes for Document
Assembly, Copy Content, Copy Content for
Accessibility, Page Extraction, Comment, Sign and Create Template are set to False.
PDF 1.4
TRUE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to True.
FALSE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to False.
PDF 1.4
TRUE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to True.
FALSE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to False.
Assembling more than one document is not allowed.
PDF 1.4
TRUE = PDF security attributes for Copy Content,
Copy Content for Accessibility, Page Extraction are set to True.
FALSE = PDF security attributes for Copy
Content, Copy Content for Accessibility, Page
Extraction are set to False.
TRUE = This option specifies whether an empty page should be added to a duplex document with an odd number of pages.
FALSE = Default setting. This option sets simplex mode for the last page of a duplex document with an odd number of pages.
TRUE = Duplex settings are only set in the output stream, when duplex mode changes.
FALSE = Duplex settings are set in the output
71
MAP_COLOR stream.
TRUE/FALSE
This parameter is used to define whether color mapping for the AFP-HighlightColor Definition is executed or not. The individual color definitions can be specified as MapColor_1 to MapColor_n.
Example:
Map_Color=TRUE,"MapColor_1=-
1,20,black","MapColor_2=0,20,red"
Note As MapColor parameters contain comma separated values themselves, the complete string must be enclosed in quotation marks.
The structure is as follows:
MapColor_???= HSB-Color,Threshold,ColorName
HSB-Color=HSB Color Angle
Threshold= Threshold value of the HSB color
ColorName= Name of the color as defined in the
AFP profile under HighlightColorList.
The example above requires the following definitions in the AFP profile:
</highlightcolorlist>
<highlightcolor name='red' type='OCA' number='0x0002' foreground-rgb="#00FF0000" />
<highlightcolor name='black' type='OCA' number='0x0008' foreground-rgb="#00000000" />
</highlightcolorlist> and
<optimizepa value="never"/>
<color value="FALSE" />
<usehighlightcolor value="TRUE" />
<enablebilevelimage value="TRUE" />
SHOW_BOOKMARKS
TRUE = Bookmarks show in the opened PDF.
FALSE = Bookmarks do not show in the opened
PDF.
OVERLAYS
MERGEFONTS
TRUE = OVERLAYS are created.
FALSE = Default. OVERLAYS are not created.
TRUE: Default
FALSE
TRUE = Default, PCL output optimization is activated.
MERGE_SPLITWORDS FALSE = PCL output optimization is deactivated.
This option should be set to FALSE if you have character spacing problems in a generated PCL.
The default value is TRUE.
TRUE = If page orientation is landscape, the page
ROTATE_LANDSCAPE rotates by 90°.
FALSE = The page does not rotate.
The default value is TRUE.
ConvertXDocToHtml
Converts an XDOC file to HTML.
ConvertXDocToHtml
SYNTAX ConvertXDocToHtml(xDocFileName, htmlOutputFileName, saveImages)
ARGUMENTS xDocFileName The XDOC file to convert. htmlOutputFileName The HTML file to create. saveImages TRUE = Save images to the same directory.
ConvertXDocToString
Converts an XDOC file to a string using the line break character specified for the environment or set as a parameter.
ConvertXDocToString
SYNTAX ConvertXDocToString(xDocFileName)
ConvertXDocToString(xDocFileName, newLine)
ARGUMENTS xDocFileName The XDOC file you want to convert. newLine Defines the type of line break.
Possible values Result
NewLineLF LineFeed ("\n" - $0A)
NewLineCRLF CarriageReturn/LineFeed ("\r\n" - $0D $0A)
RETURN The XDOC file as string.
ConvertXDocToText
Converts an XDOC file to a text file.
ConvertXDocToText
SYNTAX ConvertXDocToText(xDocFileName, txtOutputFileName)
ConvertXDocToText(xDocFileName, txtOutputFileName, encoding)
ConvertXDocToText(xDocFileName, txtOutputFileName, encoding, newLine)
ARGUMEN
TS xDocFileName The XDOC file you want to convert. txtOutputFileNa me
The text file you want to create. encoding You can use the following values as encoding parameters.
72
ASMO-708
DOS-720 ibm737 ibm775 ibm850 ibm852
IBM855 ibm857
IBM00858
IBM860 ibm861
DOS-862
IBM863
IBM864
IBM865 cp866 ibm869
IBM870 windows-874 cp875 shift_jis gb2312 ks_c_5601-1987 big5
IBM1026
IBM01047
875
932
936
949
950
1026
1047
864
865
866
869
870
874
855
857
858
860
861
862
863
708
720
737
775
850
852
Empty string. In this case, the default encoding (ANSI code page of the operating system) is used.
Code page, for example, "1252"
Name, for example, "windows-1252"
Friendly name, for example, "Western European" (Windows)
Possible encoding parameters
Code page Name
37 IBM037
Friendly name
IBM EBCDIC (USA-Canada)
437
500
IBM437
IBM500
OEM USA
IBM EBCDIC (International)
Arabic (ASMO 708)
Arabic (DOS)
Greek (DOS)
Baltic (DOS)
Western European (DOS)
Eastern European (DOS)
OEM Cyrillic
Turkish (DOS)
OEM Multilingual Latin I
Portuguese (DOS)
Icelandic (DOS)
Hebrew (DOS)
French, Canada (DOS)
Arabic (864)
Nordic (DOS)
Cyrillic (DOS)
Greek, modern (DOS)
IBM EBCDIC (Multilingual Latin-2)
Thai (Windows)
IBM EBCDIC (Greek, modern)
Japanese (Shift-JIS)
Simplified Chinese (GB2312)
Korean
Chinese (Traditional) (Big5)
IBM EBCDIC (Turkish, Latin-5)
IBM Latin-1
73
74
1140
1141
1142
1143
1361
10000
10001
10002
10003
10004
1253
1254
1255
1256
1257
1258
10005
10006
10007
10008
10010
10017
10021
1144
1145
1146
1147
1148
1149
1200
1201
1250
1251
1252
IBM01140
IBM01141
IBM01142
IBM01143
IBM01144
IBM01145
IBM01146
IBM01147
IBM01148
IBM01149 utf-16 unicodeFFFE windows-1250 windows-1251
Windows-1252 windows-1253 windows-1254 windows-1255 windows-1256 windows-1257 windows-1258
Johab macintosh x-mac-japanese x-mac-chinesetrad x-mac-korean x mac-arabic x-mac-hebrew x-mac-greek x-mac-cyrillic x-mac-chinesesimp x-mac-romanian x-mac-ukrainian x-mac-thai
IBM EBCDIC (USA-Canada-European)
IBM EBCDIC (Germany-European)
IBM EBCDIC (Denmark-Norway-
European)
IBM EBCDIC (Finland-Sweden-
European)
IBM EBCDIC (Italian-European)
IBM EBCDIC (Spain-European)
IBM EBCDIC (Great Britain-European)
IBM EBCDIC (France-European)
IBM EBCDIC (International-European)
IBM EBCDIC (Icelandic-European)
Unicode
Unicode (Big Endian)
Central European (Windows)
Cyrillic (Windows)
Western European (Windows)
Greek (Windows)
Turkish (Windows)
Hebrew (Windows)
Arabic (Windows)
Baltic (Windows)
Vietnamese (Windows)
Korean (Johab)
Western European (Mac)
Japanese (Mac)
Chinese traditional (Mac)
Korean (Mac)
Arabic (Mac)
Hebrew (Mac)
Greek (Mac)
Cyrillic (Mac)
Chinese simplified (Mac)
Romanian (Mac)
Ukrainian (Mac)
Thai (Mac)
20107
20108
20127
20261
20269
20273
20277
20278
20002
20003
20004
20005
20105
20106
10029
10079
10081
10082
12000
12001
20000
20001
20280
20284
20285
20290
20297
20420
20423
20424
20833
20838
20866
20871 x-mac-ce x-mac-icelandic x-mac-turkish x-mac-croatian utf-32 utf-32BE x-Chinese-CNS x-cp20001 x-Chinese-Eten x-cp20003 x-cp20004 x-cp20005 x-IA5 x-IA5-German x-IA5-Swedish x-IA5-Norwegian us-ascii x-cp20261 x-cp20269
IBM273
IBM277
IBM278
IBM280
IBM284
IBM285
IBM290
IBM297
IBM420
IBM423
IBM424 x-EBCDIC-
KoreanExtended
IBM-Thai koi8-r
IBM871
Central European (Mac)
Icelandic (Mac)
Turkish (Mac)
Croatian (Mac)
Unicode (UTF-32)
Unicode (UTF-32-Big Endian)
Chinese traditional (CNS)
TCA Taiwan
Chinese traditional (Eten)
IBM5550 Taiwan
TeleText Taiwan
Wang Taiwan
Western European (IA5)
German (IA5)
Swedish (IA5)
Norwegian (IA5)
US-ASCII
T.61
ISO-6937
IBM EBCDIC (Germany)
IBM EBCDIC (Denmark-Norway)
IBM EBCDIC (Finland-Sweden)
IBM EBCDIC (Italy)
IBM EBCDIC (Spain)
IBM EBCDIC (Great Britain)
IBM EBCDIC (Japanese Katakana)
IBM EBCDIC (France)
IBM EBCDIC (Arabic)
IBM EBCDIC (Greek)
IBM EBCDIC (Hebrew)
IBM EBCDIC (Korean, extended)
IBM EBCDIC (Thai)
Cyrillic (KOI8-R)
IBM EBCDIC (Icelandic)
75
76
IBM880
IBM905
IBM00924
EUC-JP iso-2022-kr x-cp50227 euc-jp
EUC-CN euc-kr hz-gb-2312
GB18030 x-iscii-de x-iscii-be x-iscii-ta x-cp20936 x-cp20949 cp1025 koi8-u iso-8859-1 iso-8859-2 iso-8859-3 iso-8859-4 iso-8859-5 iso-8859-6 iso-8859-7 iso-8859-8 iso-8859-9 iso-8859-13 iso-8859-15 x-Europa iso-8859-8-i iso-2022-jp csISO2022JP iso-2022-jp
20880
20905
20924
20932
28595
28596
28597
28598
28599
28603
20936
20949
21025
21866
28591
28592
28593
28594
28605
29001
38598
50220
50221
50222
50225
50227
51932
51936
51949
52936
54936
57002
57003
57004
IBM EBCDIC (Cyrillic, Russian)
IBM EBCDIC (Turkish)
IBM Latin-1
Japanese (JIS 0208-1990 and 0212-
1990)
GB2312-80 Chinese (simple)
Korean Wansung
IBM EBCDIC (Cyrillic, Serbian-Bulgarian)
Cyrillic (KOI8-U)
Western European (ISO)
Central European (ISO)
Latin 3 (ISO)
Baltic (ISO)
Cyrillic (ISO)
Arabic (ISO)
Greek (ISO)
Hebrew (ISO-Visual)
Turkish (ISO)
Estonian (ISO)
Latin 9 (ISO)
Europe
Hebrew (ISO-Logical)
Japanese (JIS)
Japanese (JIS, 1 Byte Kana allowed)
Japanese (JIS, 1 Byte Kana allowed -
SO/SI)
Korean (ISO)
ISO-2022 Chinese (simplified)
Japanese (EUC)
Chinese simplified (EUC)
Korean (EUC)
Chinese simplified (HZ)
GB18030 Chinese simplified
ISCII Devanagari
ISCII Bengali
ISCII Tamil
newLine
57005
57006
57007
57008
57009
57010
57011
65000
65001 x-iscii-te x-iscii as x-iscii-or x-iscii-ka x-iscii-ma x-iscii-gu x-iscii-pa utf-7 utf-8
ISCII Telugu
ISCII Assamese
ISCII Oriya
ISCII Kannada
ISCII Malayalam
ISCII Gujarati
ISCII Punjabi
Unicode (UTF-7)
Unicode (UTF-8)
Defines the type of line break.
Possible values
NewLineCRLF: CarriageReturn/LineFeed ("\r\n" - $0D $0A)
NewLineLF: LineFeed ("\n" - $0A)
ConvertXDocToXps
Converts an XDOC file to an XPS file.
ConvertXDocToString
SYNTAX ConvertXDocToXps(xDocFileName, xpsOutputFileName)
ARGUMENTS xDocFileName The XDOC file you want to convert. xpsOutputFileName The XPS file you want to create.
End
Ends processing and frees up the respective resources.
End
SYNTAX End()
LoadDocument
Loads the specified file and returns the IOdinStreamDocument interface with which, for example text output can be written to a page of the document.
For more information, refer to Context OdinStreamDocument.
LoadDocument
SYNTAX LoadDocument(fileName)
ARGUMENTS fileName The file to load.
RETURN IOdinStreamDocument interface with the following properties and functions.
77
AddComment
AddPJLCommand
EditPage
GetInputBin
Image
IsDuplex
IsPortrait
Line
Pagecount
Post
Rectangle
SetFont
SetInputBin
TextOut
NumberOfFilesConverted
Returns the number of files already converted and appended to the output file during batch conversion.
NumberOfFilesConverted
SYNTAX NumberOfFilesConverted()
RETURN Number of converted files.
Start
Initializes processing for batch conversion. Use the AddFile and AddDocument functions to write 1-n documents to the output file.
Start
SYNTAX
ARGUMENTS
Start(outputFileName)
Start(outputFileName, singlePage)
Start(outputFileName, singlePage, convertOptions) outputFileName Name of the output file singlePage TRUE = Write one output file per page according to the following naming convention.
FILENAME_#PAGENUMBER#.outputformat
Example
OutputFilename_001.pdf
The default value is FALSE. convertOptions Used to specify options for conversion and metadata.
Options are defined in the form of a comma-separated string. Their use depends on the output format.
The parameters are optional.
Metadata
TITLE Document title.
78
79
SUBJECT
AUTHOR
Document subject.
Document author.
KEYWORDS
Document keywords.
Options
PDF 1.3/1.4
TRUE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
TEXTNOTE_CHANGES
Create Template are set to True.
FALSE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to False.
CHANGES
PDF 1.3/1.4
TRUE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to True.
FALSE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to False.
FILL
COPY
DIGITAL_COPY
ASSEMBLE
PDF 1.4
TRUE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to True.
FALSE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to False.
PDF 1.4
TRUE = PDF security attributes for Document
Assembly, Copy Content, Copy Content for
Accessibility, Page Extraction, Comment, Sign and Create Template are set to True.
FALSE = PDF security attributes for Document
Assembly, Copy Content, Copy Content for
Accessibility, Page Extraction, Comment, Sign and Create Template are set to False.
PDF 1.4
TRUE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to True.
FALSE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to False.
PDF 1.4
TRUE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
Create Template are set to True.
FALSE = PDF security attributes for Document
Assembly, Page Extraction, Comment, Sign and
80
ACCESSIBILITY
DUPLEX_ADDPAGE
DUPLEX_OPTIMIZE
MAP_COLOR
Create Template are set to False.
Assembling more than one document is not allowed.
PDF 1.4
TRUE = PDF security attributes for Copy Content,
Copy Content for Accessibility, Page Extraction are set to True.
FALSE = PDF security attributes for Copy
Content, Copy Content for Accessibility, Page
Extraction are set to False.
TRUE = This option specifies whether an empty page should be added to a duplex document with an odd number of pages.
FALSE = Default setting. This option sets simplex mode for the last page of a duplex document with an odd number of pages.
TRUE = Duplex settings are only set in the output stream, when duplex mode changes.
FALSE = Duplex settings are set in the output stream.
TRUE/FALSE
This parameter is used to define whether color mapping for the AFP-HighlightColor Definition is executed or not. The individual color definitions can be specified as MapColor_1 to MapColor_n.
Example:
Map_Color=TRUE,"MapColor_1=-
1,20,black","MapColor_2=0,20,red"
Note As MapColor parameters contain comma separated values themselves, the complete string must be enclosed in quotation marks.
The structure is as follows:
MapColor_???= HSB-Color,Threshold,ColorName
HSB-Color=HSB Color Angle
Threshold= Threshold value of the HSB color
ColorName= Name of the color as defined in the
AFP profile under HighlightColorList.
The example above requires the following definitions in the AFP profile:
</highlightcolorlist>
<highlightcolor name='red' type='OCA' number='0x0002' foreground-rgb="#00FF0000" />
<highlightcolor name='black' type='OCA' number='0x0008' foreground-rgb="#00000000" />
</highlightcolorlist> and
<optimizepa value="never"/>
<color value="FALSE" />
<usehighlightcolor value="TRUE" />
<enablebilevelimage value="TRUE" />
SHOW_BOOKMARKS
TRUE = Bookmarks show in the opened PDF.
FALSE = Bookmarks do not show in the opened
PDF.
OVERLAYS
MERGEFONTS
TRUE = OVERLAYS are created.
FALSE = Default. OVERLAYS are not created.
TRUE: Default
FALSE
TRUE = Default, PCL output optimization is activated.
MERGE_SPLITWORDS
FALSE = PCL output optimization is deactivated.
This option should be set to FALSE if you have character spacing problems in a generated PCL.
The default value is TRUE.
TRUE = If page orientation is landscape, the page
ROTATE_LANDSCAPE rotates by 90°.
FALSE = The page does not rotate.
The default value is TRUE.
Sample Script OdinFileConvert: 1 file
; get FileConverter component
OdinFileConverter = ModusProcess.GetComponent("OdinFileConvert")
;
StringListAdd("options", "USER_PASSWORD=ymM/Mgjelzq/rdPdf6q6rg==")
StringListAdd("options", "OWNER_PASSWORD=uiuCKFZ+QE1VHSQAA/xQQQ==")
StringListAdd("options", "LINEARIZED=true")
StringListAdd("options", "TITLE=document-title")
StringListAdd("options", "SUBJECT=document-subject")
StringListAdd("options", "AUTHOR=JKlinger")
StringListAdd("options", "KEYWORDS=document-keywords")
StringListAdd("options", "PRINT=true")
StringListAdd("options", "TEXTNOTE_CHANGES=false")
StringListAdd("options", "CHANGES=false")
StringListAdd("options", "FILL=false")
StringListAdd("options", "COPY=true")
StringListAdd("options", "DIGITAL_COPY=false")
StringListAdd("options", "ASSEMBLE=false")
StringListAdd("options", "ACCESSIBILITY=false")
; options = StringListGetCommaText("options")
; convert single XPS file to PCL
81
OdinFileConverter.OutputFormat = "pcl"
OdinFileConverter.ConvertSingleFile("c:\temp\Document.xps",
"c:\temp\output.pcl", false, options)
;
; convert single XPS file to Postscript
OdinFileConverter.OutputFormat = "pos"
OdinFileConverter.ConvertSingleFile("c:\temp\Document.xps",
"c:\temp\output.pos", false, options)
;
; convert single XPS file to PDF
OdinFileConverter.OutputFormat = "pdf"
OdinFileConverter.ConvertSingleFile("c:\temp\Document.xps",
"c:\temp\output.pdf", false, options)
Sample Script OdinFileConvert: 1-n Files
; Get component for converting
OdinFileConverter = ModusProcess.GetComponent("OdinFileConvert")
;
; Start batch conversion
OdinFileConverter.OutputFormat = "pdf"
OdinFileConverter.Start("c:\temp\output.pdf")
;
; Load document #1 (2 pages) document = OdinFileConverter.LoadDocument("c:\temp\TestDocument1.xps")
;
; Create bookmarks on both pages and output an additional text document.EditPage(0) document.AddBookmark("doc1", "", "Document 1") document.AddBookmark("doc1_page1", "doc1", "Page 1") document.SetFont("Tahoma", 16) document.TextOut(20.5, 10.5, "Document#1 Page#1", false, false) document.Post()
; document.EditPage(1) document.AddBookmark("doc1_page2", "doc1", "Page 2", 100, 100) document.TextOut(20.5, 10.5, "Document#1 Page#2", false, false) document.Post()
;
; Insert document in the output file
OdinFileConverter.AddDocument(document)
;
; Document #2: as test inserting a document with AddFile in between, no bookmarks added
OdinFileConverter.AddFile("c:\temp\TestDocument2.xps")
;
; Add document #3 document = OdinFileConverter.LoadDocument("c:\temp\TestDocument3.xps")
;
82
; Create bookmarks on both pages and output an additional text document.EditPage(0) document.AddBookmark("doc3", "", "Dokument 3") document.AddBookmark("doc3_page1", "doc3", "Seite 1") document.SetFont("Tahoma", 16) document.TextOut(20.5, 10.5, "Document#3 Page#1", false, false) document.Post()
; document.EditPage(1) document.AddBookmark("doc3_page2", "doc3", "Seite 2", 100, 100) document.TextOut(20.5, 10.5, "Document#3 Page#2", false, false) document.Post()
;
; Insert document in the output file
OdinFileConverter.AddDocument(document)
;
; Finish batch conversion
OdinFileConverter.End()
Sample Script OdinFileConvert: xDoc to XPS
; get FileConverter component
OdinFileConverter = ModusProcess.GetComponent("OdinFileConvert")
;
; convert an xDoc file (DocX) to XPS
OdinFileConverter.ConvertXDocToXps("c:\temp\TestDocument.docx",
"c:\temp\output.xps")
Convert Doc to Docx
ConvertDocToDocX
Converts and saves the specified DOC file to DOCX. You can invoke the function repeatedly.
ConvertDocToDocX
SYNTAX ConvertDocToDocX(docFileName, docXFilename)
ARGUMENTS docFileName DOC file. docXFilename DOCX file.
EndDocConvert
Ends conversion.
EndDocConvert
SYNTAX EndDocConvert()
StartDocConvert
Initializes Microsoft Word for conversion.
83
StartDocConvert
SYNTAX StartDocConvert(wordRestart, showWord)
ARGUMENTS wordRestart Defines the number of conversion operations Word performs before being automatically restarted. showWord Defines whether Word is visible during the operation.
84
OdinFilterManager
About OdinFilterManager
You must have an Odin license installed to use the OdinFilterManager component.
The OdinFilterManager component enables you to group job data sets to stacks or envelopes for further processing.
Properties of OdinFilterManager
Property Meaning
DB Alias Odin database on which the component executes its actions.
FilterScript Script that executes in the filter component context.
Available context
OdinFilter
OdinFilterManager Functions
Run
Executes the script assigned to the FilterScript property.
Run
SYNTAX Run()
Sample Script OdinFilterManager
OdinFilter = ModusProcess.GetComponent("OdinFilterManager")
OdinFilter.Run()
85
OdinPrint
About OdinPrint
The OdinPrint component enables you to output the spool files of stack jobs to a physical (online) printer.
You can assign the jobs of a single stack to different printers. The used printer and form are retrieved from the individual job dataset. Both the specified printer and form objects must exist in the repository.
Specific printer events execute according to the particular process steps carried out during job output.
The component supports the following scenarios.
Processing the jobs of a specific stack.
Processing stacks determined by a configurable select statement.
Properties of OdinPrint
Property
DB Alias
Description
Odin database on which the component executes its actions.
IsRetryable An enumerator specifying whether the stack can be reprinted in the event of an error.
Possible values
OdinRetryOptions.NotRetryAble: The stack is set to locked and no attempt to reprint is made.
OdinRetryOptions.RetryAbleContinue: The whole stack is reset to reprint. Only faulted or stack jobs not yet printed are processed.
OdinRetryOptions.RetryAbleRestart: The whole stack is reset to reprint. All jobs of the stack are processed.
MaxRetryCount
Maximum number of retries, before the stack status sets to Locked.
NextStackType Specifies the next stack type set after successful execution and after calling the End function.
The drop-down list displays all possible stack types.
Any additionally required stack types must be defined in the file
ModusSuite.Common.PropertyEditors.dll.config.
Default stack types
Name Description Stack type
0 Print Stack is ready to be printed to an online printer or email printer (online print).
RetryPause
StackSelect
10
20
30
40
50
99
PortoOptimization Stack is ready for IT franking. This function is currently not supported.
Streaming
Convert
Stack is ready for streaming.
StreamPrint
Stack is ready to be converted to the appropriate output format.
Stack (stream) is ready for batch printing to an outsourcing printer.
Archive
Finish
Stack is ready for archiving.
Stack processing is finished, no further action.
Time in minutes before this stack is reprinted or reset through the OdinDbTasks component.
Defines the select statement to detect the next stack to be processed.
You can either specify the select statement or refer to a lookup table, for example
$OdinSQL.PrintStackSelect$.
86
OdinPrint Events
Event
OnAfterStack
Meaning
The specified script is executed after the stack processing when calling the End function.
The event corresponds to the AfterStack event of a printer in modus 4.
Available context:
Context OdinCustomProcess
OnBeforeStack The specified script is executed when calling the Start() function, before executing the stack processing.
The event corresponds to the AfterStack event of a printer in modus 4.
Available context:
Context OdinCustomProcess
OdinPrint Functions
AddBatchPrintJob
Adds a job to the internal list.
An exception is thrown if batch print is not initialized for the printer specified in the job, or the job is added redundantly.
AddBatchPrintJob
SYNTAX AddBatchPrintJob(job)
ARGUMENTS
EXAMPLE job Job you want to insert. job = MailJobEnumerator.Current
OdinPrint.AddBatchPrintJob(job)
BatchJobCount
If you do not specify a printer name, the function returns the total number of print jobs added to all initialized batch prints.
BatchJobCount
SYNTAX BatchJobCount()
BatchJobCount(printerName)
ARGUMENTS printerName Printer name.
RETURN
EXAMPLE
Number of jobs.
BatchJobCount(printerName)
CurrentPrinter
Returns the name of the printer currently running a batch print job.
CurrentPrinter
87
SYNTAX CurrentPrinter()
RETURN Printername
End
Ends component processing, sets the stack to the next stack type and, if relevant, executes a script assigned to the OnAfterStack event.
End
SYNTAX
ARGUMENTS
End()
End(errorMessage) errorMessage Error message.
The following values are set.
ODS_Print_End: Current date and time.
ODS_Delete_At: Current date, time, and stack hold time.
If processing ends correctly, the following values are set.
ODS_PrintState: 2 (OdinPrintState.OK)
ODS_State: NextStackState of the component.
ODS_StackType: NextStackState of the component.
On error, the following values are set.
ODS_PrintState: 3 (OdinPrintState.Error)
ODS_State: 3 (OdinStackState.Locked)
ODS_MessageText: Error message.
ExecuteBatchPrint
Executes all initialized batch print jobs and prints the jobs on the corresponding printer.
Prints on all printers initialized with InitializeBatchPrint() .
All jobs added with AddBatchPrintJob() are printed.
ExecuteBatchPrint
SYNTAX ExecuteBatchPrint()
ExecuteBatchPrint(printername)
ARGUMENTS printername Printer name.
The specified printer must have been initialized with InitializeBatchPrint() .
RETURN TRUE = Printing successful
FALSE = Error while printing
88
GetCurrentStackRow
After calling Start() and before calling End() the function returns an object whose interface provides read access to the current stack dataset.
GetCurrentStackRow
SYNTAX GetCurrentStackRow()
RETURN Object interface that provides read access to the current stack dataset.
The following functions are available.
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
GetValue(columnName) columnName Column name
The column value.
If the data type of the database column is DATE, Datetime or any valid date type, the date read generally returns in the format MM/DD/YYYY hh:mm:ss.
GetObject("DateVar","MLDate")
StringDateVar =
CurrentJobRecord.GetValue("ODJ_create_at")
;Convert date to the required format with the help of the MLDate object
IntDateVar = DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE= DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss ", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following functions.
Current Returns the current object.
MoveNext() Moves the position to the next object to process.
SYNTAX MoveNext()
RETURN TRUE = Successful
FALSE = The end of the collection is passed.
Reset Resets the enumerator back to the beginning of the first element.
GetNextStack
Determines the next stack to convert according to the corresponding SQL, which is stored in the
StackSelect property, and returns its ID.
89
GetNextStack
SYNTAX GetNextStack()
RETURN ID of the stack found, or an empty string if none found.
GetPrinterEnumerator
Returns an enumerator for the printers used in a stack.
On loading, the printers used in a stack are sorted in the following order.
Printer type (online printer first, then email printer)
Printer priority for identical printer types
Printer name for identical priorities
GetPrinterEnumerator
SYNTAX GetPrinterEnumerator()
RETURN
Enumerator with the following functions.
Current Returns the current object.
MoveNext() Moves the position to the next object to process.
SYNTAX MoveNext()
RETURN TRUE = Successful
FALSE = The end of the collection is passed.
Reset Resets the enumerator to the beginning of the first element.
GetPrintJobEnumerator
Returns an enumerator for the jobs of a printer. Use the function GetValue() to retrieve job data.
GetPrintJobEnumerator
SYNTAX GetPrintJobEnumerator(printerName)
ARGUMENTS printerName Printer name.
RETURN Enumerator with the following functions.
Current Returns the current object.
MoveNext() Moves the position to the next object to process.
SYNTAX MoveNext()
RETURN TRUE = Successful
FALSE = The end of the collection is passed.
Reset Resets the enumerator to the beginning of the first element.
GetMailEnumerator
Returns an enumerator for the email address in the jobs of a printer.
The enumerator uses Current to retrieve an email address, with the help of an iterator it can iterate through the various email recipients in the jobs.
90
GetMailEnumerator
SYNTAX GetMailEnumerator(printerName)
ARGUMENTS printerName Printer name.
RETURN
Enumerator with the following functions.
Current Returns the current object.
MoveNext() Moves the position to the next object to process.
SYNTAX MoveNext()
RETURN TRUE = Successful
FALSE = The end of the collection is passed.
Reset Resets the enumerator to the beginning of the first element.
GetMailJobEnumerator
Returns an enumerator for the jobs of a printer with a specific email recipient. Use the GetValue() function to retrieve job data.
GetMailJobEnumerator
SYNTAX GetMailJobEnumerator(printerName, email)
ARGUMENTS printerName Printer name. email Email address.
RETURN
Enumerator with the following functions.
Current Returns the current object.
MoveNext() Moves the position to the next object to process.
SYNTAX MoveNext()
RETURN TRUE = Successful
FALSE = The end of the collection is passed.
Reset Resets the enumerator to the beginning of the first element.
InitializeBatchPrint
Initializes batch print for a specified printer. You can initialize only one batch print per printer. A second initialization raises an exception.
InitializeBatchPrint
SYNTAX InitializeBatchPrint(printerName)
InitializeBatchPrint(printerName, useOneSpoolfile)
ARGUMENTS printerName Printer name. useOneSpoolfile TRUE = Creates a single printer spool file for all inserted jobs.
FALSE = Jobs print in succession.
IsEmailPrinter
91
Checks whether the printer in question is an email printer.
IsEmailPrinter
SYNTAX GetSectionNames(printerName)
ARGUMENTS printerName Printer name.
RETURN TRUE = Printer is an email printer.
FALSE = Printer is not an email printer.
IsPrinterActive
Checks whether a printer is activated.
IsPrinterActive
SYNTAX IsPrinterActive(printerName)
ARGUMENTS printerName Printer name.
RETURN TRUE = The printer is activated.
FALSE = The printer is deactivated due to an error.
PrintJob
Prints a job to a printer. The printer name is taken from the data field ODJ_Printer_Name.
PrintJob
SYNTAX
ARGUMENTS
RETURN
PrintJob(job) job Job to print.
TRUE = Print successful.
FALSE = Error while printing. The error automatically inserts to the corresponding stack record and can be accessed through the LastErrorMessage property.
Start
Loads and initializes the given stack and executes a script assigned to the OnBeforeStack event.
The stack must be of the corresponding stack type to that required of the component. The status must be set to Wait.
Start
SYNTAX
ARGUMENTS
Start(stackId) stackId Stack ID
After successful loading, the stack is locked and the statuses set as follows.
ODS_LockBy
ODS_State
ODS_PrintState
Name of the current user
1 (OdinStackState.InWork)
1 (OdinPrintState.InWork)
92
ODS_Print_Start Current date and time
ODS_MessageText Empty string
Sample Script OdinPrint
; define whether print all jobs in 1 spool file or print separately useOneSpoolfile = true
;
; initialize print components
OdinPrint = ModusProcess.GetComponent("OdinPrint")
;
; determine next stack stackID = OdinPrint.GetNextStack()
;
; was a stack found ? if (stackID <> "")
;
; Yes, now initialize stack print
OdinPrint.Start(stackID)
;
; get a printer enumerator and print the jobs for each printer
PrinterEnumerator = OdinPrint.GetPrinterEnumerator()
;
; are there more printers in the stack for which jobs are to be processed?
nextPrinter = PrinterEnumerator.MoveNext()
;
while (nextPrinter = true)
; yes, now print all jobs for this printer in one spool file
printerName = PrinterEnumerator.Current
;
; Is the printer active?
if (OdinPrint.IsPrinterActive(printerName))
; yes, is it an Email Printer.
if (OdinPrint.IsEmailPrinter(printerName))
;
; yes, now initialize batch print for the Email Printer
OdinPrint.InitializeBatchPrint(printerName)
;
; get an email enumerator for this printer
MailEnumerator = OdinPrint.GetMailEnumerator(printerName)
;
; any more emails for this printer?
nextEmail = MailEnumerator.MoveNext()
;
while (nextEmail = true and
OdinPrint.IsPrinterActive(printerName))
; get email address from enumerator
93
emailAdr = MailEnumerator.Current
;
; get an mail job enumerator for this email address
MailJobEnumerator =
OdinPrint.GetMailJobEnumerator(printerName, emailAdr)
;
; and print all jobs for this Email Printer and for this email address
nextMailJob = MailJobEnumerator.MoveNext()
;
while (nextMailJob = true)
; get current job from enumerator
job = MailJobEnumerator.Current
; as a test get job ID
jobId = job.GetValue("ODJ_ID")
;
; insert job as BatchPrintJob
OdinPrint.AddBatchPrintJob(job)
;
; process next Job
nextMailJob = MailJobEnumerator.MoveNext()
end-while
;
; any BatchPrintJobs found?
; If an empty string passed here, the number of jobs
; for *all* initialized BatchPrints is returned.
printed = true
;
if (OdinPrint.BatchJobCount(printerName) > 0)
; yes, now execute print for this printer
printed = OdinPrint.ExecuteBatchPrint(printerName)
;
if (printed = false)
Protocol("Error in print to printer '{0}':", 1, printerName)
end-if
; This function executes all initialized BatchPrints in the order
; they were initialized.
;OdinPrint.ExecuteBatchPrint()
end-if
;
; If printed, check if there are more emails for the printer
; to process.
if (printed = true)
nextEmail = MailEnumerator.MoveNext()
end-if
end-while
94
else
; Initialize Batchprint for this Online-Printer
; and print all Jobs as one spool file!
OdinPrint.InitializeBatchPrint(printerName, useOneSpoolfile)
; This call sets useOneSpoolfile to TRUE !
;OdinPrint.InitializeBatchPrint(printerName)
;
; get a job enumerator for this printer
JobEnumerator = OdinPrint.GetPrintJobEnumerator(printerName)
;
; and insert or print all jobs
nextJob = JobEnumerator.MoveNext()
;
while (nextJob = true)
; get current job from enumerator
job = JobEnumerator.Current
; as a test get job ID
jobId = job.GetValue("ODJ_ID")
;
; This function enables you to print the individual job directly
;OdinPrint.PrintJob(job)
;
; insert job as BatchPrintJob
OdinPrint.AddBatchPrintJob(job)
;
; process next Job
nextJob = JobEnumerator.MoveNext()
;
end-while
;
; any BatchPrintJobs found?
; If an empty string passed here, the number of jobs
; for *all* initialized BatchPrints is returned.
;
if (OdinPrint.BatchJobCount(printerName) > 0)
;
; yes, now execute print for this printer
printed = OdinPrint.ExecuteBatchPrint(printerName)
;
if (printed = false)
Protocol("Error while printing on printer '{0}':", 1, printerName)
end-if
; This function executes all initialized BatchPrints in the order
; they were initialized.
;OdinPrint.ExecuteBatchPrint()
end-if
95
end-if
end-if
;
; are there any more printers that need to be processed?
nextPrinter = PrinterEnumerator.MoveNext()
end-while
;
; finish stack print
OdinPrint.End()
; end-if
96
OdinProcessImport
About OdinProcessImport
Use this component to import print processing data into the Odin database tables for further processing.
Properties of OdinProcessImport
Property Description
CurrentProcessDocumentDirectory Path to the documents the process currently imports.
CurrentProcessFileName
CurrentProcessId
DB Alias
Original name of the import file currently processed.
ID of the process currently imported.
Odin database on which the component executes its actions.
DocumentBaseDestinationDirectory Defines the directory where document files store on import. You can either specify a full path statement or refer to an entry in a lookup table.
If, for example, the entry ImportPath in the lookup table Odin contains the preferred import path, you must specify $Odin.ImportPath$.
The following directory structure is created below the directory defined.
[Time stamp of when the Import Component was started]
[Date of the day the directory was created]
[Hour of the day the directory was created]
[Directory with the name 1000, 2000, 3000]
In the following example, DocumentBaseDestinationDirectory is defined as odinImport.
On import of the first process, the following directory structure was created.
LastErrorProcessFile
OdinSystemOId
Synchronize
97
The import component moves the first 1000 process documents to the directory named 1000.
Afterwards, a new directory is created.
If the current day and hour are still the same, the new directory is created below the directory 10 with the name 2000.
If not, then a new day and/or hour directory with a 1000 subdirectory is created.
The document files stored in the directory structure are deleted when the component OdinDbTasks deletes finished (processed) stack datasets.
If empty directories result from the deletion process, these too are deleted.
The path and name of the last process file that failed to import.
Specifies the object ID of the system where Odin printers and forms load from.
If not set, Odin objects load from the system the process executing the component was loaded from.
If more than one OdinImport component use the same import directory simultaneously, this property should be set to True.
TRUE = A process file cannot be processed by more than one instance of
OdinProcessImport Functions
OdinImport.
FALSE = No synchronization measures are taken.
ImportProcessFile
Imports a process file.
ImportProcessFile
SYNTAX ImportProcessFile(processFile, documentFileDirectory)
ARGUMENTS processFile The file to import. documentFileDirectory Directory path where the document files belonging to the process
XML file are stored.
RETURN
EXAMPLE
ID of the imported process.
OdinImport = ModusProcess.GetComponent("OdinProcessImport")
ImportedProcessId =
OdinImport.ImportProcessFile("c:\OdinImport\TestProcess.xml",
"c:\OdinImport")
SearchAndImportProcessFile
Looks for files with the XML extension in the specified directory and imports them.
SearchAndImportProcessFile
SYNTAX SearchAndImportProcessFile(ProcessFileDirectory, DocumentBaseDirectory)
ARGUMENTS
ProcessFileDirectory The directory to look for process files
DocumentBaseDirectory Path of the directory to look for process document files in the respective subfolders.
The association between a process file and its document directory is made by using the same name.
RETURN
EXAMPLE
Process ID of the imported process, or an empty string if no process file exists
OdinImport = ModusProcess.GetComponent("OdinProcessImport")
ImportedProcessId
=OdinImport.SearchAndImportProcessFile("d:\OdinImport",
"d:\OdinImport")
Sample script OdinProcessImport
OdinImport = ModusProcess.GetComponent("OdinProcessImport")
; processId = OdinImport.SearchAndImportProcessFile(SYSTEM.ImportDirectory,
SYSTEM.ImportDirectory) if (processId <> "")
;Process data imported... Repeat the loop
SYSTEM.ExecuteLoop = true else
98
;no data to import... no loop necessary
SYSTEM.ExecuteLoop = false end-if
Sample script OdinProcessImport error handling
odinProcessImport = ModusProcess.GetComponent("OdinProcessImport") try
Protocol("-----------------------",5 )
processId = odinProcessImport.SearchAndImportProcessFile("D:\Temp\Single","D:\Temp\Single
")
Protocol("Odin Process imported: {0}" ,5, processId)
OnError("ProcessHasNoJobs") ; Specific error - import file contains documents to import
Protocol("Odin Process failed to import {2} file {0} - dir {1} "
,0,odinProcessImport.CurrentProcessFileName,odinProcessImport.C
urrentProcessDocumentDirectory,odinProcessImport.CurrentProcessId )
Protocol(" The Process contains no documents!",0)
OnError ; Generic error
Protocol("Odin Process failed to import {2} file {0} - dir {1} "
,0,odinProcessImport.CurrentProcessFileName,odinProcessImport.C
urrentProcessDocumentDirectory,odinProcessImport.CurrentProcessId )
Protocol("Import file {1} is now error file {0}"
,0,odinProcessImport.LastErrorProcessFile
,odinProcessImport.CurrentProcessFileName) end-try
99
OdinRendition
About OdinRendition
The OdinRendition component enables you to convert document files of jobs to the Odin spool file format
XPS. The XPS format is used to create print streams.
The component supports the following scenarios.
Processing jobs of a specific process (stack / online print)
Processing of jobs determined by a preconfigured select statement
The component supports the following input formats.
DOCX files created by Document Composition
Static DOCX files (converted to XPS by Microsoft Word so that the original layout is 100% guaranteed)
TIFF
XPS
Notes
You can print documents created with Document Composition directly to a printer, while third-party formats such as PDF start the corresponding program for the print operation.
The spool file that is created is also saved in addition to the original document.
Properties of OdinRendition
Property
DB Alias
Meaning
Odin database on which the component executes its actions.
JobOrder
ProcessSelect Specifies the select statement executed to detect the process to be handled.
If the CreateRenditionForProcess function is called, you do not need to set this property.
The select statement must specify an update lock to enable a parallel deployment of multiple rendition instances.
For MSSQL servers, the select statement must contain with (Updlock).
For Oracle servers, the select statement must contain for update.
StackType
Defines the fields used for the current sorting.
The following fields are set as default.
ODJ_BUNDLE_SEQ ASC, ODJ_SEQUENCE ASC, ODJ_ID ASC
Defines the stack type for direct print stacks if direct prints are found and a new stack is created.
The default value is 0.
The following stack types can be set.
Print 0
Archive 50
Transfer 60
99
Finished
When stack type is set to Finished:
ODS_STATE (status) is set to On Hold.
100
ODS_DELETE_AT (delete date) is set to now +
hold time.
The following stack types result in an error if you set them in a script.
PortoOptimization 10
Streaming
Convert
StreamPrint
20
30
40
OdinRendition Events
Property
OnAfterJobScript
Meaning
This event is called after a job rendition has been created.
The file name of the rendition is then available in the job dataset (ODJ_RENDITION).
Available context:
Context OdinRendition
OnBeforeJobScript This event is executed before a job is processed.
By using the attribute CurrentJobRecord and the functions GetValue() or SetValue(), a script assigned here has read and write access to the columns of the current job dataset.
Any changes made to the job dataset here are taken into account while creating the rendition file and are saved to the database if job rendition was successful.
Available context:
Context OdinRendition
Sample Script
The following example checks whether the current job dataset contains a printer object ID.
If not, an ID is set as it is required when creating a rendition.
Printer = CurrentJobRecord.GetValue("ODJ_PRINTER_OID") if (Printer = "")
CurrentJobRecord.SetValue("ODJ_PRINTER_OID", "test-pr-5") end-if
OnProcessEnd
OnProcessStart
This event is executed after a job has been processed.
Available context:
None
This event is executed at the start of process handling.
Available context:
None
OdinRendition Functions
CreateRenditionForProcess
Creates the rendition (spool) files for the jobs / documents of the specified process.
CreateRenditionForProcess
101
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
CreateRenditionForProcess(processId) processId ID of the process to handle.
ID of the direct print stack created for the handled process .
An empty string returns if the process does not have a direct print stack because no direct print documents exist.
RenditionManager = ModusProcess.GetComponent("OdinRendition")
DirectPrintStackId =
RenditionManager.CreateRenditionForProcess("{002A2ACE-29A1-4B3E-
A573-5B95ED0EE8B5}")
CreateRenditionForSelectedProcess
Determines the process to handle by way of the process select SQL.
Following this the same processing is done as in the CreateRenditionForProcess function.
The ID of the process to be handled is determined by executing the process select statement.
CreateRenditionForSelectedProcess
SYNTAX CreateRenditionForSelectedProcess()
RETURN
EXAMPLE
ID of the process handled or an empty string if no process exists.
RenditionManager = ModusProcess.GetComponent("OdinRendition")
RenditionManager.ProcessSelect =
"Select TOP 1 ODP_ID From Odin_Process where ODP_State = 0 and ODP_Lockby is Null Order By Odp_Create_At
Asc"
ProcId = RenditionManager.CreateRenditionForSelectedProcess()
Sample Script OdinRendition
rendition = ModusProcess.GetComponent("OdinRendition")
;rendition.ProcessSelect =
;"select top 1 odp_id from Odin_process with (updlock) where odp_state = 0 and odp_lockby is null " +
;"and odp_bundle_name = Invoice " +
;"order by odp_create_at asc"
; if (processId <> "")
;create XPS files for the imported Process
directPrintStackId = rendition.CreateRenditionForProcess(processId) end-if
102
OdinStream
About OdinStream
You must have an Odin license installed to use the OdinStream component.
The OdinStream component enables you to create XML format stream files, their description files, and the corresponding protocol log files.
Access the virtual database tables
Each script has access to the virtual database tables for the stack (STACK), the envelopes (ENVELOPE) and jobs of the envelope (JOB).
You can use these tables to determine information about stacks, envelopes, and jobs. This is done by using the functionality of the virtual database (VirtualDatabase).
Example of access to stack, envelope, and job columns
stackID = GetField("STACK", "ODS_ID") envID = GetField("ENVELOPE", "ODE_ID") jobID = GetField("JOB", "ODJ_ID")
Set OMR definitions
OMR codes are set in the stack created, for example in a filter using SetProperty("OMR_CODE").
Document Composition currently supports the following OMR codes.
C4_OMR
C4EF_OMR
K34_OMR
K34K_OMR
BELL_OMR
AS1A_OMR
STIELOW_OMR
SI68_OMR
KERN_POST_OMR
Kern Post 2
For each OMR definition, you can define the following settings.
OMR_POS_X / OMR_POS_Y
OMR_LINELENGTH /
OMR_LINEHEIGHT
OMR_GAP
OMR_EDGE
Horizontal and vertical start position for the OMR code on paper in mm.
Length and width of the OMR lines in mm.
Space between each line in mm.
Specifies whether the OMR code is printed on the long edge (=LONG) or short edge (=SHORT) of a page.
Default: LONG.
If required, you can define varying configurations for a single OMR by specifying another configuration name separated by a dot.
Example
C4_OMR=OMR_POS_X=10,OMR_POS_Y=10,OMR_LineLength=5,OMR_LineHeight=0.5,OMR_Gap=
5,OMR_Edge=Long
103
C4_OMR.ShortEdge=OMR_POS_X=10,OMR_POS_Y=10,OMR_LineLength=5,OMR_LineHeight=0.
5,OMR_Gap=5,OMR_Edge=Short
OdinStream output files
The following XML files are created as an OPC-Package (=zipped):
Stream file .str
The stream file contains the following XML files:
/odin/Stream.xml
This XML describes the structure of the stream and contains the "page overlays" in XML format.
/Odin/StreamInfo.xml
This XML contains information on streaming.
Firstly, OMR code settings and secondly, information such as number of pages, sheets, envelopes, jobs as well as on the forms and virtual trays used by the stream.
Description file .dsc
Contains an XML with the data / datasets of the stack /envelope/documents.
/odin/StreamDescription.xml
This file stores the stream datasets.
Structure of the XML file
<streamdescription>
<stack>
<fields>
<field name="Fieldname" value="Wert" />
...
</fields>
<envelopes>
<envelope>
<fields>
<field name="Fieldname" value="Wert" />
...
</fields>
<jobs>
<job>
<fields>
<field name="Fieldname" value="Wert" />
...
</fields>
</job>
</jobs>
...
</envelope>
...
</envelopes>
</stack>
</streamdescription>
Example
<?xml version="1.0" encoding="utf-8" ?>
104
<streamdescription>
<stack>
<fields>
<field name="ODS_ID" value="28" />
<field name="ODS_STATE" value="1" />
<field name="ODS_PRIORITY" value="200" />
<field name="ODS_CREATE_AT" value="10/23/2011 12:34:48" />
<field name="ODS_CREATE_BY" value="user" />
<field name="ODS_EDIT_AT" value="11/21/2011 16:12:34" />
<field name="ODS_EDIT_BY" value="user" />
<field name="ODS_PRINTSTATE" value="1" />
<field name="ODS_PRINT_START" value="11/21/2011 16:26:13" />
<field name="ODS_PRINT_END" value="11/21/2011 16:12:34" />
<field name="ODS_LASTPRINTED" value="" />
<field name="ODS_HOLDTIME" value="10" />
<field name="ODS_DELETE_AT" value="11/22/2011 02:12:34" />
<field name="ODS_STACKTYPE" value="20" />
<field name="ODS_INITIATORTYPE" value="" />
<field name="ODS_FILTERNAME" value="Postage3" />
<field name="ODS_LASTARCHIVED" value="" />
<field name="ODS_MESSAGETEXT" value="" />
<field name="ODS_LOCKBY" value="user" />
<field name="ODS_RETRY_AT" value="" />
<field name="ODS_RETRY_COUNT" value="0" />
<field name="ODS_PRINTSTREAM" value="d:\Import\output\28\28.str" />
<field name="ODS_OMR_TYPE" value="C4_OMR.Test1" />
<field name="ODS_STACKOBJECTSQL" value="" />
<field name="ODS_PAPER_COUNT" value="2077" />
<field name="ODS_PAGE_COUNT" value="2940" />
<field name="ODS_JOB_COUNT" value="179" />
<field name="ODS_ENVELOPE_COUNT" value="10" />
</fields>
<envelopes>
<envelope>
<fields>
<field name="ODE_ID" value="7" />
<field name="ODE_STACK_ID" value="28" />
<field name="ODE_CREATE_AT" value="10/23/2011 12:34:34" />
<field name="ODE_CREATE_BY" value="user" />
<field name="ODE_STATE" value="0" />
<field name="ODE_POSTAGE" value="Postage3" />
<field name="ODE_WEIGHT" value="416,00000" />
<field name="ODE_NAME" value="Envelope1" />
<field name="ODE_DEVICE" value='Device x' />
<field name="ODE_DVF" value="" />
<field name="ODE_DVF_TT" value="" />
<field name="ODE_DVF_MMJJ" value="" />
<field name="ODE_DVF_ABRNR" value="" />
105
<field name="ODE_DVF_ELIEPLZ" value="" />
<field name="ODE_DVF_BRUTTOENTGELD" value="" />
<field name="ODE_DVF_CURRENCY" value="" />
<field name="ODE_OMR_ANNEX" value="0" />
<field name="ODE_OMR_REJECTION" value="" />
<field name="ODE_REC_NAME" value="Locksley Sir Robin of" />
<field name="ODE_REC_AKZ" value="D" />
<field name="ODE_REC_ZIP" value="71711" />
<field name="ODE_REC_CITY" value="Steinheim" />
<field name="ODE_REC_STREET" value="Castle Rock" />
<field name="ODE_PAPER_COUNT" value="246" />
<field name="ODE_PAGE_COUNT" value="350" />
<field name="ODE_SEQUENCE" value="" />
<field name="ODE_JOB_COUNT" value="21" />
</fields>
<jobs>
<job>
<fields>
<field name="ODJ_ID" value="707" />
<field name="ODJ_STACK_ID" value="" />
<field name="ODJ_ENV_ID" value="7" />
<field name="ODJ_SEQUENCE" value="1" />
<field name="ODJ_CREATE_AT" value="10/23/2011 11:26:45" />
<field name="ODJ_CREATE_BY" value="PAthena" />
<field name="ODJ_STATE" value="1" />
<field name="ODJ_ANNEX" value="" />
<field name="ODJ_DOCNAME" value="" />
<field name="ODJ_FILENAME" value="D:\Import\Bin\071023_112908421\071023\11\1000\707.docx" />
<field name="ODJ_RENDITION" value="D:\Import\Bin\071023_112908421\071023\11\1000\707.xps" />
<field name="ODJ_NUMBER_OF_COPIES" value="0" />
<field name="ODJ_DUPLEX" value="0" />
<field name="ODJ_OMR_CHANNEL" value="" />
<field name="ODJ_ARCHIVED" value="" />
<field name="ODE_REC_NAME" value="Locksley Sir Robin of" />
<field name="ODJ_REC_AKZ" value="D" />
<field name="ODJ_REC_ZIP" value="71711" />
<field name="ODJ_REC_CITY" value="Stonehome" />
<field name="ODJ_REC_STREET" value="Castle Rock" />
<field name="ODJ_PROCESS_ID" value="{683de553-a858-4934-9581-
8c6b9bf0a98d}" />
<field name="ODJ_BUNDLE_SEQ" value="0" />
<field name="ODJ_BUNDLE_COUNT" value="0" />
<field name="ODJ_BUNDLE_NAME" value="" />
<field name="ODJ_BUNDLE_OID" value="" />
<field name="ODJ_VSNR" value="" />
<field name="ODJ_PARNR" value="" />
<field name="ODJ_IS_COPY" value="N" />
106
<field name="ODJ_DOCTITLE" value="" />
<field name="ODJ_PAPER_COUNT" value="24" />
<field name="ODJ_PAGE_COUNT" value="24" />
<field name="ODJ_DIRECTPRINT" value="0" />
<field name="ODJ_PRINTER_OID" value="odin-opr-14" />
<field name="ODJ_PRINTER_NAME" value="PrinterOutsourcing" />
<field name="ODJ_FORM_OID" value="odin-fo-9" />
<field name="ODJ_FORM_NAME" value="Form1" />
<field name="ODJ_TO_ARCHIVE" value="" />
<field name="ODJ_DOCTYPE" value="1" />
<field name="ODJ_DOC_OID" value="" />
<field name="ODJ_SORTING" value="" />
<field name="ODJ_GROUPING" value="" />
<field name="ODJ_LOCKBY" value="" />
<field name="ODJ_MESSAGETEXT" value="" />
<field name="ODJ_TIFF_LAYOUT" value="" />
</fields>
</job>
</envelope>- <fields> <field name="ODE_STACK_ID" value="28" />
</envelopes>- <fields> <field name="ODE_STACK_ID" value="28" />
</stack>
</streamdescription>- <fields> <field name="ODE_STACK_ID" value="28" />
Properties of OdinStream
Prope rty
Create
Descript ionFile
DB
Alias
Extende dText
Description
TRUE = Write datasets to a separate description file (.dsc).
FALSE = Do not write datasets to a separate description file (.dsc).
Odin database on which the component executes its actions.
Specifies the lookup table for the additional texts printed on the documents.
You can define additional texts for stacks, envelopes and documents and again for either portrait or landscape layouts.
Additional Texts (ExtendedText)
These additional texts are defined in lookup tables assigned to the ExtendedText property of a streaming component.
You can define lookup values for stack and envelope cover pages as well as for documents and again for either portrait or landscape layouts.
ExtendFlyLeafStack_Portrait_Def Additional text for stack cover page portrait layout
ExtendFlyLeafStack_Landscape_Def Additional text for stack cover page landscape layout
ExtendFlyLeafEnvelope_Portrait_Def Additional text for envelope cover page portrait layout
ExtendFlyLeafEnvelope_Landscape_Def Additional text for envelope cover page landscape layout
ExtendAllPages_Portrait_Def Additional text for document page portrait layout
ExtendAllPages_Landscape_Def Additional text for document page landscape layout
107
108
Currently text output (Type=Text), Lines (Type=LINE), rectangles (Type=RECTANGLE) and images
(Type=IMAGE) are supported.
You can enumerate the entries to enable multiple outputs.
Example
ExtendAllPages_Portrait_Def=TYPE=TEXT,XPOS=25.5,YPOS=280.5,FONTSIZE=6,BOLD=N,Italic=N,F
ONTNAME=ARIAL,Angle=0,TEXT="%S.ODS_ID%"
ExtendAllPages_Portrait_Def2=TYPE=TEXT,XPOS=22.5,YPOS=260.5,FONTSIZE=6,BOLD=N,Italic=Y,
FONTNAME=ARIAL,Angle=0,TEXT=2nd text
Text (Type=Text)
COLOR
LAYER
Color of the text (Default: Black)
Defines the layer of the output.
0 or foreground = Foreground layer. Drawing is done on top of the original document.
1 or background = Background layer. Drawing is done behind the original document.
XPOS/YPOS
Specifies the X / Y text position in mm.
The default value is 10 mm.
FONTSIZE
Size of the font.
The default value is 6.
BOLD
Y = Bold
N = Not bold
The default value is N.
ITALIC
Y = Italic
N = Not italic
The default value is N.
FONTNAME
Name of the font used for text output.
The default value is Arial.
ANGLE
TEXT
Angle of the text.
The default value is 0.
Text to be written. If the text contains spaces, you must define the text as follows.
"TEXT=This is a text with spaces!"
Placeholders in the text are enclosed by %. Specify placeholder for values from a database as follows.
%S.Field name% - Field in the stack table "Odin_Stack"
%E.Field name% - Field in the envelope table "Odin_Envelope"
%J.Field name% - Field in the job table "Odin_Job"
In addition, you can also use all properties accessed by the GetProperty function of the
OdinStream context.
Example
ExtendFlyLeafStack_Portrait_Def=TYPE=TEXT,XPOS=25,YPOS=280,FONTSIZE=6
,BOLD=N,Italic=N,FONTNAME=ARIAL,Angle=0,"TEXT=Deckblatt Stapel
#%S.ODS_ID%"
ExtendFlyLeafEnvelope_Portrait_Def=TYPE=TEXT,XPOS=25,YPOS=280,FONTSIZ
E=6,BOLD=N,Italic=N,FONTNAME=ARIAL,Angle=0,"TEXT=Deckblatt Kuvert
#%E.ODE_ID%"
ExtendAllPages_Portrait_Def=TYPE=TEXT,XPOS=10,YPOS=260,FONTSIZE=6,BOL
D=N,Italic=N,FONTNAME=Arial,Angle=270,TEXT=%S.ODS_ID%/%E.ODE_ID%/%J.O
DJ_ID%
ExtendAllPages_Portrait_Def2=TYPE=TEXT,XPOS=28,YPOS=290,FONTSIZE=6,BO
109
LD=N,Italic=N,FONTNAME=Arial,Angle=0,"TEXT=Envelope#%StackEnvelope%/%
TotalStackEnvelopes% - Env_job#%EnvelopeJob%/%TotalEnvelopeJobs% -
Env_Page#%EnvelopePage%/%TotalEnvelopePages%
Page#%JobPage%/%TotalJobPages%"
ExtendAllPages_Landscape_Def=TYPE=TEXT,XPOS=39,YPOS=10,FONTSIZE=6,BOL
D=N,Italic=N,FONTNAME=Arial,Angle=180,TEXT=%S.ODS_ID%/%E.ODE_ID%/%J.O
DJ_ID%
ExtendAllPages_Landscape_Def2=TYPE=TEXT,XPOS=8,YPOS=28,FONTSIZE=6,BOL
D=N,Italic=N,FONTNAME=Arial,Angle=270,"TEXT=Envelope#%StackEnvelope%/
%TotalStackEnvelopes% - Env_job#%EnvelopeJob%/%TotalEnvelopeJobs% -
Env_Page#%EnvelopePage%/%TotalEnvelopePages%
Page#%JobPage%/%TotalJobPages%"
Line (Type=LINE)
XPOS/YPOS
Specifies the X / Y start position in mm.
The default value is 10 mm.
XPOS2/YPOS2
Specifies the X / Y end position in mm.
The default value is 10 mm.
LineWidth
LineStyle
LineColor
Specifies line weight in mm.
The default value is 1 mm.
Specifies line style. The default value is 0.
0 or solid = Solid
1 or dashed = Dashed
2 or dotted = Dotted
Line color
Layer
Defines the layer of the output.
0 or foreground = Foreground layer. Drawing is done on top of the original document.
1 or background = Background layer. Drawing is done behind the original document.
Example
ExtendAllPages_Portrait_Def3=TYPE=LINE,XPOS=10,YPOS=10,XPOS2=60,YPOS2
=60,LineWidth=0.5,LineStyle=2,LineColor=Red,Layer=1
ExtendAllPages_Portrait_Def3=TYPE=LINE,XPOS=10,YPOS=10,XPOS2=60,YPOS2
=60,LineWidth=0.5,LineStyle=dotted,LineColor=Red,Layer=background
Rectangle (Type=RECTANGLE)
XPOS/YPOS
Specifies the X / Y position in mm.
The default value is 10 mm.
Width/Height
Width/height of the rectangle in mm.
The default value is 10 mm.
LineWidth
Specifies line weight in mm.
The default value is 1 mm.
LineStyle
LineColor
Specifies line style (Default: 0=Solid)
0 or solid = Solid
1 or dashed = Dashed
2 or dotted = Dotted
Color of the border.
The default value is black.
110
Fill
TRUE = The rectangle is filled with color.
FALSE = The rectangle is not filled with color.
The default value is false.
The color the rectangle is filled with. FillColor
Layer
Defines the layer of the output.
0 or foreground = Foreground layer. Drawing is done on top of the original document.
1 or background = Background layer. Drawing is done behind the original document.
Example
ExtendAllPages_Portrait_Def4=Type=RECTANGLE,XPOS=20,YPOS=20,Width=10,
Height=10,LineWidth=0.5,LineStyle=1,LineColor=Black,fill=true,fillCol or=yellow,Layer=0
ExtendAllPages_Portrait_Def4=Type=RECTANGLE,XPOS=20,YPOS=20,Width=10,
Height=10,LineWidth=0.5,LineStyle=dashed,LineColor=Black,fill=true,fi llColor=yellow,Layer=foreground
Image (Type=IMAGE)
XPOS/YPOS
Specifies the X / Y position in mm
The default value is 10 mm.
File
Name of the image file to be painted.
Example
ExtendAllPages_Portrait_Def5=Type=IMAGE,XPOS=40,YPOS=40,file=d:\temp\ pa_logo.bmp,Layer=1
You have to define colors as a string. Alpha-Transparency is not currently supported during converting. If
255 (FF) is specified for the text for Alpha-Transparency, the text is not transparent otherwise the transparency is drawn in the corresponding color.
Possible value
The HTML color name or the ARGB value in format #AARRGGBB (AA=Alpha-
Transparency, RR=Red, GG=Green, BB=Blue).
HTML color name ARGB value
AliceBlue #FFF0F8FF
AntiqueWhite #FFFAEBD7
Aqua
Aquamarine
Azure
Beige
Bisque
Black
BlanchedAlmond
Blue
BlueViolet
Brown
BurlyWood
#FF00FFFF
#FF7FFFD4
#FFF0FFFF
#FFF5F5DC
#FFFFE4C4
#FF000000
#FFFFEBCD
#FF0000FF
#FF8A2BE2
#FFA52A2A
#FFDEB887
111
#FF8B0000
#FFE9967A
#FF8FBC8B
#FF483D8B
#FF2F4F4F
#FF00CED1
#FF9400D3
#FFFF1493
#FF00BFFF
#FF696969
#FF1E90FF
#FFB22222
#FFFFFAF0
#FF228B22
#FFFF00FF
#FFDCDCDC
#FFF8F8FF
#FFFFD700
#FFDAA520
#FF808080
#FF5F9EA0
#FF7FFF00
#FFD2691E
#FFFF7F50
#FF6495ED
#FFFFF8DC
#FFDC143C
#FF00FFFF
#FF00008B
#FF008B8B
#FFB8860B
#FFA9A9A9
#FF006400
#FFBDB76B
#FF8B008B
#FF556B2F
#FFFF8C00
#FF9932CC
DarkRed
DarkSalmon
DarkSeaGreen
DarkSlateBlue
DarkSlateGray
DarkTurquoise
DarkViolet
DeepPink
DeepSkyBlue
DimGray
DodgerBlue
Firebrick
FloralWhite
ForestGreen
Fuchsia
Gainsboro
GhostWhite
Gold
Goldenrod
Gray
CadetBlue
Chartreuse
Chocolate
Coral
CornflowerBlue
Cornsilk
Crimson
Cyan
DarkBlue
DarkCyan
DarkGoldenrod
DarkGray
DarkGreen
DarkKhaki
DarkMagenta
DarkOliveGreen
DarkOrange
DarkOrchid
112
#FFFFB6C1
#FFFFA07A
#FF20B2AA
#FF87CEFA
#FF778899
#FFB0C4DE
#FFFFFFE0
#FF00FF00
#FF32CD32
#FFFAF0E6
#FFFF00FF
#FF800000
#FF66CDAA
#FF0000CD
#FFBA55D3
#FF9370DB
#FF3CB371
#FF7B68EE
#FF00FA9A
#FF48D1CC
#FF008000
#FFADFF2F
#FFF0FFF0
#FFFF69B4
#FFCD5C5C
#FF4B0082
#FFFFFFF0
#FFF0E68C
#FFE6E6FA
#FFFFF0F5
#FF7CFC00
#FFFFFACD
#FFADD8E6
#FFF08080
#FFE0FFFF
#FFFAFAD2
#FFD3D3D3
#FF90EE90
LightPink
LightSalmon
LightSeaGreen
LightSkyBlue
LightSlateGray
LightSteelBlue
LightYellow
Lime
LimeGreen
Linen
Magenta
Maroon
MediumAquamarine
MediumBlue
MediumOrchid
MediumPurple
MediumSeaGreen
MediumSlateBlue
MediumSpringGreen
MediumTurquoise
Green
GreenYellow
Honeydew
HotPink
IndianRed
Indigo
Ivory
Khaki
Lavender
LavenderBlush
LawnGreen
LemonChiffon
LightBlue
LightCoral
LightCyan
LightGoldenrodYellow
LightGray
LightGreen
113
#FFFFDAB9
#FFCD853F
#FFFFC0CB
#FFB0E0E6
#FF800080
#FFFF0000
#FFBC8F8F
#FF4169E1
#FF8B4513
#FFFA8072
#FFF4A460
#FF2E8B57
#FFFFF5EE
#FFA0522D
#FFC0C0C0
#FF87CEEB
#FF6A5ACD
#FF708090
#FFFFFAFA
#FF00FF7F
#FFC71585
#FF191970
#FFF5FFFA
#FFFFE4E1
#FFFFE4B5
#FFFFDEAD
#FF000080
#FFFDF5E6
#FF808000
#FF6B8E23
#FFFFA500
#FFFF4500
#FFDA70D6
#FFEEE8AA
#FF98FB98
#FFAFEEEE
#FFDB7093
#FFFFEFD5
PeachPuff
Peru
Pink
Plum
Purple
Red
RosyBrown
RoyalBlue
SaddleBrown
Salmon
SandyBrown
SeaGreen
SeaShell
Sienna
Silver
SkyBlue
SlateBlue
SlateGray
Snow
SpringGreen
MediumVioletRed
MidnightBlue
MintCream
MistyRose
Moccasin
NavajoWhite
Navy
OldLace
Olive
OliveDrab
Orange
OrangeRed
Orchid
PaleGoldenrod
PaleGreen
PaleTurquoise
PaleVioletRed
PapayaWhip
NextSta ckType
OMR
SteelBlue
Tan
Teal
Thistle
Tomato
Turquoise
Violet
Wheat
White
WhiteSmoke
Yellow
#FF4682B4
#FFD2B48C
#FF008080
#FFD8BFD8
#FFFF6347
#FF40E0D0
#FFEE82EE
#FFF5DEB3
#FFFFFFFF
#FFF5F5F5
#FFFFFF00
YellowGreen #FF9ACD32
Specifies the next stack type set after successful execution and after calling the End function.
The drop-down list displays all possible stack types.
Any additionally required stack types must be defined in the file
ModusSuite.Common.PropertyEditors.dll.config.
Default stack types
Name Description Stack type
0 Print Stack is ready to be printed to an online printer or email printer
(online print).
10
20
30
40
50
99
PortoOptimization Stack is ready for IT franking. This function is currently not supported.
Streaming
Convert
Stack is ready for streaming.
Stack is ready to be converted to the appropriate output format.
StreamPrint
Archive
Finish
Stack (stream) is ready for batch printing to an outsourcing printer.
Stack is ready for archiving.
Stack processing is finished, no further action.
Specifies the lookup table for the OMR definitions.
OMR-Definition
OMR codes are set in the stack created, for example in a filter through SetProperty("OMR_CODE").
All position and size definitions for an OMR code are made in mm.
The following OMR codes are currently supported:
C4_OMR
C4EF_OMR
K34_OMR
K34K_OMR
BELL_OMR
AS1A_OMR
STIELOW_OMR
114
StackS elect
Stream
OutputP ath
SI68_OMR
KERN_POST_OMR
Kern Post 2
The following settings can be defined for each OMR definition:
OMR_POS_X /
OMR_POS_Y
Horizontal and vertical start position for the OMR code on paper.
OMR_LINELENGTH
/
OMR_LINEHEIGHT
Length and width of the OMR lines.
OMR_GAP Space between each line
OMR_EDGE
Specifies whether the OMR code is printed on the long edge (=LONG) or short edge (=SHORT) of a page.
Default: LONG
If varying configurations for a single OMR type are required, they can be defined by specifying another configuration name separated by a dot:
OMR_TYP.CONFIG
Example
C4_OMR=OMR_POS_X=10,OMR_POS_Y=10,OMR_LineLength=5,OMR_LineHeight=0.5,
OMR_Gap=5,OMR_Edge=Long
C4_OMR.ShortEdge=OMR_POS_X=10,OMR_POS_Y=10,OMR_LineLength=5,OMR_LineH eight=0.5,OMR_Gap=5,OMR_Edge=Short
SQL statement to identify the next stack to be processed.
Either specify the select statement directly or refer to a lookup table, for example
$OdinSQL.PrintStackSelect$.
Output directory for the stream-/description file.
The directory in which a subdirectory with the name of the stack ID is created and the stream file is saved to.
OdinStream Events
Event
OnDocumentStream
Meaning
This event is called for each document and offers the possibility to modify document pages.
Available context:
Context OdinStreamDocument
Sample Script Event OnDocumentStream with Bookmarks
;
; Test access to database tables ods_id = CurrentStack.GetValue("ODS_ID") ode_id = CurrentEnvelope.GetValue("ODE_ID") odj_id = CurrentJob.GetValue("ODJ_ID")
;
; Set Bookmark for the 1. job page. jobBookmark = FormatStr("Job %s", odj_id) envelopeBookmark = FormatStr("Envelope %s", ode_id)
115
; x.EditPage(0) streamdoc.AddBookmark(jobBookmark, envelopeBookmark, jobBookmark, 0, 0) streamdoc.Post()
; pagenumber = 0 while (pagenumber < streamdoc.PageCount)
streamdoc.EditPage(pagenumber)
;
; sets for each page a Bookmark as child of Job-
Bookmark
pageBookmark = FormatStr("Page %d", pagenumber + 1)
pageBookmarkId = FormatStr("%s_%s", jobBookmark, pageBookmark)
streamdoc.AddBookmark(pageBookmarkId, jobBookmark, pageBookmark, 0, 0)
;
streamdoc.Post()
pagenumber = pagenumber + 1
; end-while
;
OnEnvelopeCoverPage This event is called for each envelope to create a cover page for an envelope and add it to the stream.
Available context:
Context OdinStream
Sample Script Event OnEnvelopeCoverPage with Bookmarks
; load empty cover page. The trays firstbin/nextbin must exists document = stream.LoadDocument("c:\PAG\Docs\Empty_Page.xps",
OdinDuplexSetting.Simplex, "firstbin","nextbin")
;
; Determine envelope information envPages = stream.GetProperty("TotalEnvelopePages") envJobs = stream.GetProperty("TotalEnvelopeJobs")
; ods_id = CurrentStack.GetValue("ODS_ID") ode_id = CurrentEnvelope.GetValue("ODE_ID")
;
; as a test, get data from the VirtualDatabase zip = GetField("ENVELOPE", "ODE_REC_ZIP") city = GetField("ENVELOPE", "ODE_REC_CITY") country = GetField("ENVELOPE", "ODE_REC_AKZ")
;
AdrName = GetField("ENVELOPE", "ODE_REC_NAME")
AdrStreet = GetField("ENVELOPE", "ODE_REC_STREET")
116
117
AdrCity = formatstr("%s - %s %s", country, zip, city)
EnvId = FormatStr("%s", ode_id)
EnvJobPages = formatstr("%d/%d", envJobs, envPages)
; stackBookmark = FormatStr("Stapel %s", ods_id) envelopeBookmark = FormatStr("Envelope %s", ode_id) coverPageBookmark = formatstr("Envelope_Cover_Page_%s",
EnvId)
;
; Print information on the cover page document.EditPage(0) stackBookmark = FormatStr("Stapel %s", ods_id) envelopeBookmark = FormatStr("Envelope %s", ode_id) document.AddBookmark(envelopeBookmark, stackBookmark, envelopeBookmark, 0, 0) document.AddBookmark(coverPageBookmark, envelopeBookmark,
"Kuvertdeckblatt", 0, 0)
; document.SetFont("Tahoma", 16) document.TextOut(20.5, 35, "EnvelopeCoverPage", false, false) document.Line(20.5, 37, 70, 37, 0.5, OdinLineStyle.Solid,
"black")
; document.SetFont("Tahoma", 12) document.TextOut(20.5, 42, "Envelope-ID:", false, false) document.TextOut(20.5, 46, "Number Jobs/Pages:", false, false)
; document.TextOut(65, 42, EnvId, true, false, "Gray", 0) document.TextOut(65, 46, EnvJobPages, true, false,
"Gray", 0)
; document.TextOut(20.5, 55, "Recipient-Address:", true, false) document.TextOut(20.5, 62, AdrName, false, false, "Gray",
0) document.TextOut(20.5, 66, AdrStreet, false, false,
"Gray", 0) document.TextOut(20.5, 70, AdrCity, false, false, "Gray",
0)
; document.Image(10, 5, "d:\temp\2_compart-logo-small.gif") document.Post()
;
; Add cover page to stream stream.AppendDocument(document, true, false)
;
; Navigate to the next envelope for VirtualDB
Test/GetField
OnStackCoverPage
Next("Envelope"))
;
This event is called at the beginning of the stack to create a cover for the stack and add it to the stream.
Available context:
Context OdinStream
Sample Script Event OnStackCoverPage with Bookmarks
; load empty cover page. The trays firstbin/nextbin must exists document = stream.LoadDocument("c:\PAG\Docs\Empty_Page.xps",
OdinDuplexSetting.Simplex, "firstbin","nextbin")
;
; Determine stack information
TotalPages = stream.GetProperty("TotalStackPages")
TotalPapers = stream.GetProperty("TotalStackPapers")
TotalEnvelopes = stream.GetProperty("TotalStackEnvelopes")
TotalJobs = stream.GetProperty("TotalStackJobs")
; ods_id = CurrentStack.GetValue("ODS_ID")
;
StackId = FormatStr("%s", ods_id)
EnvJobCount = FormatStr("%d/%d", TotalEnvelopes,
TotalJobs)
PageCount = FormatStr("%d/%d", TotalPages, TotalPapers)
;
; Print information on the cover page document.EditPage(0)
;
; set Bookmark for stack stackBookmark = FormatStr("Stapel %s", ods_id) document.AddBookmark(stackBookmark, "", stackBookmark, 0,
0) document.AddBookmark("StackCoverPage", stackBookmark,
"StackCoverPage", 0, 0)
; document.SetFont("Tahoma", 16) document.TextOut(20.5, 35, "StackCoverPage", false, false) document.Line(20.5, 37, 60, 37, 0.5, OdinLineStyle.Solid,
"black")
; document.SetFont("Tahoma", 12) document.TextOut(20.5, 42, "stack-ID:", false, false) document.TextOut(20.5, 46, "Number Envelopes/Jobs:", false, false) document.TextOut(20.5, 50, "Number Pages/Sheets:", false, false)
118
OnStackEnd
OnStackStart
; document.TextOut(65, 42, StackId, true, false, "Gray", 0) document.TextOut(65, 46, EnvJobCount, true, false,
"Gray", 0) document.TextOut(65, 50, PageCount, true, false, "Gray",
0) document.Image(10, 5, "d:\temp\2_compart-logo-small.gif")
; document.Post()
;
; Add cover page to stream stream.AppendDocument(document, true, false)
This event is called after stack processing / streaming according to the case in hand.
Available context:
Context OdinStream
This event is called after stack processing / streaming according to the case in hand.
Available context:
Context OdinStream
OdinStream Functions
AddBookmark
Adds a bookmark to a document. If the output format is PDF, a bookmark is created for every bookmark defined. The IDs must be unique for each bookmark.
AddBookmark
SYNTAX
AddBookmark(string id, string parentId, string title)
AddBookmark(string id, string parentId, string title, double x, double y)
ARGUMENTS
EXAMPLE id Bookmark ID parentId An empty string here means the bookmark is inserted at the highest level.
Otherwise, the bookmark is inserted as a child of the bookmark specified. title x
Text for the bookmark.
X-position on the page. y Y-position on the page. document.AddBookmark("doc1_page1", "doc1", "Page 1") document.AddBookmark("doc1_page2", "doc1", "Page 2", 0, 0)
End
Ends component processing, sets the stack to the next stack type and, if relevant, executes a script assigned to the OnStackEnd event.
119
End
SYNTAX
ARGUMENTS
End()
End(errorMessage) errorMessage Error message.
The following values are set.
ODS_Print_End Current date and time.
ODS_Delete_At Current date, time, and stack hold time.
If processing ends correctly, the following values are set.
ODS_PrintState 2 (OdinPrintState.OK)
ODS_State NextStackState of the component.
ODS_StackType NextStackState of the component.
On error, the following values are set.
ODS_PrintState
ODS_State
3 (OdinPrintState.Error)
3 (OdinStackState.Locked)
ODS_MessageText Error message.
GetCurrentStackRow
After calling Start() and before calling End() the function returns an object whose interface provides read access to the current stack dataset.
GetCurrentStackRow
SYNTAX GetCurrentStackRow()
RETURN Object interface that provides read access to the current stack dataset.
The following functions are available.
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
GetValue(columnName) columnName Column name
The column value.
If the data type of the database column is DATE, Datetime or any valid date type, the date read generally returns in the format MM/DD/YYYY hh:mm:ss.
GetObject("DateVar","MLDate")
StringDateVar =
120
CurrentJobRecord.GetValue("ODJ_create_at")
;Convert date to the required format with the help of the MLDate object
IntDateVar = DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE= DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss ", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following functions.
Current Returns the current object.
MoveNext() Moves the position to the next object to process.
SYNTAX MoveNext()
RETURN TRUE = Successful
FALSE = The end of the collection is passed.
Reset Resets the enumerator back to the beginning of the first element.
GetEnvelopeEnumerator
Returns an envelope enumerator. Use the GetValue() function to retrieve envelope data.
GetEnvelopeEnumerator
SYNTAX GetEnvelopeEnumerator()
RETURN Enumerator with the following functions.
Current Returns the current envelope.
MoveNext() Moves the position to the next envelope to process.
SYNTAX MoveNext()
RETURN
EXAMPLE
TRUE = Successful
FALSE = The end of the collection is passed. envEnumerator =
OdinPrint.GetEnvelopeEnumerator() nextElement = envEnumerator.MoveNext() while (nextElement)
envelope = envEnumerator.Current;
...
nextElement = envEnumerator.MoveNext()
Reset Resets the enumerator to the beginning of the first element.
GetJobEnumerator
Returns a job enumerator. Use the GetValue() function to retrieve job data.
121
GetJobEnumerator
SYNTAX GetJobEnumerator()
GetJobEnumerator(envelope)
ARGUMENTS envelope The envelope whose jobs you want to access.
RETURN Enumerator with the following functions.
Current Returns the current job.
MoveNext()
SYNTAX
RETURN
MoveNext()
EXAMPLE
TRUE = successful
FALSE = The end of the collection is passed. jobEnumerator =
OdinPrint.GetJobEnumerator() nextElement = envEnumerator.MoveNext() while (nextElement)
;
job = jobEnumerator.Current;
;
...
nextElement = jobEnumerator.MoveNext()
Reset Resets the enumerator to the beginning of the first element.
GetNextStack
Determines the next stack to convert according to the corresponding SQL, which is stored in the
StackSelect property, and returns its ID.
GetNextStack
SYNTAX GetNextStack()
RETURN ID of the stack found, or an empty string if none found.
SetStackError
Sets the status of a stack to error.
SetPdfSigner
SYNTAX SetStackError(errorMessage)
ARGUMENTS errorMessage Error message
Start
Loads and initializes the given stack and executes a script assigned to the OnStackCoverPage event.
The stack must be of the corresponding stack type to that required of the component. The status must be set to Wait.
Start
122
SYNTAX
ARGUMENTS
Start(stackId) stackId Stack ID
After successful loading, the stack is locked and the statuses set accordingly.
ODS_LockBy:
ODS_State:
ODS_PrintState:
ODS_Print_Start:
Name of the current user
1 (OdinStackState.InWork)
1 (OdinPrintState.InWork)
Current date / time
ODS_MessageText: Empty string
StreamDocument
Streams the document of the given job.
StreamDocument
SYNTAX StreamDocument(job)
ARGUMENTS job Job object
Sample Script OdinStream
;
; get component for streaming
OdinStream = ModusProcess.GetComponent("OdinStream")
;
; determine the next stack for streaming stackId = OdinStream.GetNextStack()
;
; was a stack found ? if (stackID <> "")
;
; yes, now initialize stack and stream.
; call the StackCoverPage event.
OdinStream.Start(stackId)
; get an envelope enumerator.
envEnumerator = OdinStream.GetEnvelopeEnumerator()
;
; run through all envelopes and stream jobs
nextEnv = envEnumerator.MoveNext()
while (nextEnv)
;
; get current envelope from enumerator
envelope = envEnumerator.Current
; as a test get envelope ID
envelopId = envelope.GetValue("ODE_ID")
123
;
; all jobs in the envelope could be streamed with the function
StreamDocuments
;OdinStream.StreamDocuments(envelope)
;
; get an job enumerator for the envelope.
jobEnumerator = OdinStream.GetJobEnumerator(envelope)
; run through all envelope jobs and stream
nextJob = jobEnumerator.MoveNext()
while (nextJob)
;
; get current job from enumerator
job = jobEnumerator.Current
; as a test get job ID
jobId = job.GetValue("ODJ_ID")
;
; and now archive, call the OnArchive script
OdinStream.StreamDocument(job)
;
; process next Job
nextJob = jobEnumerator.MoveNext()
;
end-while
;
; process next envelope
nextEnv = envEnumerator.MoveNext()
end-while
;
; Streaming finished, call EndStack
OdinStream.End()
end-if
124
OdinStreamPrint
About OdinStreamPrint
You must have an Odin license installed to use the OdinStreamPrint component.
The OdinStreamPrint component enables you to output an Odin print stream to a printer driver.
Prerequisite You must define the trays used in the stream for the corresponding outsourcing printer.
Notes
If no printer is assigned to the component, the component loads the printer defined in the stream file.
The component uses the tray names in the outsourcing printer to identify the real physical tray IDs for printing.
The component takes the settings for duplex and page orientation from the stream file.
The outsourcing printer events execute alongside the OnBeforeStack / OnAfterStack events.
For more information, refer to Properties of the context OdinStreamPrint.
Properties of OdinStreamPrint
Property
DB Alias
Meaning
Odin database on which the component executes its actions.
NextStackType Specifies the next stack type set after successful execution and after calling the End function.
The drop-down list displays all possible stack types.
Any additionally required stack types must be defined in the file
ModusSuite.Common.PropertyEditors.dll.config.
Default stack types
Name Description Stack type
0 Print Stack is ready to be printed to an online printer or email printer (online print).
10
20
30
PortoOptimization Stack is ready for IT franking. This function is currently not supported.
Streaming
Convert
Stack is ready for streaming.
Stack is ready to be converted to the appropriate output format.
Printer
StackSelect
40
50
99
StreamPrint
Archive
Finish
Stack (stream) is ready for batch printing to an outsourcing printer.
Stack is ready for archiving.
Stack processing is finished, no further action.
Outsourcing printer for printing the print stream.
SQL statement to identify the next stack to be processed.
Either specify the select statement directly or refer to a lookup table (for example,
$OdinSQL.PrintStackSelect$).
OdinStreamPrint Events
Event Meaning
125
OnAfterStack The specified script is executed after the stack processing when calling the End function.
The event corresponds to the AfterStack event of a printer in modus 4.
Available context:
Context OdinCustomProcess
OnBeforeStack The specified script is executed when calling the Start() function, before executing the stack processing.
The event corresponds to the BeforeStack event of a printer in modus 4.
Available context:
Context OdinCustomProcess
OdinStreamPrint Functions
DefinePrinterByName
Defines a printer by its name.
DefinePrinterByName
SYNTAX DefinePrinterByName(printerName)
ARGUMENTS printerName Printer name.
DefinePrinterByOId
Defines a printer by its object ID.
DefinePrinterByOId
SYNTAX DefinePrinterByOId(printerOID)
ARGUMENTS printerOID Object ID of the printer.
End
Ends component processing, sets the stack to the next stack type and, if relevant, executes a script assigned to the OnAfterStack event.
End
SYNTAX
ARGUMENTS
End()
End(errorMessage) errorMessage Error message.
The following values are set.
ODS_Print_End Current date and time.
ODS_Delete_At Current date, time, and stack hold time.
If processing ends correctly, the following values are set.
126
ODS_PrintState 2 (OdinPrintState.OK)
ODS_State NextStackState of the component.
ODS_StackType NextStackState of the component.
On error, the following values are set.
ODS_PrintState
ODS_State
3 (OdinPrintState.Error)
3 (OdinStackState.Locked)
ODS_MessageText Error message.
GetCurrentStackRow
After calling Start() and before calling End() the function returns an object whose interface provides read access to the current stack dataset.
GetCurrentStackRow
SYNTAX GetCurrentStackRow()
RETURN Object interface that provides read access to the current stack dataset.
The following functions are available.
GetValue
Returns the value of the given column.
GetValue
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
GetValue(columnName) columnName Column name
The column value.
If the data type of the database column is DATE, Datetime or any valid date type, the date read generally returns in the format MM/DD/YYYY hh:mm:ss.
GetObject("DateVar","MLDate")
StringDateVar =
CurrentJobRecord.GetValue("ODJ_create_at")
;Convert date to the required format with the help of the MLDate object
IntDateVar = DateVar.DateStringToInt64("MM/dd/yyyy hh:mm:ss", StringDateVar ) v_LETTERDATE= DateVar.Int64ToDateString("MM.dd.yyyy hh:mm:ss ", IntDateVar)
GetFieldNameEnumerator
Returns an enumerator.
GetFieldNameEnumerator
SYNTAX GetFieldNameEnumerator()
RETURN Enumerator with the following functions.
127
Current Returns the current object.
MoveNext() Moves the position to the next object to process.
SYNTAX MoveNext()
RETURN TRUE = Successful
FALSE = The end of the collection is passed.
Reset Resets the enumerator back to the beginning of the first element.
GetDocumentEnumerator
Returns a document enumerator.
GetDocumentEnumerator
SYNTAX GetDocumentEnumerator()
RETURN
Enumerator with the following functions.
Current Returns the current document.
MoveNext() Moves the position to the next document to process.
SYNTAX MoveNext()
RETURN
EXAMPLE
TRUE = Successful
FALSE = The end of the collection is passed. docEnumerator =
OdinPrint.GetDocumentEnumerator() nextElement = docEnumerator.MoveNext() while (nextElement)
envelope = docEnumerator.Current;
...
nextElement = docEnumerator.MoveNext()
Reset Resets the enumerator to the beginning of the first element.
GetNextStack
Determines the next stack to convert according to the corresponding SQL, which is stored in the
StackSelect property, and returns its ID.
GetNextStack
SYNTAX GetNextStack()
RETURN ID of the stack found, or an empty string if none found.
PrintDocument
Prints the specified document.
PrintDocument
128
SYNTAX
ARGUMENTS
PrintDocument(document) document The document to print.
SetStackError
Sets the status of a stack to error.
SetPdfSigner
SYNTAX SetStackError(errorMessage)
ARGUMENTS errorMessage Error message
Start
Loads and initializes the given stack and executes a script assigned to the OnBeforeStack event.
The stack must be of the corresponding stack type to that required of the component. The status must be set to Wait.
Start
SYNTAX
ARGUMENTS
Start(stackId) stackId Stack ID
After successful loading, the stack is locked and the statuses set accordingly.
ODS_LockBy:
ODS_State:
ODS_PrintState:
ODS_Print_Start:
Name of the current user
1 (OdinStackState.InWork)
1 (OdinPrintState.InWork)
Current date / time
ODS_MessageText: Empty string
Sample Script OdinStreamPrint
; initialize StreamPrint components
OdinStreamPrint = ModusProcess.GetComponent("OdinStreamPrint")
; determine next stack stackID = OdinStreamPrint.GetNextStack()
;
; was a stack found ? if (stackID <> "")
;
; Yes, now initialize stack print
OdinStreamPrint.Start(stackID)
;
; get a DocumentEnumerator and print each document in the stream
DocumentEnumerator = OdinStreamPrint.GetDocumentEnumerator()
;
129
nextDocument = DocumentEnumerator.MoveNext()
;
while(nextDocument = true)
; print next document in the stream
document = DocumentEnumerator.Current
OdinStreamPrint.PrintDocument(document)
;
; navigate the stream to the next document
nextDocument = DocumentEnumerator.MoveNext()
end-while
; end stream print
OdinStreamPrint.End() end-if
130
Transfer
About Transfer
You must have a Versioning license installed to use the transfer component.
This component starts scheduled Transfer Jobs.
Properties of Transfer
Parameter Description
RollbackOnFailure TRUE = The transfer is retracted in the event of an error.
FALSE = The transfer is not retracted in the event of an error.
RepositoryDBAlias Database on which the component searches for transfer jobs.
Transfer Functions
ExecuteTransfer
Executes a scheduled transfer.
ExecuteSynchron
SYNTAX ExecuteTransfer(scheduleTransferDbId)
ARGUMENTS scheduleTransferDbId ID of the scheduled transfer job.
RETURN
Errors occurred while importing.
-5
-6
-7
-8
-9
-100
>0 (number of errors)
-1
-2
-3
-4
Parameter scheduledTransferId is null or empty.
Parameter scheduledTransferId cannot be converted to long.
No scheduled transfer found for the given scheduledTransferId.
More than one scheduled transfer found for the given scheduledTransferId.
Exception thrown while importing the transfer.
Exception thrown while retracting the transfer
The status of the transfer could not be set to InProgress.
The status of the transfer could not be set to Finished.
The scheduled transfer cannot be executed any more.
Exception thrown while executing the transfer.
GetNextTransfer
Checks whether a scheduled transfer job to be executed exists.
GetNextTransfer
SYNTAX GetNextTransfer()
RETURN ID of the scheduled transfer job or an empty string when no scheduled transfer job exists.
131
Sample Process: ScheduledTransfers
Import the process
To import the sample process ScheduledTransfers, complete the following steps.
1. On the Administration tab, click the Repository Import button.
2. In the Specification of the import directory box, type lifecycle_proc.
3. On the Repository Import tab, click the Execute button.
Modify the process
To modify the sample process, complete the following steps.
1. Open the process ScheduledTransfers.
2. In the bottom pane of the Editor window, click the Transfer component.
3. In the Object Inspector pane, click the Repository DB Alias property.
4. Click the down arrow next to the property and select the the target database for the transfer.
5. On the Process Designer Tools tab, under Create, click the Compile button.
Note The script ExecuteScheduledTransfer used by the process is fully functional and does not need modification.
Script ExecuteScheduledTransfer
transfer = ModusProcess.GetComponent("Transfer") if (transfer.RepositoryDBAlias = "")
msg = FormatStr("component-property 'RepositoryDbAlias' not set. Execution canceled")
ModusProcess.SendInfoMessage(msg)
Protocol(msg,0)
Exit end-if
; get next scheduled transfer to execute
transferId = transfer.GetNextTransfer()
;check whether a transferId was returned by the previous call of
GetNextTransfer()
if (transferId <> "")
msg = FormatStr("executing scheduled transfer with Id '%s'" , transferId)
ModusProcess.SendInfoMessage(msg)
Protocol(msg,8)
;execute the scheduled transfer
transferResult = transfer.ExecuteTransfer(transferId)
msg = FormatStr("finished scheduled transfer with Id '%s' - ResultCode:
%s", transferId, String(transferResult))
132
ModusProcess.SendInfoMessage(msg)
Protocol(msg,8)
; error during transfer/import occured
if (transferResult <> 0)
msg = FormatStr("error occured for scheduled transfer with Id '%s' -
ResultCode: %s", transferId, String(transferResult))
ModusProcess.SendInfoMessage(msg)
Protocol(msg,0)
end-if else
ModusProcess.SendInfoMessage("no next scheduled transfer found") end-if
133
XMLProcessingManager
About XMLProcessingManager
Use this component to handle XML files by a process.
The files to be processed can contain one or more print jobs.
Properties of the XmlProcessingManager
Property
FileName
Description
Name of the XML file currently open in the form of processId.wrk.
JobElementPath
LastXmlContent
Path to the datasets within the multiple XML file, for example, /JOBS/JOB.
Last data XML
LastOuterXmlContent When processing a single XML file, the content is the same as LastXmlContent.
When processing a multiple XML file, the property also contains the job node.
Example
<JOBS>
<JOB>
<Partner ...>
...
</Partner>
</JOB>
</JOBS)
LastXmlContent:
<Partner …….>
...
</Partner>
LastOuterXmlContent:
<JOB>
<Partner ...>
...
</Partner>
</JOB>
OriginalFileName
SearchDirectory
Original name of the XML file.
Path where the XML files to be processed are stored, for example, D:\Input\Multi\*.xml.
XMLProcessingManager Functions
Cancel
Orders the XmlParser to cancel on the next call of NextJob().
Cancel
SYNTAX
EXAMPLE
Cancel() processor.Cancel()
134
FileExists
Searches the directory specified as SearchDirectory for files containing data for batch processing.
If a file exists, it is opened and the file extension changes to .wrk.
FileExists
SYNTAX
ARGUMENTS
RETURN
EXAMPLE
FileExists(processID) processId Process ID
TRUE = File found.
FALSE = File not found.
UniqueId = UniqueGuid.ToString()
ExecuteTimer = processor.FileExists(UniqueId)
FileExistsEx
Searches the directory specified as SearchDirectory for files containing data for batch processing.
If a file exists, it is opened and the file extension changes to .wrk.
FileExists
SYNTAX
ARGUMENTS
RETURN
FileExists(processID) processId Process ID
If a file exists, the whole content of the MultiXml file returns as an XML string.
If no file exists, an empty string returns.
GetJobAttribute
Allows access to the attributes of the JOB element in the XML batch file.
GetJobAttribute
SYNTAX GetJobAttribute(attributeName)
ARGUMENTS attributeName Attribute name.
RETURN
EXAMPLE
Value of the attribute or an empty string, if the attribute does not exist.
System.DocumentCollection = processor.GetJobAttribute("name")
NextJob
Reads the data XML of the next job from the XML batch file. The data XML is then available in the attribute LastXmlContent.
Syntax
NextJob()
135
Return value
Value Definition
True Next job was read.
False No next job found.
Example
SYSTEM.DoWork = processor.NextJob()
StartProcessing
Initializes the processing of an XML batch file.
StartProcessing
SYNTAX StartProcessing()
EXAMPLE processor = ModusProcess.GetComponent("XmlProcessingManager") processor.StartProcessing()
Terminate
Ends the processing of an XML batch file.
Terminate
SYNTAX
EXAMPLE
Terminate() processor = ModusProcess.GetComponent("XmlProcessingManager") processor.StartProcessing()
... processor.Terminate()
136
XwsDataSelectionManager
About XwsDataSelectionManager
You must have an Xdata license installed to use the XwsDataSelectionManager component.
This component provides data retrieval through Xdata web services and creates an XML file used for document generation.
Properties of the XwsDataSelectionManager
Parameter Description
SelectionReference Selection the component executes.
WebServiceUrl URL of the Xdata web services.
LastError
NavigatorXml
XmlData
Use this property to retrieve information if an error occurs during data collection.
If the function GetDataExtended is called with the parameter retrieveNavigateXml =
True, you can access the navigation XML here.
Read the XML of the last data collection as a string.
XwsDataSelectionManagers Functions
GetData
Executes data retrieval.
GetData
SYNTAX
ARGUMENTS
GetData(raiseError)
GetData(selectionParameters, raiseError) selectionParameters Selection parameter in XML format
Example
selectionParameters = "<parameters><parameter name=""Partnernumber"" value=""0815""
/></parameters>"
If this parameter is not specified, the selection parameters must be stored in the system pool.
Example
system.Partnernumber = "0815" raiseError TRUE = An error is thrown if a reading script tries to read a data object with SelVariable that does not exist.
FALSE = No error is thrown if a reading script tries to read a data object with SelVariable that does not exist.
<> 0 if an error occurred. RETURN
GetDataExtended
Executes data retrieval.
GetDataExtended
SYNTAX GetDataExtended(raiseError, retrieveNavigateXml)
137
ARGUMENTS
GetDataExtended(selectionParameters, raiseError, retrieveNavigateXml) selectionParameters Selection Parameters
Example
selectionParameters = "<parameters><parameter name=""Partnernumber"" value=""0815""
/></parameters>"
If this parameter is not specified, the selection parameters must be stored in the system pool.
Example
system.Partnernumber = "0815" raiseError TRUE = An error is thrown if a reading script tries to read a data object with SelVariable that does not exist.
FALSE = No error is thrown if a reading script tries to read a data object with SelVariable that does not exist. retrieveNavigateXml TRUE = Write the navigation XML in the NavigatorXml property.
FALSE = Do not write navigation XML in the NavigatorXml property.
<> 0 if an error occurred. RETURN
Ping
Checks the reachability of the web service defined in the WebServiceUrl property.
Ping
SYNTAX Ping()
RETURN "Xdata Runtime Webservice (name of the user running the web service)".
Sample Script XwsDataSelectionManager
xws = ModusProcess.GetComponent("XWSDataSelectionManager")
; pingResult = xws.Ping()
;
; The parameter raiseInSelVar (set to false in all examples) throws an exception if true,
; that means if the selection tries to read a non-existent variable.
;
;----------------------------------------------------------------
;Alternative with Selection Parameter in an XML string
;---------------------------------------------------------------- selectionParameters = "<parameters><parameter name=""Partnernumber"" value=""0815"" /></parameters>"
;no NavigationsXml rescode = xws.GetData(selectionParameters, false) data = xws.XmlData error = xws.LastError
;
138
;---------------------------------------
;with NavigationsXML (here 3. Parameter)
;--------------------------------------- rescode = xws.GetDataExtended(selectionParameters, false, true) data = xws.XmlData navigData = xws.NavigatorXml error = xws.LastError
;
;-----------------------------------------------------------
;Alternative with Selection Parameter stored in system pool
;no NavigationsXml
;----------------------------------------------------------- system.Partnernumber = "0815" rescode = xws.GetData(false) data = xws.XmlData error = xws.LastError
;
;----------------------------------
;with NavigationsXML (2. Parameter)
;---------------------------------- rescode = xws.GetDataExtended(false, true) data = xws.XmlData navigData = xws.NavigatorXml error = xws.LastError
;
Host processes
For more information, refer to "Install a Windows service " in Perceptive Document Composition
Configuration Guide.
139
Query Definitions
About query definitions
Query definitions enable you to compile analyses of database tables that you can run from the Query
Assistant.
Create a query definition
To create a query definition, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Query Definition.
2. In the Create New Query Definition dialog box, type a name for the query definition and click OK.
3. In the right pane of the Editor window, in the Database Alias list, select a database alias.
The list of the tables contained in the database alias displays.
4. To display the list of table fields, click the plus sign to the left of the table from which you want to read the data.
5. From the right pane of the Editor window, drag the preferred table fields to the bottom-left pane of the Editor window named Result Columns.
Note If you need all fields in a table, drag the table to the Result Columns pane.
6. Optional. In the Object Inspector pane, edit the properties of the query definition .
7. Optional. In the Object Inspector pane, edit the properties of the result columns .
Add a condition
A condition in a query definition corresponds to the WHERE clause of the SQL statement. Each query definition can contain an unlimited number of conditions.
To add a condition to the query definition, complete the following steps.
1. On the Query Definition Editor Tools tab, click the Add New Condition button.
2. In the Add New Condition dialog box, type a name for the condition and click OK.
3. In the Object Inspector pane, edit the properties of the condition .
button. 4. On the Query Definition Editor Tools tab click the Compile
5. Observe success or failure messages in the Output p.
140
Add a variable to a condition
Each condition can contain an unlimited number of variables, all of which you can use in the WHERE clause and which you can specify as parameters in the query assistant.
To add variables to a condition, complete the following steps.
1. In the Editor window click the condition.
2. On the Query Definition Editor Tools tab, click the Add New Variable button.
3. In the Add New Variable dialog box, type a name for the variable and click OK.
4. In the Object Inspector pane, edit the properties of the variables .
5. On the Query Definition Editor Tools tab click the Compile
6. Observe success or failure messages in the Output pane.
button.
Add a column
To add an additional column to the query definition, complete the following steps.
1. On the Query Definition Editor Tools tab, click the Add New Column button.
2. In the Add New Column dialog box, type a name for the column and click OK.
3. In the Object Inspector pane, in the DB Column property, type a function. For example,
Count (*) as Columnname
4. Optional. In the Object Inspector pane, modify the properties of the column .
button. 5. On the Query Definition Editor Tools tab, click the Compile
6. Observe success or failure messages in the Output pane.
Properties of a query definition
Property
Description
Description
Free text description.
DB Alias
DB Table
Detail Query
DB alias on which the query runs.
Corresponds to the FROM statement in the select.
Define a query definition to give a more detailed result.
Category Category of the query (free text).
Maximum Lines Number of rows in the query result.
Properties of result columns
Description Property name
Description Free text description.
141
DB Column
Visible
Column Size
Name of the database field.
TRUE = The result column displays in the result.
FALSE = The result column does not display in the result.
Column width in the query result.
Specify -1 to determine the column width automatically depending on contents and column headings.
Column title in the query result. Title
Properties of a condition
Property Description
Description Free text description.
GroupBy
OrderBy
Title
Database column by which the results are grouped.
Database column by which the results are sorted.
Parameter title.
Where Corresponds to the WHERE statement in the select.
If the condition contains variables, you can use them in one of the following ways.
PR_TYPE = $VariableName$
PR_TYPE = :VariableName
Properties of a variable
Property
DefaultValue
Prompt
Title
TypeName
ValueHelp
Description
Default value for parameter input.
You can also use values in the form of [ModusUser.AttributeName].
TRUE = The variable displays in the query dialog box and the user can edit the variable.
FALSE = The variable does not display in the query dialog box.
Title of the variable as shown in the query assistant.
Type of variable (free text)
Name of the value help assigned to the variable.
142
Xdata
About Xdata
Xdata is the data retrieval module of Perceptive Document Composition and performs all data retrieval activities.
Xdata offers the possibility to extract data from various databases, to read data from SAP, and to make the data available to other components as XML.
Xdata runtime provides a framework to read the metadata of configured data bases and SAP systems.
This metadata is used to create selections and data objects.
An integrated compiler converts these data selection objects to a .NET assembly. This assembly contains the complete process flow of a selection, which means the whole sequence of individual read data operations.
The following database access providers are supported.
ODP
OLEDB
ORAMS
MSSQL
Limitations on calling BAPI functions
Document Composition allows to call certain SAP BAPI functions.
Regard the following limitations for an SAP BAPI to be called.
Input Parameters (Imports)
Currently Document Composition supports these ABAP data types for Import parameters:
Integer (4-bytes)
Packed decimal
Floating point
Character numeric
Character
Date
Time
RFC STRING Variable-length string
XSTRING Variable-length raw byte array.
Return Parameters (Exports)
Currently Document Composition exclusively calls BAPIs with export parameters complying with one of these conditions:
Parameter is an SAP structure (single value return).
Parameter is an SAP table (return of lists).
143
144
Data Objects
About data objects
Data objects are logical views of physical data and contain 1-n attributes, data object variables.
Data objects can stand in relation to other data objects.
Create a data object
You must have an Xdata license installed to create data objects.
To create a data object, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Data Object.
2. In the Data Object Assistant window, select the Create data objects option and click Next.
3. In the Data Object Assistant window, complete the following substeps.
1. From the Alias Connection drop-down menu, select an alias.
As a result, a list of all tables associated with this database (DB) alias displays.
Note For SAP connections the list displays all available BAPIs. For more information, refer to
Limitations on calling SAP BAPIs .
2. Select the tables from which you want to create new data objects.
3. Optional. To assign a new name to a target data object, right-click the table and click Rename.
4. Optional. To exclude data fields the data object should not contain, click the plus sign to the left of a table and clear the appropriate check boxes.
5. Click the Next button.
4. In the Data Object Assistant window, click the Create Data Objects button.
5. Optional. To create additional data objects, click the Back button.
145
Modify a data object
To modify a data object, complete the following steps.
1. Open the data object.
2. Optional. To add a variable, complete the following substeps.
1. On the Xdata Editor Tools tab, click the New Variable button.
2. In the Create Data Object Variable dialog box, type a name for the variable and click OK.
Note The data object variables display in the upper-right pane of the Editor window.
3. Optional. To rename a variable, complete the following substeps.
1. In the upper-right pane of the Editor window, right-click the variable and click Rename.
2. In the Rename Data Object Variable dialog box, type a new name for the variable and click OK.
4. Optional. To delete a variable, in the upper-right pane of the Editor window, right-click the variable and click Delete Variable.
5.
Create the preferred reading scripts .
6. In the Object Inspector pane, click the Active Reading Script property.
7. Click the down arrow next to the property and select the preferred reading script.
8. Optional. From the bottom pane of the Navigator, drag child data objects to the Editor window.
146
Reading scripts
About reading scripts
Data objects that read data from a database require a reading script that executes at runtime. This reading script executes the specified SQL query and applies the read data to the data object.
Note Data objects that read data from SAP do not use reading scripts.
Create a reading script
To create a reading script, complete the following steps.
1. Open the data object.
2. In the Editor window, select the topmost data object.
Note To create reading scripts for child data objects, open the respective child data object.
3. On the Xdata Editor Tools tab, click the New Reading Script button.
4. In the Create New Reading Script dialog box, type a name for the variable and click OK.
Note All available reading scripts display in the bottom-right pane of the Editor window.
5. In the bottom-right pane of the Editor window, double-click the newly created script.
Note The reading script already contains two default statements and is fully functional. db.WorkWithQuery("Q1") ; Executes the specified SQL query ("Q1") db.ApplyDataSet() ; Applies the read data set to the data object
6. Optional. Modify the reading script. For more information, refer to Xdata Functions.
7.
8. Optional. To create additional SQL queries, complete the following substeps.
1. In the right pane of the Editor window, right-click and click Create New SQL.
2. In the Create New SQL dialog box, type a name for the query and click OK.
3. In the bottom pane of the Editor window, complete the where clause of the SQL statement.
For more information, refer to Modify an SQL query .
4. Optional. In the upper pane of the Editor window, replace the parameter Q1 with the name of the new SQL query.
Example before db.WorkWithQuery("
Q1
") after db.WorkWithQuery("
Q2
")
147
Modify the SQL query
When you were creating the reading script, an SQL query Q1 was generated that needs modification.
This query contains the SQL statement used to read the data fields.
To modify the SQL query, complete the following steps.
1. In the Editor window of the reading script, in the right pane, click the Q1 entry.
As a result, the query statement displays in the bottom pane of the Editor window.
2. In the bottom pane of the Editor window, complete the where clause of the SQL statement.
Example select * from BANKS where BNK_BIN=:ACC_BIN
Notes
The where clause typically contains variables that populate with values at runtime.
A variable is preceded by a colon.
The variable content is replaced at runtime according to the following rules.
If the parent data object contains a field that matches the name of the variable, the field value is used.
If nothing is found, the SYSTEM pool is checked for a variable of this name and the corresponding value is used.
148
Insert child data objects
A data object can contain child data objects to which it maintains a master-detail relationship.
To insert a child data object in a data object, complete the following steps.
1. Open the data object.
2. From the bottom pane of the Navigator, drag one or more data objects to the Editor window.
3. In the Editor window, click the child data object.
4. In the Object Inspector pane, click the Active Reading Script property.
5. Click the down arrow next to the property and select the preferred reading script.
6. In the Object Inspector pane, click the RelationType property, then click the down arrow next to the property and select the preferred relationship.
A One2One relationship is one that exists for example between partner and title - each partner has only one title.
A One2Many relationship is one that exists for example between partner and address - each partner may have more than one address.
7. To assign the key fields used to define the relationship between the two objects, complete the following substeps.
5.
1. Click the parent data object.
2. From the upper-right pane of the Editor window, drag one or more data object variables you want to use as masterkey onto the child data object in the left pane of the Editor window.
Result
The Masterkey Column(s) property of the child object changes to the name of the data object variable(s).
3. Click the child data object.
4. From the upper-right pane of the Editor window, drag one or more data object variables you want to use as key onto the child data object in the left pane of the Editor window.
Result
The Key Column(s) property of the child object changes to the name of the data object variable(s).
Nesting depth of child objects
You can nest objects within each other to any depth. For better performance the editor only displays the next nesting level for each object.
Example
The data Partner object has the Accounts child data object.
The Accounts data object has the Banks child data object.
In the data Partner object, the Banks child object is not visible.
149
Create a summary node
A summary node is a special function of child data objects.
A summary node allows you to collate datasets, for example from child data objects that should be immediately available in the selection.
Example
The Partner data object contains the Accounts child object, which itself contains the Banks child object.
Use a summary node to have all Banks data read directly available in the selection.
To insert the Banks data object as a summary node in the Partner data object, complete the following steps.
1. Open the Partner data object.
2. From the Navigator, drag the Banks data object to the Editor window.
3. In the Editor window, click the Banks data object.
4. To define the Banks child object as a summary node, in the Object Inspector pane, in the
Masterkey property , type *.
5. In the Object Inspector pane, in the Key property, type the table field by which the entries can be exactly identified, for example the field that contains the bank routing number.
Result
The selection reads all the accounts of Partner and for each account the corresponding bank data. The
Banks summary node contains all banks read by the selection.
Note Summary nodes do not need a reading script.
Xdata editor tools for data objects
Icon Name
Refresh
New Variable
Description
Refreshes the data object.
You can only execute this function when you have saved your modifications.
Creates a new data object variable.
New Reading Script Creates a new reading script
Open Data Object Opens the selected data object.
150
Empty Data Objects
Create an empty data object
You must have an Xdata license installed to create empty data objects.
An empty data object is not directly associated to a data source. You can use an empty data object for example to execute SQL queries.
To create an empty data object, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Data Object.
2. In the Data Object Assistant window, select the Create a new empty data object option and click
Next.
3. In the Create New Data Object dialog box, type a name for the data object and click OK.
4. In the Data Object Assistant window, click the Create Data Object button.
Example of use
Modify or delete datasets with an empty data object
To use an empty data object to modify or delete datasets, complete the following steps.
1.
2.
3. Modify the reading script as follows. db.StartTransaction() db.ExecuteQuery("Q1") db.Commit()
4.
Modify the SQL query to an Update or Delete statement.
Example
Update Partner set LastSaved = sysdate where par_id = :PAR_ID
Execute a stored procedure with an empty data object
To execute a stored procedure in an empty data object, complete the following steps.
1.
2. For each parameter of the stored procedure, add a variable.
3. For each variable, in the Object Inspector pane, in the DataLink property, type the name for the respective stored procedure parameter.
4.
Note The name of the script must correspond with the name of the stored procedure.
5. Modify the reading script corresponding to the following example.
System.Inputparam = System.Partnernumber ;Inputparam of the
StoredProcedure db.StartProcedure("ProcedureName", 0) db.ApplyDataSet()
6. To modify the SQL query , complete the following substeps.
151
1. Remove the select statement.
2. Define the parameter and data type in the following format.
ParameterName=ParameterTypeDataFieldType
Example
Inputparam=IS
Outputparam1=OS
Outputparam2=OI
Outputparam3=O@
The character marked in green determines the parameter type.
Parameter Type Description
I Input parameter
O
B
Output parameter
Input / Output parameter
R Return value
3.
The character marked in yellow determines the data field type.
Data Field Type Description
S String
I
F
D
T
@
Integer
Float
Date
Time
Datetime
Update data objects
If the structure of a table has altered, you have to update the corresponding data object that accesses the table.
To update data objects, complete the following steps.
1. In the bottom pane of the Navigator, select one or more data objects, then right-click one of the selected data objects and click New > Data Object.
2. In the Data Object Assistant window, select the Update data objects option and click Next.
3. In the Refresh selected objects window, check your selection and click Next.
4. In the Data Object Assistant window, click Update Data Objects.
Properties of a data object
Property
Active Reading
Script
Description
Description
Name of the active reading script.
Free text description.
152
DataLink
DataSource
DBAlias
FieldRange
IsActive
Masterkey
Column(s)
ObjectName
RelationType
Key Column(s)
Name of the DB table, DB column, or the SAP BAPI that the selection uses during execution.
DataSource Type (Database or SAP).
Associated DB alias.
The text [FIELDRANGE] in an SQL statement is replaced with the content of the property
FieldRange before execution.
Note You must type FIELDRANGE in uppercase.
Example
The SQL statement of the data object is defined as follows. select [FIELDRANGE] from Contract where Number = :ContractNumber
The property FieldRange contains the value "ContractId, Number".
At run time, the following SQL statement executes. select ContractId, Number from Contract where Number =
:ContractNumber
This feature is designed to specify the columns of a select statement but you can also use it to replace other parts of the SQL statement, for example, the table name. select * from [FIELDRANGE] where Number = :ContractNumber
Defines whether the data object is active. This property is only available for child data objects.
Masterkey(s) for the parent data objects master-detail relationship.
Unique object name, defines the name of the XML element.
Type of relationship.
One2One: An example of a One2One relationship is that which exists between partner and title - each partner has only one title.
One2Many: An example of a One2Many relationship is that which exists between partner and address - each partner may have more than one address.
This property is only available for child data objects.
Key(s) for the master-detail relationship.
153
Properties of a data object variable
Property
DataLink
Description
Name of the DB table, DB column or the SAP BAPI, that the selection uses during execution.
Fieldlength Length of the data field.
IsContainerColumn TRUE = The data object variable is used to store values from another database column that contain one or more value pairs separated by a fixed character from each other.
FALSE = The data object variable is not used to store other values.
Example
The database column CustomerInfo contains a person's first name and surname. The content has the general structure of
FirstName=John,LastName=Doe
The 2 entries are separated by a COMMA. To automatically assign FirstName and LastName to a data object variable, complete the following steps.
1. Create the following data object variables.
FirstName
Surname
Note The value for the DataLink attribute must be identical to the key name in the database column, in this example FirstName or Surname.
2. Set the IsContainerColumn property for both variables to True.
ObjectName
3. In the reading script, use the DefineContainer function to define the column and the separator.
Example db.WorkWithQuery("Q1") db.DefineContainer(0, " CustomerInfo ", "44"); 44 =
ASCII-Code for the COMMA db.ApplyDataSet()
For more information, refer to DefineContainer.
Unique object name, defines the name of the XML element.
154
Selections
About selections
Selections contain the root data object and any number of child objects. Their primary function is data retrieval.
There are two selection types available to the user.
Active Selections read data from a database or from SAP.
XSD Selections read data from an XML file.
Define the start parameters
To specify start parameters for the selection, complete the following steps.
1. Open the selection.
2. In the Object Inspector pane, click the Start Parameter property and click the Ellipsis button.
3. In the Start Parameter dialog box, if you want to add values to the grid, complete the following substeps.
4. Click Add key.
1. In the Key name column, type the name of the key.
2. Optional. In the Prompt column, type the text of the prompt.
3. Optional. In the Default value column, type a default value for the key.
5. Click OK.
5. To delete values from the grid, in the Start Parameter dialog box, click Delete key.
155
List of formatting characters
This table displays the characters that you can use to define an input mask.
A a
C c
\
L
I
0
9
#
:
/
;
_
Characters Description
! Specifies that optional characters display as leading spaces. If "!" character is not specified, optional characters display as trailing spaces in the mask.
>
<
<>
Converts all following characters to lower case until the end of the mask is reached or the character "<" is detected.
Converts all following characters to lower case until the end of the mask is reached or the character ">" is detected.
If both characters are used together, no case sensitivity check is made. The data specified is formatted in exactly the same way a user types it.
The character following "\" can be used as a placeholder in the input mask.
Valid entries are (A-Z, a-z). An entry is not compulsory.
Only alphanumeric characters are valid (A-Z, a-z, 0-9). An entry is not compulsory.
Any character is allowed. An entry is not compulsory.
Only a numeric character is allowed. An entry is not compulsory.
Only a numeric character or a plus or minus sign is allowed. An entry is not compulsory.
Used to separate hours, minutes, and seconds in defining a time.
Used to separate the date entries day, month, and year from each other.
Used to separate the three mask parameters from each other.
The underline character _ automatically inserts a space in the text. The cursor skips over these characters when you type data.
Notes
You can use any character which is not listed in the above table as a first parameter of the mask and as placeholder for input. These characters are inserted automatically and skipped by the cursor on data entry.
You can also use the special mask characters listed in above table as placeholders as long as you specify the "\" character first.
156
Save a selection as a schema
To save a selection as an XML schema, complete the following steps.
1. Open the selection.
2. In the Xdata Editor Tools tab, click the Export Xml Schema button.
3. In the Save as dialog box, type a name for the file and click Save.
Xdata editor tools for selections
Icon Name
Refresh
Description
Refreshes the data object in the selection.
You can only execute this function when you have saved your modifications.
Compiles the selection. Compile
Selection
Open Data
Object
Export Xml
Schema
Test Selection
Opens the selected data object.
For details, refer to Save Selection as a Schema
For details, refer to Test a Selection
Debug Selection
For details, refer to Debug a Selection
Test Sets
For details, refer to Test Sets
Decorator mode
For details, refer to Recording Data Retrieval
SelVariable
Show Data
For details, refer to Missing Data Objects or Attributes
Shows the result.
Note Use the button Save XML in the following dialog box to save the results in an XML file.
157
Active Selections
Create an active selection
You must have an Xdata license installed to create active selections.
To create an active selection, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Selection.
2. In the Create New Selection dialog box, type a name for the selection and click OK.
3. From the Navigator pane, drag the required data objects to the Editor window.
Note All child objects of the main data object automatically transfer to the selection. To insert or delete child objects in a data object, open the data object itself.
4. Optional. Activate the data objects .
5.
Modify the selection interface .
6. In the Xdata Editor Tools tab, click the Compile button.
7. Observe success or failure messages in the Output pane.
Activate a data object
When you first insert a data object into a selection, it is deactivated. All child objects are also deactivated.
The following icons identify the status of a data object.
The data object icon identifies an active object.
The data object icon with a red cross identifies a deactivated data object.
Note No data is read for deactivated data objects.
To activate a data object, complete one of the following steps.
In the Editor window, right-click the data object and click Active.
Press CTRL and click the data object.
In the Object Inspector pane, set the IsActive property to True.
Refresh data objects in a selection
If you have modified a data object while the selection that uses the data object is open, complete the following steps.
1. Save the modified data object.
2. In the Editor window of the selection, on the Xdata Editor Tools tab, click the
Refresh button.
3. Optional. To update Key and Masterkey of the data object, in the Editor window of the selection, right-click the data object and click Refresh.
4. To make sure all modifications to the data object are registered in the selection, in the Xdata Editor
Tools tab, click the Compile button.
Note If you run the selection before you compile it, the compiled code already stored in the repository and not yet updated with the modifications to the data object executes.
158
Properties of an active selection
Property Description
Start Parameter Start parameter of the selection.
For more information, refer to Define the start parameters .
Test Selections
Execute a selection
To execute a selection, complete the following steps.
1. Open the selection.
2. On the Xdata Editor Tools tab, click the Test Selection button.
3. In the Selection Parameter dialog box, type the selection parameter(s) and click OK.
4. On the Xdata Editor Tools tab, click the Show Data button.
5. In the Selection data dialog box, in the left pane, click the individual data objects to display the data of the selection.
6. Optional. To save the results in a local XML file, complete the following substeps.
1. Click the Save XML button.
2. In the Specify the file name dialog box, type a name of the file and click Save.
Debug a selection
To debug a selection, complete the following steps.
1. Open the selection.
2. In the Xdata Editor Tools tab, click the Debug Selection button.
3. In the Selection Parameter dialog box, type the selection parameter(s) and click OK.
4. Debug the selection using the buttons in the Xdata Editor Tools tab.
5. In the Editor window, in the left pane, click the individual data objects to display the data read.
Use test sets
Test sets contain parameters for frequently used selections.
For information about configuring test sets, refer to the Perceptive Document Composition Configuration
Guide.
To execute a test set, complete the following steps.
1. In the Xdata Editor Tools tab, in the Test Sets test set.
drop-down menu, select a
159
2. In the Xdata Editor Tools tab, click the Test Selection button.
Record a data retrieval
You can record a data retrieval in a file. You can use this file for tests on another computer by using the
Replay option.
To record a data retrieval, complete the following steps.
1. Open the selection.
2. In the Xdata Editor Tools tab, in the Recording mode select Record.
drop-down menu,
3. In the Xdata Editor Tools tab, click the Test Selection button.
4. In the Selection Parameter dialog box, type the selection parameter(s) and click OK.
5. In the Specify the name of the file dialog box, type a name for the file and click Save.
Replay a data retrieval
To replay a data retrieval, complete the following steps.
1. Open the selection.
2. In the Xdata Editor Tools tab, in the Decorator mode select Replay.
drop-down menu,
3. In the Xdata Editor Tools tab, click the Test Selection button.
4. In the Select the recorded selection file dialog box, select a previously recorded XML file and click
Open.
5. In the Xdata Editor Tools tab, click the Show Data button.
6. In the SelectionDataBrowser dialog box, in the left pane, click the individual data objects to display the data read.
7. Optional. To save the results in a local XML file, complete the following substeps.
1. Click the Save XML button.
2. In the Specify the name of the data file to be exported dialog box, type a name for the file and click OK.
Missing data objects or attributes
To trigger an error message when the selection contains a data object or attribute that was not found in the database, complete the following step.
160
In the Xdata Editor Tools tab, select the option Raise in SelVariable.
161
XSD Selections
Import an XSD schema
To create and import an XSD schema, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > XSD Selection.
2. In the Create New XSD Selection dialog box, in the Name box, type a name for the XSD selection, and click OK.
3. On the Xdata Editor Tools toolbar, click the Import XSD Selection button.
4. In the Open dialog box, select an XSD file and click Open.
5. Optional. To display the first level complex types in the first level of XSD selection, on the Xdata
Editor Tools tab, select the Show Complex Type check box.
Export an XSD schema
To export an XSD schema, complete the following steps.
1. On the Xdata Editor Tools toolbar, click the Export XSD XML schema button.
2.
In the
Save As
dialog box, in the
File name
box, type an appropriate file name and click Save. The file is saved in
My
Documents
directory by default. The file is saved in XSD format by default.
Comments in XSD selections
The content of a node xs:documentation displays as text in parentheses behind the data object respectively the attribute.
Only the first element is shown, even if more than one xs:documentation exists.
Language attribute are not evaluated.
This particular XML-Parser behavior complies with W3C recommendations for XML and is described there as Attribute-Value
Normalization.
Examples
<xsd:element name="PNR" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="en">Partner number</xs:documentation>
<xs:documentation xml:lang="de">Partnernummer</xs:documentation>
</xs:annotation>
</xsd:element>
<xs:attribute name="ADR_City" type="xs:string" >
<xs:annotation>
<xs:documentation>Shipping address</xs:documentation>
</xs:annotation>
</xs:attribute>
Properties of XSD selections
Parameter Description
Startparameter Start parameter of the selection.
SetXMLData Script that retrieves the XML data.
162
Execute an XSD selection
1. Open the XSD selection that you want to execute.
2. On the Xdata Editor Tools tab, click the Test Selection button. This button is only enabled when a script is attached to the XSD selection and an XSD schema is attached and available. The Selection Parameter dialog box appears if you add selection parameters to the XSD selection.
3. Optional. In the Selection Parameter dialog box, type the selection parameter and click OK. You may need to add multiple selection parameters.
4. On the Xdata Editor Tools tab, click the Show Data button.
5. In the Selection data dialog box, in the left pane, click the individual data objects to display the data of the XSD selection.
6. Optional. To save the results in a local XML file, complete the following substeps.
1. Click the Save XML button.
2. In the Specify the file name dialog box, type a name of the file and click Save.
Debug an XSD selection
To debug an XSD selection, complete the following steps.
1. Open the XSD selection that you want to debug.
2. On the Xdata Editor Tools tab, click the Debug Selection button. The Selection Parameter dialog box appears if you add selection parameters to the XSD selection.
3. Optional. In the Selection Parameter dialog box, type the selection parameter and click OK. You may need to add multiple selection parameters.
4. Debug the selection using the buttons on the Xdata Editor Tools tab.
5. On the Xdata Editor Tools tab, click the Show Data button.
6. In the Selection data dialog box, in the left pane, click the individual data objects to display the data of the XSD selection.
7. Optional. To save the results in a local XML file, complete the following substeps.
1. Click the Save XML button.
2. In the Specify the file name dialog box, type a name of the file and click Save.
Supported XSD Schema Constructs
Rules for data objects
An XSD schema construct is recognized as a data object when one of the following rules apply:
If it is a node type
xs:sequence
xs:all or
xs:choice
163
the rules are applied to the child nodes.
Rule 1 Node xs:complexType
A node xs:complexType is recognized as a data object.
<xs:schema ... ...
...
<xs:complexType name="MType">
<xs:attribute name="MAttribute" type="xs:string"/>
</xs:complexType>
...
</xs:schema>
Rule 2 Node xs:element with subnode xs:complexType
A node xs:element is recognized as a data object, if it has a child node xs:complexType .
The name of the data object is specified in one of the two nodes in the attribute name.
If the node xs:element already has the attribute name defined, the attribute in a node xs:complexType defined as name is ignored.
<xs:schema ... ...
...
<xs:element name="X">
<xs:annotation>
<xs:documentation>This is X Element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="XAttribute" type="xs:string"/>
</xs:complexType>
</xs:element>
...
</xs:schema>
Rule 3 Node xs:element with xs:complexType as type
A node xs:element is recognized as a data object, if it has as type a xs:complexType node.
<xs:schema ... ...
...
<xs:element name="X" type="Xtype" >
<xs:annotation>
<xs:documentation>This is X Element</xs:documentation>
</xs:annotation>
</xs:element>
...
<xs:complexType name="XType">
<xs:attribute name="XAttribute" type="xs:string"/>
</xs:complexType>
...
</xs:schema>
Rule 4 Node xs:element references a data object element
A node xs:element is recognized as a data object, if ref references a node xs:element that itself on application of one of the rules is a data object.
164
<xs:schema ... ...
...
<xs:element ref="X" >
<xs:annotation>
<xs:documentation>This is X Element</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="Y" />
...
<xs:element name="X">
<xs:annotation>
<xs:documentation>This is X Element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="XAttribute" type="xs:string"/>
</xs:complexType>
</xs:element>
...
<xs:element name="Y">
<xs:complexType>
<xs:attribute name="YAttribute" type="xs:string"/>
</xs:complexType>
</xs:element>
...
</xs:schema>
If a data object was recognized by one of these rules applying, the optional attribute maxOccurs is used to detect the relationship type:
Value
maxOccurs
Description
Type of Relationship
>1 or "Unbounded" 1:N otherwise 1:1
Rules for attributes
An XSD schema construct is recognized as an attribute when one of the following rules apply:
If the attribute type is specified in the node to be checked, the first check is to determine whether the node is xs:complexType.
If yes, the rules are applied to this node. If not, the rules are applied to the node originally specified.
Rule 1: Node xs:attribute is a subnode of a node xs:complexType
A node xs:attribute is recognized as an attribute, when it is a child node of a xs:complexType node.
<xs:schema ... ...
165
...
<xs:complexType name="MType">
<xs:attribute name="MAttribute" type="xs:string"/>
</xs:complexType>
...
</xs:schema>
Rule 2: Node xs:element has one of the attributes ref, type or name specified
A node xs:element is recognized as an attribute, when one of the following criteria in the specified order
.is met
Rule 2.1
If in the node xs:element the attribute ref is specified, it is recognized as an attribute, when the referenced node is recognized as an attribute after applying rule 1 or rule 2.
<xs:schema ... ...
...
<xs:element ref="Y" />
.......
<xs:element name="Y">
<xs:complexType>
<xs:attribute name="YAttribute" type="xs:string"/>
</xs:complexType>
</xs:element>
...
</xs:schema>
If this is not the case, rule 2.2 is checked.
Rule 2.2
If in the node xs:element already has the attribute type is specified, it is recognized as an attribute, when the specified type is either xs:simpleType or xs:complexType with xs:simpleContent.
<xs:schema ... ...
<xs:element name="X" type="Xtype" />
<xs:element name="Y" type="Ytype" />
...
<xs:simpleType name="Xtype">
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="11"/>
<xs:enumeration value="29"/>
</xs:restriction>
</xs:simpleType>
...
<xs:complexType name="Ytype">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="prompt" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
166
...
</xs:schema>
If this is not the case, rule 2.3 is checked.
Rule 2.3
If in the node xs:element the attribute name is specified, it is recognized as an attribute, if it contains a child node xs:simpleType or a child node xs:complexType with xs:simpleContent.
<xs:schema ... ...
...
<xs:element name="X" >
<xs:simpleType name="Xtype">
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="11"/>
<xs:enumeration value="29"/>
</xs:restriction>
</xs:simpleType>
</xs:element >
...
<xs:element name="Y" >
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="prompt" type="xs:string" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element >
...
</xs:schema>
If none of the rules apply, the node is not recognized as an attribute.
If no attribute is recognized and the node is either
xs:sequence
xs:all, xs:choice
xs:simpleContent or
xs:extension the rules are applied to the child nodes.
If one of the rules detects an attribute, the attribute name of the node or the attribute ref of a referenced node is used to determine the name of the attribute.
167
Odin
About Odin
Odin, the Open document interface, is an enterprise-wide solution for complex printing processes.
Odin is an integral part of the Document Composition end-to-end document production workflow, performing all tasks related to print and output management.
Odin can also perform the more complex operations of central printing such as envelope stuffing and post-processing.
You use Odin to complete the following actions.
Convert documents to various formats like TIFF, PDF, and XPS.
Process the documents in a batch.
Send documents to different channels, such as email, printers, fax, and archival systems.
Envelopes
About envelopes
Envelopes enable you to pack one or more documents together after printing.
Create an envelope
You must have an Odin license installed to create envelopes.
To create an envelope, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Envelope.
2. In the Create New Envelope dialog box, type a name for the envelope and click OK.
3. In the Editor window, in the Weight in ounces box, type the weight of the envelope.
Note Weight specification is decisive in the calculation of envelope weight. It is therefore crucial to provide the exact weight when possible.
4. Optional. In the Editor window, in the Description box, provide a description for the envelope.
Note All available envelopes display in the bottom pane of the Editor window.
168
Enclosures
About enclosures
Enclosures enable you to add an enclosure to an envelope either by a data driven rule or a definition in the postage definition.
Create an enclosure
You must have an Odin license installed to create enclosures.
To create an enclosure, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Enclosure.
2. In the Create New Enclosure dialog box, type a name for the enclosure and click OK.
3. In the Editor window, in the Weight in ounces box, type the weight of the enclosure.
Note Weight specification is decisive in the calculation of envelope weight. It is therefore crucial to provide the exact weight when possible.
4. Optional. In the Editor window, in the Tray box, to change the value, type a number or click an arrow.
5. Optional. In the Editor window, in the Description box, provide a description for the enclosure.
Note All available enclosures display in the bottom pane of the Editor window.
169
Postage Definitions
About postage definitions
Postage definitions enable you to group various postage classes.
Create a postage definition
You must have an Odin license installed to create postage definitions.
To create a postage definition, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Postage Definition.
2. In the Create New Postage Definition dialog box, type a name for the postage definition and click
OK.
3. In the Editor window, right-click and click Add New Postage Class.
4. In the Create Postage Class dialog box, type a name for the postage class and click OK.
5. In the Object Inspector pane, select a value for the Envelope property.
Note The envelope weight adds to the total weight.
6. In the Object Inspector pane, type a value for the Maximum Weight property.
7. Optional. In the Object Inspector pane, select one or more enclosures for the FixedEnclosure property.
Note These enclosures combine with the total weight of the envelope. If, as a result, the weight exceeds that of the postage class, the envelope automatically jumps to the next postage class.
8. Optional. In the Object Inspector pane, select one or more enclosures for the Postage-Class-
Neutral Enclosure property.
Note These enclosures combine with the envelope only when the weight of the envelope does not exceed postage class weight limit.
9. Optional. In the Object Inspector pane, provide a description for the postage definition.
Notes
All available envelopes display in the top right pane of the Editor window.
All available enclosures display in the bottom right pane of the Editor window.
170
Forms
About forms
Create a form for each kind of paper you need to use.
Create a form
To create a form, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Form.
2. In the Create New Form dialog box, type a name for the form and click OK.
3. In the Editor window, in the Weight in ounces box, type the weight of the form.
Note Weight specification is decisive in the calculation of envelope weight. It is therefore crucial to provide the exact weight when possible.
4. Optional. In the Editor window, in the Description box, provide a description for the form.
Note All available forms display in the bottom pane of the Editor window.
171
Printers
Email Printers
About email printers
Email printers enable you to send email messages through SMTP.
Documents convert according to the respective tray properties, such as Email-Subject, Email-Body, or
Attachment/AttachmentCollect.
Create an email printer
To create an email printer, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Email Printer.
2. In the Create New Email Printer dialog box, type a name for the email printer and click OK.
3. In the Object Inspector pane, modify the properties of the printer .
4. On the Odin Editor Tools tab, click the Tray button.
5. In the Add Tray dialog box, type a name for the tray and click OK.
6. In the Object Inspector pane, modify the properties of the tray .
Online Printers
About online printers
Online printers enable you to print documents to a physical printer driver (online print or direct print).
Create an online printer
To create an online printer, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Online Printer.
2. In the Create New Online Printer dialog box, type a name for the online printer and click OK.
3. On the Odin Editor Tools tab, click the Printer Selection button.
4. In the Printer Selection dialog box, select a printer and click OK.
5. In the Object Inspector pane, modify the properties of the printer .
6. On the Odin Editor Tools tab, click the Tray button.
7. In the Add Tray dialog box, type a name for the tray and click OK.
8. In the Object Inspector pane, modify the properties of the tray .
Create an online printer for local printing
To allow local printing, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Online Printer.
172
2. In the Create New Online Printer dialog box, type a name for the online printer and click OK.
3. On the Odin Editor Tools tab, click the Printer Selection button.
4. Complete one of the following substeps.
To enable local printing for generated bundles, in the Printer Selection dialog box, select a local printer and click OK.
To forward the generated bundles to Odin without local printing, in the Printer Selection dialog box, select a non-physical printer, such as Microsoft XPS Document Writer, and click OK.
4. In the Object Inspector pane, modify the properties of the printer .
5. Optional. To prevent physical printing caused by Odin processing, in the Object Inspector pane, assign an empty script to the OnPrint event.
6. On the Odin Editor Tools tab, click the Tray button.
7. In the Add Tray dialog box, type a name for the tray and click OK.
8. In the Object Inspector pane, modify the properties of the tray .
Outsourcing Printers
About outsourcing printers
Outsourcing printers enable you to print a print stream to a physical printer driver through the
OdinStreamPrint component (outsourcing print) and to define "virtual" tray names needed to convert streams with the OdinConvert component.
Create an outsourcing printer
You must have an Odin license installed to create outsourcing printers.
To create an outsourcing printer, complete the following steps.
1. In the bottom pane of the Navigator, right-click and click New > Outsourcing Printer.
2. In the Create New Outsourcing Printer dialog box, type a name for the outsourcing printer and click OK.
3. On the Odin Editor Tools tab, click the Printer Selection button.
4. In the Printer Selection dialog box, select a printer and click OK.
5. In the Object Inspector pane, modify the properties of the printer .
6. On the Odin Editor Tools tab, click the Tray button.
Note During streaming, the virtual tray names in the stream file are defined at the document level.
These are mapped to the actual trays of the respective output format or target printer in the corresponding (Compart-)Profile, when the stream is converted.
7. In the Add Tray dialog box, type a name for the tray and click OK.
8. In the Object Inspector pane, modify the properties of the tray .
Note All available forms display in the bottom pane of the Editor window.
173
Printer Properties
Properties of an email printer
Conversion
Property Description
LicenseFile Path and name of the license file for the Compart .NET-Toolkit.
ProfilePath Path to the Compart profiles set in the respective input and output filters.
TraceFile Path and name of the trace file for the Compart .NET-Toolkit.
TraceLevel Trace level
Events
Property Description
OnConvert Script that executes while converting the document into an attachment.
You can use this event to define the name of an attachment file.
Available context
OdinEmailConvert
OnEmail
OnError
Script that executes when sending an email.
SMTP Server settings are stored in the email printer.
Email settings such as sender or subject are defined in the script.
Available context
OdinEmail
Script that executes in the event of an error.
Available context
OnError
General
Property
Description
ErrorAction
Description
Free text description.
Action taken in the event of an error.
Value
StopStackPrint
Description
All printers are deactivated.
StopStackPrintForPrinter The printer that throws an error is deactivated.
Priority Priority of a printer.
VisibleForSelection TRUE = The printer is visible and the user can select it.
FALSE = The printer is not visible and the user cannot select it.
SMTP Settings
Property
SmtpPickupDirectory
Smtp Username
SmtpDeliveryMethod
Description
Directory to which emails are saved, if SmtpDeliveryMethod.SpecifiedPickupDirectory is set.
User name for SMTP server authentication.
Specifies how the email is sent.
174
Possible values
OdinSmtpDeliveryMethod.Network
Description
Emails are sent through the configured SMTP server (SmptHost /
SmtpPort).
OdinSmtpDeliveryMethod.SpecifiedPickupDirectory Emails are copied to the directory specified in the property
SmtpPickupDirectory and must be sent by an external program.
OdinSmtpDeliveryMethod.PickupDirectoryFromIis Emails are copied to the directory configured in the
Internet Information Server
(IIS).
Smtp-Domain
Smtp-Host
Smtp-Password
Domain or computer where login information is verified.
Host on which the SMTP server runs.
User name for SMTP server authentication.
Encoded password to authenticate to the SMTP server.
Note To encode the password, use the tool Encoder.exe in the installation directory.
Smtp-Port
UseSsl
Port of the SMTP server.
TRUE = An encoded SSL connection is used to communicate with the SMTP server.
FALSE = The connection used to communicate with the SMTP server is not encoded.
UseDefaultCredentials TRUE = Authenticate to the SMTP server using the logged on user.
FALSE = Authenticate to the SMTP server using SmptUserName and SmtpPassword.
Properties of an online printer
Events
Property
OnAfterPrint
Description
Script that executes after printing the document.
Available context
OdinPrint
OnBeforePrint Script that executes before the document is printed.
Available context
OdinPrint
OnError Script that executes in the event of an error.
Available context
OnError
OnPrint If a script is specified, it is responsible for the print and is called for each document.
Available context
OdinStreamPrint
General
Property
Description
Description
Free text description.
175
ErrorAction Action taken in the event of an error.
Value
StopStackPrint
Description
All printers are deactivated.
StopStackPrintForPrinter The printer that threw an error is deactivated.
Printer
PrinterOptions
Physical printer name. The drop-down list shows all printers available to the system.
Comma separated string with options. Only the option Duplex_AddPage is currently supported.
Duplex_AddPage=TRUE = When the option UseOneSpoolFile is set to True, an empty page adds to a duplex document with an odd number of pages.
Duplex_AddPage=FALSE = The last page is set to simplex mode.
The default value is FALSE.
Priority of a printer. Priority
VisibleForSelection TRUE = The printer is visible and the user can select it.
FALSE = The printer is not visible and the user cannot select it.
Properties of an outsourcing printer
Events
Property
OnAfterPrint
Description
Script that executes after the document is printed.
Available context
OdinPrint
OnBeforePrint The specified script executes before the document is printed.
Available context
OdinPrint
OnError Script that executes in the event of an error.
Available context
OnError
OnPrint If a script is specified, it is responsible for the print and is called for each document.
Available context
OdinStreamPrint
General
Property
Description
Printer
Description
Free text description.
Physical printer name. The drop-down list shows all printers available to the system.
PrinterOptions Comma separated string with options. Only the option Duplex_AddPage is currently supported.
Duplex_AddPage=TRUE = When the option UseOneSpoolFile is set to True, an empty page adds to a duplex document with an odd number of pages.
Duplex_AddPage=FALSE = The last page is set to simplex mode.
The default value is FALSE.
Priority Priority of a printer.
176
Tray Properties
Properties of an email printer tray
Property Description
BinType Defines how the Odin document is used and converted.
Value
OdinEmailPrinterBinType.Attachment
Description
The Odin document is converted to the corresponding output format, for example
PDF, and then added to the email as a separate attachment.
You can define the name of the attachment in the event OnConvert.
The name of the attachment is inserted into the Odin job table in the
ODJ_EMAIL_ATTACHMENT field.
OdinEmailPrinterBinType.AttachmentCollect All Odin documents are converted to an attachment file in the corresponding output format, which means several documents combine to a single file.
The name of the attachment is inserted into the Odin job table in the
ODJ_EMAIL_ATTACHMENT field.
OdinEmailPrinterBinType.Body
OdinEmailPrinterBinType.Subject
The Odin document is converted to text or
HTML format and used as the body text of the email.
The Odin document is generally converted to text format and used as the subject text.
This also enables a single line Odin document to be converted to an individual reference text of the email.
Forms Specifies 1:n forms assigned to the tray. You can assign each form to only one tray of the printer.
Forms selected for documents and stored in Odin job data are used to map a document to a specific tray.
Note Select all forms you want to use.
Outputformat Output format of the attachment.
The drop-down list shows all the possible output formats as defined in the
ModusSuite.Common.PropertyEditors.dll.config file.
Note Possible values for the output filter depend on the corresponding Compart .NET-Toolkit license.
Properties of an online printer tray
Property Description
DuplexMode Specifies the duplex mode for the tray used to print the Odin document.
Value
Simplex OdinDuplexSetting.Simplex
Description
No duplex
Duplex_Horizontal OdinDuplexSetting.Horizontal Duplex on the short edge
Duplex_Vertical OdinDuplexSetting.Vertical Duplex on the long edge
177
Form(s) Specifies 1:n forms assigned to the tray. You can assign each form only to one tray of the printer.
Forms selected for documents and stored in Odin job data are used to map a document to a specific tray.
Note Select all forms you want to use.
NextInputBin Specifies the (virtual) tray name for the following pages.
PaperSource The physical tray used for printing. The drop-down list shows all trays of the physical printer driver selected.
Properties of an outsourcing printer tray
Property Description
DuplexMode Specifies the duplex mode for the tray used to print the Odin document.
Value
Simplex OdinDuplexSetting.Simplex
Description
No duplex
Duplex_Horizontal OdinDuplexSetting.Horizontal Duplex on the short edge
Form(s)
Duplex_Vertical OdinDuplexSetting.Vertical Duplex on the long edge
Specifies 1:n forms assigned to the tray. You can assign each form only to one tray of the printer.
Forms selected for documents and stored in Odin job data are used to map a document to a specific tray.
Note Select all forms you want to use.
NextInputBin Specifies the (virtual) tray name for the following pages.
PaperSource The physical tray used for printing. The drop-down list shows all trays of the physical printer driver selected.
178
Versioning
About versioning
Versioning is an optional component. You must have a Versioning license installed to use the versioning functionality.
Almost all object types administrated in Composition Studio can be versioned except the following object types.
Folders
Profiles
Roles
Role Mappings
DB Aliases
Transfer Jobs
Systems
New objects
A new object always creates as a work version with the number 0.1.
New versions
You can create new versions only for editable objects.
Repositories without versioning
If versioning is not active, all objects receive the version number 1.0.
Opening versioned objects
The newest version of the object, the object with the highest version number, will open for editing.
You can open older versions only in the view mode. You cannot save any modifications to older versions
until you have reactivated the version.
Renaming versioned objects
Renaming an object has no effect on the version number. All versions and references use the new object name.
Changes to versioned objects
Creating a new version of a version controlled object has no effect on the version number of parent or child objects.
Example
The document template Partner_Application contains the text block Account_Overview.
Account_Overview contains the child text block Partner_Accounts. Partner_Accounts contains the child textblock Partner_Account_InterestRate.
179
Document template Partner_Application
Text Block Account_Overview
Text Block Partner_Accounts
Text Block Partner_Account_InterestRate
Modifications to the text block Partner_Accounts only result in a new version of this text block.
Neither the child text block Partner_Account_InterestRate nor the child text block Account_Overview receive a new version number.
The document template Partner_Application also does not receive a new version number.
Version types
A distinction is made between two types of object versions:
Version Type Example
Release Versions 1.0, 2.0, 3.0
Work Versions 0.1, 1.1, 1.2, 2.1, 3.1, 3.2
Only the highest object version is the active version, regardless of whether it is a work version or a release version. Only this version is used by other objects.
The version number increments automatically. A manual assignment of version numbers is not possible.
180
Create a new work version from a release version
It is not possible to directly create a new release version. To save changes to a release version, you must first create a new work version.
To create a new work version from a release version, complete the following steps.
1. Open the object.
2. Make the required modifications.
3. On the Quick Access Toolbar, click the Create New Version button.
4. Optional. In the Create New Version dialog box, in the Label box, type a label.
5. Click OK.
Example
You have edited the version 2.0 of an object. The object now receives the version number 2.1.
181
Create a new work version from a work version
To create a new work version from a work version, complete the following steps.
1. Open the object.
2. Make the required changes.
3. On the Quick Access Toolbar, click the Create New Version button.
4. In the Create New Version dialog box, select Work Version.
5. Optional. In the Label box, type a label.
6. Click OK.
Example
You have edited the version 2.1 of an object. The object now receives the version number 2.2.
Note You cannot transfer this version to another system.
Create a new release version from a work version
Prerequisites
You must possess the Create Release Version right.
Changes to the object were saved in a valid way.
To create a new release version from a work version, complete the following steps.
1. Open the object.
2. Make the required changes.
3. On the Quick Access Toolbar, click the Create New Version button.
4. Optional. In the Create New Version dialog box, in the Label box, type a label.
5. In the Create New Version dialog box, select Release Version.
6. Click OK.
Example
You have edited the version 2.2 of an object. The object now receives version number 3.0.
Note You can transfer this version to another system.
182
Modify a work version without creating a new version
To modify a work version without creating a new version, complete the following steps.
1. Open the object.
2. Make the required changes.
3. On the Quick Access Toolbar, click the Save button.
Example
You have edited the work version 2.1 of an object. After saving, the version number remains 2.1.
Show the object history
To display the history of an object, complete the following steps.
1. In the Navigator, right-click the object and click Show Object History.
2. Optional. To open an object version, in the Object History dialog box, select a version from the list and click the Show Object button.
Note You cannot generate or execute older versions of document templates, bundles and processes.
Reactivate an older version
Reactivating an object version is only available for editable objects. You cannot reactivate write-protected objects.
To reactivate an older version of an object, complete the following steps.
1. In the bottom pane of the Navigator, right-click the object and click Show Object History.
2. In the Object History dialog box, select an entry from the list and click the Show
Object
button.
3. On the Quick Access Toolbar, click the Reactivate Version button.
Note This function creates a copy of the version opened as a new work version. For example, an object has the newest version 2.2. You have opened and reactivated the version 1.1 of the object. A new work version with the number 2.3 is created as a copy of version 1.1.
Transfer versioned objects to other systems
For more information, refer to Transfer Jobs.
183
Start Parameter
Composition Studio can be started with specific parameters to control initial launch behavior.
Start parameters have the following structure:
/parametername:Paramvalue
If the Paramvalue contains a space, the parameter must be surrounded by quotation marks.
The following parameter are supported:
Parameter Meaning
startsystem System OID of the system to be automatically loaded after program launch.
If the parameter is not set, Composition Studio starts with the last system used.
Example
/startsystem:MySystemOId navipath This element defines which folder will be selected in the Navigator.
If no start system is set, the parameter refers to the last system used.
The name of the system must not be included in the path.
Example
/navipath:/Test credentials
Input User name and password must be specified.
Silent
SilentUI
User name and password must be specified once.
If the login option Save Password is activated, the data specified is used for future logins.
This parameter is required if you need to reset a Silent password. The login dialog is displayed again.
Windows
The login uses the Windows user name and password.
This setting is also used when the parameter credentials is not specified.
Example
/credentials:Silent
184
P D C S t u d i o P r o d u c t G u i d e
User attributes StudioStartSystemOId and StudioStartFolder
By specifying the a system object ID in the user attribute StudioStartSystemOId you can define a specific start system. This works in a similar fashion to setting the start system in the start parameters.
By specifying the name of a folder in the user attribute StudioStartFolder you can define a start folder.
Unlike the start parameter navipath, the value here is not the path to the folder but the folder name itself.
This attribute, therefore, only has effect on setting a start folder when the MwsChangeFolder privilege is missing.
Values set in the start parameters have priority over those specified in user attributes.
If the start parameters specify a start system, that system is preset on program launch.
If the start parameter is not set, the program checks whether the user attribute
StudioStartSystemOId is set and then applies the value on program launch.
If neither options are defined, the last system used is set at program launch.
If the start parameter navipath is set, the following checks are made:
If the user has the Change Folder (7) right, the Navigator switches to the folder.
If the folder is not found, the Navigator switches to the system root folder.
If the user does not have the Change Folder (7) right, the system root folder becomes the default folder for the user.
If the specified folder is not found in the system, a warning is displayed and the Navigator flushed.
Users can change to another system if they have the Change System right.
But this is only possible if the target system has a folder of the same name.
If the start parameter navipath is not set, the following checks are made:
If the user attribute StudioStartFolder is set and the user has the Change Folder (7) right, no further action is taken.
If the user does not have the Change Folder (7) right, the system root folder becomes the default folder for the user.
If the specified folder is not found in the system, a warning is displayed and the Navigator flushed. Users can change to another system if they have the Change System right.
But this is only possible if the target system has a folder of the same name.
Page 185 of 652
P D C S t u d i o P r o d u c t G u i d e
Index
1-n Files............................................................ 82
Actions ...................................................... 91, 103
Activate Data Objects ..................................... 158
AddAttachment ......................................... 324, 51
AddBatchPrintJob ............................................ 87
AddBodyHtmlImage ................................. 324, 51
AddBookmark .................................332, 379, 119
AddComment ................................................. 379
AddDataRecord .............................................. 179
AddDocument .................................................. 58
AddDocumentByName ................................... 421
AddDocumentByObjectId ............................... 423
AddDocumentCopyByName .......................... 424
AddDocumentCopyByObjectID ...................... 425
AddDocumentPage ........................................ 279
AddFile ............................................................. 59
AddItem .......................................................... 292
Additional stack type ........................................ 40
AddPJLCommand .......................................... 379
AddToHeader ........................................... 324, 51 alias table ....................................................... 443
All Documents ................................................ 107
Append ................................................... 128, 206
AppendDocument .......................................... 372
AppendVJob ................................................... 357
Apply Text Block .............................................. 70
Apply Text Block and ....................................... 70
ApplyDataRecord ........................................... 179
ApplyDataSet ................................................. 179
ArchiveJob........................................................ 27
Areas .................................................................. 7
Areas of a ........................................................... 7
Assign .................................. 34, 69, 86, 101, 116
Scripts ........................................................ 116
AssignData ............................................... 294, 18
Attribute Inheritance ......................................... 77
Attributes ................................................ 160, 165
Rules .......................................................... 165
Base64 coded images ..................................... 61
BatchJobCount ................................................ 87
Beep ............................................................... 128
BigInteger ....................................................... 128
Bof .................................................................. 128 bundle ............................................ 100, 101, 107 all Documents in ......................................... 107 creating ....................................................... 100 dynamic bundle .......................................... 105 forward a bundle......................................... 101
CalcEnvelopePages ...................................... 357
CalcEnvelopePapers ..................................... 358
CalcEnvelopePostage ................................... 358
CalcEnvelopeWeight ..................................... 358
Calling ............................................................ 260
WebServices .............................................. 260
CallMethod ..................................................... 250
CallSystem ..................................................... 128
Cancel ............................................................ 134
Change a ........................................................... 3
ChangeExtension........................................... 188
Changes ............................................................. 3
Character Set ................................................... 20
Charts .............................................................. 65
Check ................................................................. 7
CheckEvery .................................................... 123
CheckFirst ...................................................... 123
Child Text Block ............................................... 69
ClearAttachments .................................... 325, 51
Page 186 of 652
P D C S t u d i o P r o d u c t G u i d e
ClearBodyHtmlImages ............................. 325, 52
ClearCache .................................................... 236
ClearCertificates ....................................... 325, 52
ClearItems ...................................................... 292
Close ..............................................129, 211, 231
CloseDatabase ............................................... 130
CloseSQL ....................................................... 130
Code Completion ........................................... 114
Combine ......................................................... 188
Comments .................................................. 116, 8
Commit ...........................................130, 178, 359
Conditions ......................... 112, 116, 118, 8, 142
Create ......................................................... 112
Properties ................................................... 142
Configuration .................................................. 277
Connect .......................................................... 279
Connect Process Blocks .................................... 9
Connection Settings ......................................... 29
Contains ......................................................... 130
Contains_Exactly ........................................... 131
Content Control .......................................... 73, 90
Content Control EmptyLine .............................. 73
Context Information ........................................ 115
Context Menu ................................................... 17
Context ModusBatch ...................................... 294
Context MwsProcess ..................................... 296
Context OdinArchive ...................................... 300
Context OdinConvert ...................................... 304
Context OdinCustomProcess ......................... 310
Context OdinDbTask ...................................... 314
Context OdinEmail ......................................... 318
Context OdinEmailConvert............................. 329
Context OdinPrint ........................................... 367
Context OdinRendition ................................... 370
Context OdinStream ....................................... 372
Context OdinStreamPrint ............................... 400
Context OnError ............................................. 405
Context OnNavigateObject ............................ 406
Context OnProcessError ................................ 408
Context Process ............................................. 410
Context ProcessTimer ................................... 412
Context SelectionQueryScript ........................ 414
Context TextComponent ................................ 415
Context TextDocument .................................. 418
Context TextDocumentCollection .................. 420
Context TextDocumentReference ................. 428
Context TextVariable ..................................... 432 control structures ........................................... 123
ConvertDocToDocX ......................................... 83
ConvertDocument ............................................ 36
ConvertSingleFile............................................. 69
ConvertXDocToHtml ........................................ 72
ConvertXDocToString ...................................... 72
ConvertXDocToText ........................................ 72
ConvertXDocToXps ......................................... 77
CopyFile ......................................................... 188
CopyLabel ........................................................ 90
CopySection ................................................... 231
Count ..................................................... 131, 359
Create ....... 29, 33, 34, 41, 42, 43, 44, 85, 90, 93,
100, 112, 211, 229, 248, 446, 447, 2, 4, 140,
145, 147, 151, 158, 162, 168, 169, 170, 172,
173, 181
Bundle ........................................................ 100
Condition .................................................... 112
Empty ......................................................... 151
Enclosure ................................................... 169
Envelope .................................................... 168
Outsourcing Printer .................................... 173
Process .................................................. 248, 4
Profile ........................................................... 41
Role ........................................................ 42, 43
Page 187 of 652
P D C S t u d i o P r o d u c t G u i d e
Script ........................................................... 112
Selection ..................................................... 158
XSD Selection ............................................ 162
Create a Bundle ............................................. 100
Create a Condition ......................................... 112
Create a Process ....................................... 248, 4
Create a Profile ................................................ 41
Create a Role ............................................. 42, 43
Create a Role Mapping .................................... 43
Create a Script ............................................... 112
Create a Selection .......................................... 158
Create an Enclosure ...................................... 169
Create an Envelope ....................................... 168
Create an Outsourcing Printer ....................... 173
Create an XSD Selection ............................... 162
Create Data Objects ....................................... 145
Create Empty Data Objects ........................... 151
Create Query Definitions ................................ 140
Create Reading Scripts .................................. 147
Create XSD Selections .................................. 162
CreateDirectory .............................................. 189
CreateDocuments ............................................ 18
CreateEnv ...................................................... 359
CreateGuid ..................................................... 131
CreatePdfSigner ............................................... 59
CreatePool ..................................................... 132
CreateRenditionForProcess ........................... 101
CreateRenditionForSelectedProcess ............. 102
CreateTextFile ................................................ 188
Creating an alias table .............................................. 443
CurrentDate .................................................... 184
CurrentDateToString ...................................... 184
CurrentPrinter ................................................... 87
Data .... 69, 79, 86, 101, 111, 122, 145, 146, 151,
152, 154, 160, 163
Data Links ...................................................... 111
Data Model ......................................... 69, 86, 101
Data Object Properties .................................. 152
Data Object Variable Properties .................... 154 data objects .... 145, 146, 151, 152, 154, 160, 163
Missing ....................................................... 160
Data Objects or Attributes .............................. 160
Data Types ..................................................... 122
Database access ........................................... 176
DataSelectionManager .................................... 15
DataSelectionManager Properties ................... 15
DateStringToInt64 .......................................... 185
DayOfWeek .................................................... 185
DaysInMonth .................................................. 185
DB Alias ..................................................... 29, 30
DB Alias Administration ................................... 29
Debug ............................................................ 159
Selection ..................................................... 159
Debug a Selection.......................................... 159
Decimal .......................................................... 132
Define ................................................... 35, 50, 71
Define a ................................................ 35, 71, 75
DefineContainer ............................................. 179
DefinePostageDefinitionByName .................. 352
DefinePostageDefinitionByOId ...................... 352
DefinePrinterByName .................... 352, 430, 126
DefinePrinterByOId ........................ 353, 430, 126
DefinePrinterForBundleByName ..................... 18
DefineWebProxy ............................................ 250
Defining ................................................ 35, 50, 75
Variable Rules .............................................. 50
Delete ......................................... 16, 30, 132, 151
Delete a ............................................................ 30
Delete Datasets ............................................. 151
Deleted Objects ............................................... 16
Page 188 of 652
P D C S t u d i o P r o d u c t G u i d e
DeleteDirectory ...................................... 189, 294
DeleteFile ....................................................... 189
DeleteFiles ..................................................... 189
DeleteFinishedProcesses ................................ 25
DeleteKey ....................................................... 231
DeletePool ...................................................... 133
DeleteProcessRecords .................................... 48
DeleteStack ...................................................... 47
DirectoryExists ............................................... 190
Doc_GetFile_Mime ........................................ 236
Doc_SetFile_Mime ......................................... 236
Document Copies ........................................... 100
Document Preview ........................................... 88
Document Report ............................................. 91
DocumentCollectionManager ........................... 18
DocumentCollectionManager Properties ......... 18
Documents ............ 88, 89, 91, 93, 100, 107, 109
DoWork ............................................................ 23
Drop-down ...................................................... 450
Dynamic Bundles ........................................... 105
Dynamic Document .......................................... 85
Dynamic value helps ...................................... 452
Edit .......................................... 35, 146, 151, 155
Edit Data Objects ........................................... 146
Edit Database Connections.............................. 35
Edit Database Connections and Systems ........ 35
Edit Selection Interface .................................. 155
Editor Tool Functions ................................. 85, 94
Editor Tools ........................................ 85, 94, 114
Editor Window .................................................... 9
EditPage ......................................................... 332
Email Printer ................................................... 172
Enclosure ....................................................... 169
Enclosures...................................................... 169
End .......................... 27, 36, 41, 77, 88, 119, 126
EndDocConvert ................................................ 83
EndsWith ........................................................ 133
EndTimer ....................................................... 359
EnumEnvelopes ............................................. 353
Envelope ........................................................ 168
Envelopes ...................................................... 168
Eof .......................................... 133, 180, 216, 359
EraseSection .................................................. 232
Example Login ............................................... 257
Example script ............................................... 176
Examples ............................... 243, 257, 260, 406
Execute .......................................... 134, 151, 159
Execute a ............................................... 151, 159
Execute a Selection ....................................... 159
ExecuteBatchPrint ........................................... 88
ExecuteQuery ................................................ 180
ExecuteSynchron ........................................... 190
ExecuteTransfer ............................................. 131
Export ................................................... 30, 447, 3
Export a ........................................................ 30, 3
Export Objects ............................................... 447
Extend the ........................................................ 39
File ................................................................... 81
FileAppendText .............................................. 190
FileExists ................................................ 195, 135
FileExistsEx ................................................... 135
FileReadAllText .............................................. 195
FileSize .......................................................... 200
Filter Script Demo .......................................... 356
Filtering Object Names .................................... 11
Find ................................................................ 134
FindValue ....................................................... 134
FinishWork ....................................................... 23
First ................................................ 136, 180, 360
Float ............................................................... 136
Page 189 of 652
P D C S t u d i o P r o d u c t G u i d e
Flush ............................................................... 216
Format ............................................................ 137
FormatDateTimeString ................................... 186
FormatStr ....................................................... 137
Forms ............................................................. 171
Forward .......................................................... 101
Forward a Bundle ........................................... 101
FreeObject...................................................... 138
From modus 4 ................................................ 121
Gen_Stack...................................................... 353
General . 39, 51, 80, 96, 108, 178, 184, 188, 225,
231, 236, 249, 270, 294, 296, 300, 304, 310,
314, 318, 352, 357, 370, 372, 378, 410, 412,
415, 420, 428, 432, 445, 15, 23, 25, 26, 32,
40, 47, 50, 58, 85, 86, 97, 100, 103, 125, 131,
134, 137, 179
General Information . 96, 178, 23, 25, 26, 32, 40,
47, 50, 58, 85, 86, 97, 100, 103, 125, 134,
137, 179
General Variable Properties ............................. 51
GetActivityStatus ............................................ 297
GetArrayLength .............................................. 251
GetAttachments ....................................... 325, 52
GetAttribute ............................................ 225, 270
GetAttributeOfNode ........................................ 225
GetBlobField .................................................. 138
GetCommandLine .......................................... 200
GetCommandLineArgByName ...................... 200
GetCommandLineArgs ................................... 201
GetConnection ............................................... 138
GetCurrentDirectory ....................................... 201
GetCurrentStackRow ....................... 27, 120, 127
GetCurrentUser .............................................. 270
GetData ............................................ 294, 15, 137
GetDataExtended ..................................... 15, 137
GetDataReferenceEnumerator ........................ 19
GetDeliveryNotificationOptions ........................ 52
GetDirectories ................................................ 201
GetDirectoryName ......................................... 201
GetDirectoryRoot ........................................... 202
GetDocumentEnumerator ........................ 37, 128
GetDocumentFileName ................................. 400
GetDuplex ...................................................... 400
GetEnvelopeEnumerator ......................... 28, 121
GetEnvironmentVariable ................................ 202
GetExtension ................................................. 202
GetField ......................................... 139, 180, 360
GetFieldNameEnumerator ............................. 370
GetFileName .......................................... 202, 400
GetFileNameWithoutExtension ...................... 202
GetFiles .......................................................... 203
GetFileSystemEntries .................................... 203
GetFirstInputBin ............................................. 400
GetForwardInformation .................................. 298
GetFullPath .................................................... 203
GetId .............................................................. 400
GetInputBin .................................................... 333
GetJobAttribute .............................................. 135
GetJobEnumerator......................................... 121
GetList ............................................................ 237
GetLogicalDrives............................................ 204
GetLookupValue ............................................ 139
GetMailEnumerator .......................................... 90
GetMailJobEnumerator .................................... 91
GetMailPriority ................................................. 52
GetManualVariables ........................................ 19
GetNamespaceManager ................................ 225
GetNextInputBin ............................................. 400
GetNextStack ....................... 29, 43, 89, 122, 128
GetNextTransfer ............................................ 131
GetObject ....................................................... 140
GetObjectFromArray ...................................... 251
Page 190 of 652
P D C S t u d i o P r o d u c t G u i d e
GetObjectSelectionParameters ..................... 298
GetObjectStringFromArray ............................. 251
GetOptions ..................................................... 298
GetPageCount ............................................... 400
GetParam ....................................................... 354
GetParentDirectory ........................................ 204
GetPathRoot .................................................. 204
GetPrinterEnumerator ...................................... 90
GetPrintJobEnumerator ................................... 90
GetProperty .................................................... 372
GetPropertyNameByIndex ............................. 252
GetPropertyValueByIndex.............................. 252
GetPropertyValueByIndexAsObject ............... 253
GetPropertyValueByName ............................. 253
GetPropertyValueByNameAsObject .............. 254
GetRandomFileName .................................... 204
GetRefParamNameByIndex........................... 254
GetRefParamValueByIndex ........................... 254
GetRefParamValueByIndexAsObject ............ 255
GetRefParamValueByName .......................... 255
GetRefParamValueByNameAsObject ........... 256
GetSectionNames .......................................... 232
GetSelectionParameters .................................. 20
GetSmtpDeliveryMethod .................................. 53
GetSystemOId ................................................ 140
GetTempFileName ......................................... 204
GetTempPath ................................................. 205
GetUser .......................................................... 270
GetValue ........................................................ 370
GetVariable .................................................... 140
GetXpathValue ............................................... 225
Global Variables ............................................... 95
GotoJobTillWeight .......................................... 360
GotoRecNum ................................................. 360
Groups ...................................................... 90, 103
HasData ......................................................... 302
HasEnvelopes ............................................ 29, 43
HasExtension ................................................. 205
HasObjectPermission .................................... 274
HasPermission ............................................... 270
Hosted Process ................................................ 37
Hyperlink in an ................................................. 61
Identical Archive Attributes ............................ 107
Identical Archive Attributes for ....................... 107
IF-Check ............................................................ 8
If-Condition ..................................................... 124
IF-ELSE-Check .................................................. 8
IfElse-Condition .............................................. 124
Image ................................................. 60, 61, 333
Import ............................................................. 132
Process ...................................................... 132
Import Objects .................................................. 13
Import the Process ......................................... 132
ImportProcessFile ............................................ 98
IncDate ........................................................... 186
Index .............................................................. 140
Inherit Text Block Attributes ............................. 77
Init .................................................................. 360
InitDatabase ................................................... 141
InitDataset ...................................................... 141
InitializeBatchPrint ........................................... 91
Input Mask ............................................... 49, 449
Insert ........................ 46, 60, 69, 73, 85, 141, 149
Insert a ................................................. 46, 69, 85
Insert an ..................................................... 60, 73
Insert an EmptyLine ......................................... 73
Insert Child Objects........................................ 149
Insert Text Block Variables .............................. 46
InsertVJob ...................................................... 361
Inspecting ....................................................... 120
Page 191 of 652
P D C S t u d i o P r o d u c t G u i d e a 120
Installing ......................................................... 139 a 139
Int64ToDateString .......................................... 186
Integer ............................................................ 141
Interface ................................................. 378, 155
Introduction....... 33, 41, 44, 46, 84, 90, 103, 112,
126, 449, 452, 2, 4, 140, 143, 168
IOdinStreamDocument ................................... 378
IsArrayObject ................................................. 256
IsDuplex ......................................................... 333
IsEmailPrinter ................................................... 91
IsInformationRequested ................................. 299
IsInRole .......................................................... 276
IsLeapYear ..................................................... 187
IsObjectNull .................................................... 257
IsPathRooted ................................................. 205
IsPortrait ................................................. 333, 400
IsPrinterActive .................................................. 92
ItemExists ....................................................... 292
KaXwsDataSelectionManager Properties ...... 137
Last .......................................... 13, 142, 181, 361
Last View .......................................................... 13
Limitations on Calling BAPI Functions ........... 143
Line ................................................................. 334
Load ............................................................... 226
LoadBase64StringFromBinFile ...................... 242
LoadBodyFromFile ................................... 325, 53
LoadByAlias ..................................................... 20
LoadById .......................................................... 20
LoadByName ................................................... 20
LoadCertifacteFromSignedFile ................ 326, 53
LoadCertificateFromCertFile .................... 326, 53
LoadDocument ......................................... 375, 77
LoadEnvelopes .............................................. 375
LoadExternalDocument ......................... 416, 418
LoadJobs ............................................... 375, 376
LoadSelection .................................................. 16
LoadSelectionByName .................................... 16
LoadSelectionByOId ........................................ 16
LoadXml ......................................................... 226
Locked Objects ................................................ 14
Logout ............................................................ 257
Lookup table .................................................. 444
Lookup Tables ............................................... 444
Loop ................................................................... 8
Main Menu ......................................................... 9
Manual Variables ............................................. 51
Max ................................................................ 142
Message ........................................................ 181
Methods ......................................................... 354
Methods GetParam ........................................ 354
Methods GetParam and SetParam................ 354
Migrating ........................................................ 121
Scripts ........................................................ 121
Min ................................................................. 142
Missing ........................................................... 160
Data Objects ............................................... 160
MLPerceptiveArchive ..................................... 279
Properties ................................................... 282
Modify an ....................................................... 148
Modify attributes ............................................. 227
Modus ............................................................ 121
ModusBatchManager Properties ..................... 23
Monitor a .......................................................... 37
Move .............................................................. 143
MoveDirectory ................................................ 205
MoveFile ........................................................ 206
Multiline Textbox ............................................ 451
Multiple insertion of .......................................... 71
Page 192 of 652
P D C S t u d i o P r o d u c t G u i d e
Multiple Text Blocks ......................................... 71
MWS Process
Properties ....................................................... 4
MwsActivityStatus ............................................ 24
MwsAssistantManager Properties ................... 25
N files ............................................................... 82
Navigate ................................ 416, 419, 427, 437
Navigator Window ............................................ 11
New Database Connection ........................ 29, 33
New DB Alias ................................................... 29
New System ..................................................... 34
New Version ................................................... 181
New Word Template .......................................... 2
Next ......................................... 12, 143, 181, 361
Next Page......................................................... 12
NextJob .......................................................... 135
NumberOfFilesConverted ................................ 78
Numeric Input Field ........................................ 451
Obj_GetStructure ........................................... 237
Obj_SetStructure ............................................ 237
Obj_Toggle ..................................................... 238
Object Inspector ............................................... 19
Odin Statuses ................................................... 26
Odin views ........................................................ 21
Odin Views Tab ................................................ 25
OdinArchive Events .......................................... 26
OdinArchive Properties .................................... 26
OdinConvert Events ......................................... 35
OdinConvert Properties .................................... 32
OdinCustomProcess Events ............................ 41
OdinCustomProcess Properties ....................... 40
OdinDbTasks ................................................... 47
Properties ..................................................... 47
OdinEmail Properties ....................................... 50
OdinFileConvert Properties .............................. 58
OdinFilterManager Properties .......................... 85
OdinPrint Events .............................................. 87
OdinPrint Properties......................................... 86
OdinProcessImport Properties ......................... 97
OdinRendition Events .................................... 101
OdinRendition Properties ............................... 100
OdinStream Events ........................................ 115
OdinStream Properties .................................. 107
OdinStreamPrint ............................................ 400
OdinStreamPrint Events ................................ 125
OdinStreamPrint Properties ........................... 125
Older Version ................................................. 183
Online Printer ................................................. 172
Open .......................................... 24, 25, 216, 232
Open Envelopes .............................................. 25
Open Jobs ........................................................ 24
OpenSQL ....................................................... 143
Other Systems ............................................... 183
Output Window ................................................ 19
Outsourcing .................................................... 173
Printer ......................................................... 173
Outsourcing Printer ........................................ 173
Create ......................................................... 173
Overview .............................................. 8, 26, 354
Overview of .............................................. 26, 354
PageCount ..................................................... 338
Parse .............................................................. 143
Ping ........................................................ 238, 138
Popup Calendar ............................................. 450
Position .............................................................. 9
Position and ....................................................... 9
Possible Parameters ...................................... 354
Possible Parameters for the .......................... 354
Post ................................................................ 338
Postage Definitions ........................................ 170
Page 193 of 652
P D C S t u d i o P r o d u c t G u i d e
About .......................................................... 170
PrepareParameter .......................................... 181
PrepareSQL ................................................... 144
Prev ................................................145, 182, 361
Previous Page .................................................. 12
PrintAndArchive ............................................... 20
PrintDocument ............................................... 128
Printer ............................................................. 173
Email ........................................................... 172
Online ......................................................... 172
Outsourcing ................................................ 173
PrintJob ............................................................ 92
Process ......................... 21, 248, 4, 5, 7, 44, 132
Create ..................................................... 248, 4
Import .......................................................... 132
Process Block .................................................... 7
Process Designer Tools ..................................... 5
Process_Close ............................................... 238
Process_Create ............................................. 239
Process_Delete .............................................. 239
Process_Forward ........................................... 239
Process_GetInfo ............................................ 240
Process_GetLastError .................................... 240
Process_Open ............................................... 240
Process_SetData ........................................... 241
Process_Start ................................................. 241
ProcessData ..................................................... 21
ProcessJob....................................................... 44
ProcessJobs ..................................................... 44
Profile ............................................................... 41
About ............................................................ 41
Create ........................................................... 41
Properties 95, 294, 296, 300, 304, 310, 314, 318,
329, 367, 370, 372, 378, 405, 406, 408, 410,
412, 414, 415, 418, 420, 428, 432, 4, 47, 107,
137, 141, 142
Conditions ................................................... 142
MWS Process ................................................. 4
OdinDbTasks ................................................ 47
Query Definition.......................................... 141
Standard Process ........................................... 4 the ..... 294, 296, 300, 304, 310, 314, 318, 329,
367, 370, 372, 378, 405, 406, 408, 410,
412, 414, 415, 418, 420, 428, 432
Variables .................................................... 142
Properties of .... 95, 294, 296, 300, 304, 310, 314,
318, 329, 367, 370, 372, 378, 405, 406, 408,
410, 412, 414, 415, 418, 420, 428, 432, 47,
141
Properties of OdinDbTasks .............................. 47
Properties of the .... 294, 296, 300, 304, 310, 314,
318, 329, 367, 370, 372, 378, 405, 406, 408,
410, 412, 414, 415, 418, 420, 428, 432
Property transfer ........................................ 78, 87
Protocol .......................................................... 146
PutField .......................................................... 146
Query Assistant ................................................ 28
Query Definition ............................................. 140
Properties ................................................... 141
Quick Access Toolbar ...................................... 10
Raise .............................................................. 146
Reactivate ...................................................... 183
Reactivate an ................................................. 183
Read .............................................. 147, 227, 147
ReadBool ....................................................... 232
ReadInteger ................................................... 233
ReadLine ........................................................ 221
ReadNextEnvelope ........................................ 361
ReadSectionToCommatext ............................ 233
ReadString ..................................................... 233
ReadToEnd .................................................... 221
Recnum .......................................................... 362
Record ........................................................... 160
Record and .................................................... 160
Rectangle ....................................................... 338
Page 194 of 652
P D C S t u d i o P r o d u c t G u i d e
Refresh ............................................................. 12
Region ............................................................ 125
RegisterLib ..................................................... 148
Remote Control ................................................ 37
RemoveAttachment .................................. 326, 53
RemoveFromHeader ................................ 326, 54
ReplaceFile .................................................... 206
Replay Data Retrieval .................................... 160
Reports ........................................................... 109
Repository Import ............................................. 31
Requirements ................................................. 249
ReRaise.......................................................... 149
Reset ................................................................ 54
ResetDocuments .............................................. 21
Restore Systems .............................................. 36
Result Columns .............................................. 141
Role ............................................................ 42, 43
Create ..................................................... 42, 43
Role Mapping ................................................... 43
Rollback..........................................149, 179, 362
Round ............................................................. 149
RowCount....................................................... 182
Rules ...................................................... 163, 165
Attributes..................................................... 165
Rules for ................................................. 163, 165
Rules for Attributes ......................................... 165
Run ................................................................... 85
RunFilter ......................................................... 354
Sample Script 176, 227, 229, 248, 277, 327, 356,
363, 376, 17, 21, 25, 30, 38, 45, 49, 56, 81,
82, 83, 85, 93, 98, 102, 123, 129, 132, 138
Sample Script Create ............................. 229, 248
Sample Script DataSelectionManager ............. 17
Sample Script LoadEnvelopes ....................... 376
Sample Script MWSAssistantManager ............ 25
Sample Script OdinArchive .............................. 30
Sample Script OdinConvert ............................. 38
Sample Script OdinCustomProcess ................ 45
Sample Script OdinDbTasks ............................ 49
Sample Script OdinEmail ................................. 56
Sample Script OdinFileConvert ........... 81, 82, 83
Sample Script OdinFilterManager .................... 85
Sample Script OdinPrint .................................. 93
Sample Script OdinProcessImport ................... 98
Sample Script OdinRendition ......................... 102
Sample Script OdinStream ............................ 123
Sample Script OdinStreamPrint ..................... 129
Sample Script Read ....................................... 227
Sample Script Transfer .................................. 132
Sample Script XwsDataSelectionManager .... 138
Save Selection ............................................... 157
Save Selection as .......................................... 157
Schema ...................................................... 157
Save Selection as a Schema ......................... 157
SaveBase64StringToBinFile .......................... 242
Scheduled ................................................ 15, 447
Schema .......................................................... 157
Save Selection as....................................... 157
Script ............ 71, 112, 116, 121, 441, 9, 132, 147
Create ......................................................... 112
Script ExecuteScheduledTransfer ................. 132
Script Execution ................................................. 9
Script Order .................................................... 441
Script Parameters .......................................... 116
Scripts ................ 112, 116, 121, 441, 9, 132, 147
Assigning .................................................... 116
Migrating ..................................................... 121
Scripts and Conditions ................................... 116
Search ............................................................ 149
SearchAndImportProcessFile .......................... 98
Selection ................................ 155, 158, 159, 162
Page 195 of 652
P D C S t u d i o P r o d u c t G u i d e
Create ......................................................... 158
Debug ......................................................... 159
Execute ....................................................... 159
Selection Properties ....................................... 159
SelFirstRecord ............................................... 150
SelNextRecord ............................................... 150
SelRecordCount ............................................. 150
SelRecordNumber .......................................... 150
SelVariable ..................................................... 151
SelVariableEx ................................................. 151
SelVariableXsDateTime ................................. 152
SelVariableXsFloat ......................................... 153
Send ......................................................... 326, 54
Set Bookmarks ............................................... 115
SetAfpCopyGroup .......................................... 394
SetArchiveAttribute ................................ 427, 431
SetAttribute..................................................... 226
SetAttributeOfNode ........................................ 227
SetBackStackState .......................................... 48
SetCredentials .......................................... 327, 54
SetCurrentDirectory ....................................... 206
SetDataContext ...................................... 295, 427
SetDeliveryNotificationOptions......................... 54
SetDuplex ....................................................... 400
SetExecSQL ................................................... 153
SetField .......................................................... 362
SetFirstInputBin .............................................. 400
SetFont ........................................................... 346
SetInputBin ..................................................... 347
SetMailPriority .................................................. 55
SetManualVariables ......................................... 21
SetNextInputBin ............................................. 400
SetObjectSelectionParameters ...................... 299
SetParam ....................................................... 354
SetParameter ................................................. 257
SetPdfSigner .................................................. 332
SetPoolVariable ............................................. 157
SetProperty .................................................... 375
SetSelectionParameters .................................. 21
SetSmtpDeliveryMethod .................................. 55
SetSmtpServer ......................................... 327, 55
SetSQL .......................................................... 157
SetStackError ................................... 38, 122, 129
SetValue ........................................................ 371
Show Filter List ................................................ 13
Show Filter List of Object Types ...................... 13
Show Object History ...................................... 183
Simple Enveloping Filter ................................ 363
Simple Filter ................................................... 356
Simple Filter including .................................... 356
Sleep .............................................................. 157
SOAP Web Service........................................ 120
Special Case .................................................. 107
Split ................................................................ 362
SplitStr ........................................................... 158
SQL Query ..................................................... 148
Stack ................................................ 22, 356, 363
Stack Generation ................................... 356, 363
Stack type, additional ....................................... 40
Standard Process
Properties ....................................................... 4
Standard Processes........................................... 4
Start ................. 29, 38, 44, 78, 92, 122, 129, 184
Start Parameter .............................................. 184
StartDocConvert .............................................. 83
StartProcedure ............................................... 182
StartProcessing .............................................. 136
StartsWith ...................................................... 158
StartTimer ...................................................... 362
StartTransaction ............................. 158, 178, 363
Page 196 of 652
P D C S t u d i o P r o d u c t G u i d e
Static Document ............................................... 93
Static TIFF Documents .................................... 94
Static value helps ........................................... 449
Static Word Documents ................................... 93
Stored Procedure ..................................... 39, 151
Stored Procedure in a .................................... 151
StoredProcedure ............................................ 159
StrCompare .................................................... 159
StrDelChar...................................................... 160
StreamDocument ........................................... 123
StrIndexOf ...................................................... 160
StringListAdd .................................................. 161
StringListClear ................................................ 161
StringListCount ............................................... 162
StringListGetCommaText ............................... 162
StringListGetText ........................................... 162
StringListGetValue ......................................... 162
StringListIndexOf ............................................ 163
StringListItemValues ...................................... 163
StringListLine ................................................. 163
StringListLoad ................................................ 164
StringListParams ............................................ 164
StringListSave ................................................ 164
StringListSetCommaText ............................... 169
StringListSetValue .......................................... 169
StringListSort .................................................. 169
StrLastIndexOf ............................................... 160
StrLeft ............................................................. 170
StrLen ............................................................. 170
StrLower ......................................................... 170
StrPos ............................................................. 170
StrReplace...................................................... 171
StrReverse ..................................................... 171
StrRight .......................................................... 172
StrTok ............................................................. 172
StrToLen ........................................................ 172
StrUpper ......................................................... 173
StrWord .......................................................... 173
StrWordCount ................................................ 173
StudioStartFolder ........................................... 185
SubString ....................................................... 174
Summary Nodes ............................................ 150
System Font ..................................................... 20
System Synchronization .................................. 32
Systems ......................................... 20, 32, 35, 36
Terminate ....................................................... 136
Test Bundles .................................................. 106
Test Documents ............................................... 87
Test Scripts .................................................... 118
Test Scripts and Conditions ........................... 118
Test Sets ........................................................ 159
Text Block .................. 44, 46, 71, 75, 79, 85, 109
Text block report .............................................. 79
Text block using ............................................... 71
Text Blocks in Documents ............................. 109
TextOut .......................................................... 347
The .. 73, 294, 296, 300, 304, 310, 314, 318, 329,
354, 367, 370, 372, 378, 405, 406, 408, 410,
412, 414, 415, 418, 420, 428, 432, 155
Possible Parameters .................................. 354
Properties .. 294, 296, 300, 304, 310, 314, 318,
329, 367, 370, 372, 378, 405, 406, 408,
410, 412, 414, 415, 418, 420, 428, 432
Toolbox ............................................................ 19
Transfer History ............................................... 15
Transfer Job ........................................... 446, 447
Transfer Properties ............................ 78, 87, 107
Transfer System ............................................... 35
Transfer Versioned Objects ........................... 183
Transfer Versioned Objects to ....................... 183
Transferring ...................................................... 15
Page 197 of 652
P D C S t u d i o P r o d u c t G u i d e
Transfers .......................................................... 15
Trim ................................................................ 174
TrimEnd .......................................................... 174
TrimStart......................................................... 174
Trunc .............................................................. 175
TryFinally ........................................................ 126
TryOnError ..................................................... 126
TryOnErrorFinally ........................................... 126
Universal Timer .................................................. 9
UnRegisterLib ................................................ 175
Update ............................................175, 152, 158
Update Data Objects .............................. 152, 158
Used data links ................................................. 79
User Attributes StudioStartSystemOId ........... 185
User Attributes StudioStartSystemOId and
StudioStartFolder ........................................ 185
Value helps .................................................... 449
Variable Objects ......................................... 75, 89
Variable Pools .................................................. 73
Variable Properties ........................................... 70
Variable Rules .................................................. 50
Defining......................................................... 50
Variables ....... 46, 50, 60, 61, 70, 73, 75, 89, 142 global ............................................................ 95
Properties ................................................... 142
VerifyPool ....................................................... 176
Version ................................................... 176, 180
Version Types ................................................ 180
Virtual database tables ................................... 103
WebServices .................................................. 260
Calling ........................................................ 260
WeekOfYear .................................................. 187
While-Loops ................................................... 124
Windows Service ........................................... 139
Word Template ............................................ 34, 3
Word User Interface ....................................... 453
Work Versions .................................................. 14
WorkWithQuery .............................................. 182
Write ............................................................... 221
WriteBool ....................................................... 234
WriteFormat ................................................... 221
WriteInteger ................................................... 234
WriteLine ........................................................ 221
WriteLineFormat ............................................ 222
WriteSectionFromCommatext ........................ 234
WriteString ..................................................... 235
WriteXml .......................................................... 17
Xdata Editor Tools ......................................... 150
XDoc ................................................................ 83
XPS .............................................................. 83
XML file .......................................................... 229
XmlProcessingManager Properties ............... 134
XPS ............................................................ 25, 83 xDoc ............................................................. 83
XPS Viewer ...................................................... 25
XSD Selection ................................................ 162
Create ......................................................... 162
XwsDataSelectionManager Properties .......... 137
Page 198 of 652
Download
Advertisement
Key features
Dynamic document creation
Static document creation
Document management
Customizable document templates
Integration with other applications
Frequently asked questions
Perceptive Document Composition Studio is a software application that allows you to create and manage documents. It is used to create both dynamic and static documents and offers a variety of features for customizing documents to meet your specific needs.
Some of the key features of Perceptive Document Composition Studio include dynamic document creation, static document creation, document management, customizable document templates, and integration with other applications.
Perceptive Document Composition Studio allows you to create dynamic documents by using text blocks and variables. Text blocks are blocks of text that can be reused in multiple documents. Variables can be used to insert data into documents. When you create a dynamic document, the Studio will combine the text blocks and variables to create a unique document.