You can use key-ins to compose, customize, and submit print set files to a printer. You can:
- Use key-ins in MDL applications.
- Use key-ins from the key-in window.
From the key-in window, you can use a one-step key-in, or you can use combined key-ins to compose, customize, and submit a print set file to a printer. Additionally, you can store key-ins in a text file or script file and run them from the key-in window. In Example 1, the script file creates a new instance of Print Organizer, composes a print set file containing three DGN files, and creates a single PDF document from the printed output.
Example 1
mdl load bentley.printorganizer.dll
PRINTORGANIZER DIALOG
PRINTORGANIZER NEW
PRINTORGANIZER PRINTERDRIVER pdf.pltcfg
PRINTORGANIZER ADD FILE c:\cadfiles\model1.dgn
PRINTORGANIZER ADD FILE c:\cadfiles\model2.dgn
PRINTORGANIZER ADD FILE c:\cadfiles\model3.dgn
PRINTORGANIZER SUBMITAS SINGLE
PRINTORGANIZER PRINT ALL
PRINTORGANIZER EXIT
Print Organizer can be configured to create two types of print definitions: Fixed print definitions and Variable print definitions. Regardless of how Print Organizer is configured, you can override the print definition type in a script file. The script file in Example 2 configures Print Organizer to create variable print definitions. Print Organizer requires the use of a print style when creating variable print definitions, so the script in Example 2 applies a print style named "sheets" when creating the print set.
Note: This script also uses the
"expand set" key-in to define a configuration variable and set its value. If MS_PLT_ENABLE_VARIABLE_DEFINITION_MODE is set to 1, Print Organizer creates variable print definitions. A configuration variable defined using
Expand Set remains defined only for the remainder of the current session.
Example 2
expand set MS_PLT_ENABLE_VARIABLE_DEFINITION_MODE = 1
mdl load bentley.printorganizer.dll
PRINTORGANIZER DIALOG
PRINTORGANIZER NEW
PRINTORGANIZER ADD FILE c:\cadfiles\model1.dgn sheets
PRINTORGANIZER ADD FILE c:\cadfiles\model2.dgn sheets
PRINTORGANIZER ADD FILE c:\cadfiles\model3.dgn sheets
PRINTORGANIZER SAVEAS c:\cadfiles\variableset.pset
PRINTORGANIZER EXIT
Before you can use a Print Organizer key-in, you must either open Print Organizer (), or type in "mdl load bentley.printorganizer.dll" from the Key-in window to open an instance of Print Organizer.
The following Print Organizer key-ins are supported:
Key-in:
PRINTORGANIZER
ACTIVEFOLDER
<
folder_name
>
- Makes the specified folder the active folder.
Key-in:
PRINTORGANIZER
ADD
ACTIVEFILE
<
printstyle_name
>
- Creates a print definition from the active design file and adds it to the active folder. If you are creating a variable print definition, the <printstyle_name> argument is required.
Key-in:
PRINTORGANIZER
ADD
FILE
<
filename
>
[
printstyle_name
]
- Creates a print definition from the specified filename and adds it to the active folder.
Key-in:
PRINTORGANIZER
ADD
FOLDER
<
folder_name
>
- Adds a folder to the active folder.
Key-in:
PRINTORGANIZER
ADD
MODEL
<
filename
|
model_name
>
[
printstyle_name
]
- Creates a print definition from the specified filename and model name and adds it to the active folder.
Key-in:
PRINTORGANIZER
APPLYPRINTSTYLE
[
ALL
|
SELECTION
]
<
printstyle_name
>
- Applies a print style to all print definitions or to those in the selection set.
Key-in:
PRINTORGANIZER
CLEARSELECTION
- Clears the selection set.
Key-in:
PRINTORGANIZER
DELETE
[
ALL
|
SELECTION
]
- Deletes all the items in the print set or those in the selection set.
Key-in:
PRINTORGANIZER
DIALOG
- Displays the Print Organizer's main dialog.
Key-in:
PRINTORGANIZER
EXIT
Key-in:
PRINTORGANIZER
EXPORTCSV
<
filename
>
[
PropertyList
]
- Generates a tab-delimited CSV file specified by <filename>. The CSV file begins with a header line describing the schema, followed by row for each print definition. Each row contains values for the specified properties. If [PropertyList] is not defined, the default properties are Name,SourceFile. Unrecognized property names yield empty string values.
Key-in:
PRINTORGANIZER
FINDREPLACE
[
ALL
|
SELECTION
]
<
old_string
|
new_string
>
- Finds and replaces the file paths in all print definitions or those in the selection set.
Key-in:
PRINTORGANIZER
NEW
- Creates a new print set. If the user interface is displayed, it prompts you to save the current print set. If the user interface is not displayed, it clears the current print set without saving it.
Key-in:
PRINTORGANIZER
OPEN
- Opens the specified print set. If the user interface is displayed, it prompts you to save the current print set. If the user interface is not displayed, it clears the current print set without saving it.
Key-in:
PRINTORGANIZER
OPENREADONLY
- Opens the specified print set in read only mode. If the user interface is displayed, it prompts you to save the current print set. If the user interface is not displayed, it clears the current print set without saving it.
Key-in:
PRINTORGANIZER
OUTPUTFILENAME
<
expression_name
>
- Sets the output filename for all print definitions.
Key-in:
PRINTORGANIZER
PREVIEW
[
ALL
|
SELECTION
]
- Previews all print definitions or those in the selection set.
Key-in:
PRINTORGANIZER
PRINT
[
ALL
|
SELECTION
]
- Prints all print definitions or those in the selection set.
Key-in:
PRINTORGANIZER
PRINTCOPIES
<
copies
>
- Sets the number of copies.
Key-in:
PRINTORGANIZER
PRINTDESTINATION
<
destination
>
- Sets the print destination (filename, folder, UNC share name).
Key-in:
PRINTORGANIZER
PRINTERDRIVER
<
printer driver configuration filename
>
- Sets the printer driver configuration file.
Key-in:
PRINTORGANIZER
PRINTERNAME
<
name
>
- Sets the Windows printer name.
Key-in:
PRINTORGANIZER
PRINTSTYLE
DIALOG
- Displays the Print Styles dialog.
Key-in:
PRINTORGANIZER
PRINTSTYLE
EXPORTXMLFILE
<
filename
>
- Exports the list of print styles to an XML file.
Key-in:
PRINTORGANIZER
PRINTSTYLE
IMPORTXMLFILE
<
filename
>
- Imports the list of print styles that are stored in a file.
Key-in:
PRINTORGANIZER
PRINTSTYLE
PAPERSIZEPRINTER
<
*.pltcfg filename
>
[
windows_printer_name>]
]
- Specifies the printer that the print style editor will use to get its list of paper sizes. If the required argument is printer.pltcfg or interplot.pltcfg, then the optional argument is the name of the Windows printer name.
Key-in:
PRINTORGANIZER
PRINTTO
[
DEVICE
|
FILE
|
IPSERVER
|
METAFILE
]
Key-in:
PRINTORGANIZER
RENAMEPRINTDEF
[
ALL
|
SELECTION
]
<
expression_name
>
- Renames all print definitions or those in the selection set.
Key-in:
PRINTORGANIZER
PROPERTYFILTER
- Displays the PDF Property Filter dialog.
Key-in:
PRINTORGANIZER
ROOTFOLDER
- Makes the root folder the active folder.
Key-in:
PRINTORGANIZER
SAVEAS
[
printset_filename
]
- Saves the current print set to the specified folder.
Key-in:
PRINTORGANIZER
SELECT
EXACTNAME
<
name
>
- Selects a print definition whose name exactly matches the specified name.
- Performs a String.Compare between the print definition name and the specified name. This is different from the SELECT NAME key-in which does a RegEx.IsMatch between the names, which could result in partial matches being found. e.g., Print definition names: Foo and Foobar. SELECT NAME Foo selects Foo and Foobar. SELECT EXACTNAME Foo selects Foo.
Key-in:
PRINTORGANIZER
SELECT
INDEX
<
index
>
- Selects a print definition by the specified index within the currently selected folder. Indices start from 0.
Key-in:
PRINTORGANIZER
SELECT
NAME
<
name
>
- Selects an item by the specified name within the active folder.
Key-in:
PRINTORGANIZER
SETPRINTDEFNAME
<
string
>
- Sets the name of the selected print definition to the specified string.
Key-in:
PRINTORGANIZER
SUBMITAS
[
SEPARATE
|
SINGLE
]
- Specifies how the print is to be submitted.