Skip to content

Interface: IEditorArgumentsOpenPrintJobBuilder ​

Builder methods available after setPrintJob(guid, 'Edit'). Use them to change the loaded print job before it opens in the editor.

Remarks ​

The changes are applied by the editor when it loads the print job: variants and printings are added to (or removed from) the ones it already has. They don't change the open mode.

Example ​

js
window.tronDesigner
  .setPrintJob(printJobGuid, 'Edit')
  .removeProductVariantsFromPrintJob(['10601301', '10601331'])
  .removePrintingFromPrintJob('back', 'GPE01')
  .open({ mode: 'dialog' });

See ​

Open modes

Extended by ​

Methods ​

addPrintingsToPrintJob() ​

ts
addPrintingsToPrintJob(...printings: ArgAddPrinting[]): IEditorArgumentsOpenPrintJobBuilder;

Adds several printings to the existing print job. Printings the print job already has are ignored.

Parameters ​

ParameterTypeDescription
...printingsArgAddPrinting[]The printings, each with at least printPositionCode and printTechnologyCode (see ArgAddPrinting).

Returns ​

IEditorArgumentsOpenPrintJobBuilder


addPrintingToPrintJob() ​

ts
addPrintingToPrintJob(
   printPositionCode: string, 
   printTechnologyCode: string, 
   positionCodeOverride?: string, 
   positionNameOverride?: string, 
   technologyCodeOverride?: string, 
   technologyNameOverride?: string, 
   options?: Partial<Pick<EditorOptions, "showSelectedPrintOptions" | "alwaysShowImageSelect">>, 
   maxColorsOverride?: number, 
   maxWidthOverride?: number, 
   maxHeightOverride?: number, 
   maxDiameterOverride?: number, 
   maxAreaOverride?: number
): IEditorArgumentsOpenPrintJobBuilder;

Adds a printing to the existing print job. If the print job already has it, it is ignored.

Parameters ​

ParameterTypeDescription
printPositionCodestringPrint position code, e.g. 'back'.
printTechnologyCodestringPrint technology code, e.g. 'GPE01'.
positionCodeOverride?stringPrint position code to show instead of the catalog one.
positionNameOverride?stringPrint position name to show instead of the catalog one.
technologyCodeOverride?stringPrint technology code to show instead of the catalog one.
technologyNameOverride?stringPrint technology name to show instead of the catalog one.
options?Partial<Pick<EditorOptions, "showSelectedPrintOptions" | "alwaysShowImageSelect">>Printing-related editor options (see AddPrintingOptions).
maxColorsOverride?numberMaximum number of colors, instead of the catalog value.
maxWidthOverride?numberMaximum print width in mm, instead of the catalog value.
maxHeightOverride?numberMaximum print height in mm, instead of the catalog value.
maxDiameterOverride?numberMaximum print diameter in mm, instead of the catalog value.
maxAreaOverride?numberMaximum print area, instead of the catalog value.

Returns ​

IEditorArgumentsOpenPrintJobBuilder

Example ​

js
window.tronDesigner
  .setPrintJob(printJobGuid, 'Edit')
  .addPrintingToPrintJob('back', 'GPE01')
  .open({ mode: 'dialog' });

addProductVariantsToPrintJob() ​

ts
addProductVariantsToPrintJob(...variants: ArgAddProductVariant[]): IEditorArgumentsOpenPrintJobBuilder;

Adds several product variants to the existing print job. Variants the print job already has get their quantity and display overrides updated.

Parameters ​

ParameterTypeDescription
...variantsArgAddProductVariant[]The variants, each with at least productCode (see ArgAddProductVariant).

Returns ​

IEditorArgumentsOpenPrintJobBuilder


addProductVariantToPrintJob() ​

ts
addProductVariantToPrintJob(
   productCode: string, 
   quantity?: number, 
   codeOverride?: string, 
   nameOverride?: string
): IEditorArgumentsOpenPrintJobBuilder;

Adds a product variant to the existing print job. If the print job already has the variant, its quantity and display overrides are updated.

Parameters ​

ParameterTypeDescription
productCodestringSupplier code of the product variant.
quantity?numberQuantity of the variant.
codeOverride?stringVariant code to show instead of the catalog one.
nameOverride?stringVariant name to show instead of the catalog one.

Returns ​

IEditorArgumentsOpenPrintJobBuilder

Example ​

js
window.tronDesigner
  .setPrintJob(printJobGuid, 'Edit')
  .addProductVariantToPrintJob('10601301', 50)
  .open({ mode: 'dialog' });

removePrintingFromPrintJob() ​

ts
removePrintingFromPrintJob(printPositionCode: string, printTechnologyCode: string): IEditorArgumentsOpenPrintJobBuilder;

Removes a printing from the existing print job.

Parameters ​

ParameterTypeDescription
printPositionCodestringPrint position code of the printing.
printTechnologyCodestringPrint technology code of the printing.

Returns ​

IEditorArgumentsOpenPrintJobBuilder


removePrintingsFromPrintJob() ​

ts
removePrintingsFromPrintJob(removedPrintings: object[]): IEditorArgumentsOpenPrintJobBuilder;

Removes several printings from the existing print job.

Parameters ​

ParameterTypeDescription
removedPrintingsobject[]The print position and technology code pairs of the printings to remove.

Returns ​

IEditorArgumentsOpenPrintJobBuilder


removeProductVariantFromPrintJob() ​

ts
removeProductVariantFromPrintJob(productCode: string): IEditorArgumentsOpenPrintJobBuilder;

Removes a product variant from the existing print job.

Parameters ​

ParameterTypeDescription
productCodestringSupplier code of the product variant.

Returns ​

IEditorArgumentsOpenPrintJobBuilder


removeProductVariantsFromPrintJob() ​

ts
removeProductVariantsFromPrintJob(productCodes: string[]): IEditorArgumentsOpenPrintJobBuilder;

Removes several product variants from the existing print job.

Parameters ​

ParameterTypeDescription
productCodesstring[]Supplier codes of the product variants.

Returns ​

IEditorArgumentsOpenPrintJobBuilder


setDataMode() ​

ts
setDataMode(dataMode: DataMode): this;

Sets the data mode of the editor arguments: what the customer may change in the editor.

Parameters ​

ParameterTypeDescription
dataModeDataMode'Exact', 'Partial' or 'Own' (see DataMode).

Returns ​

this

Remarks ​

Mostly useful for Edit sessions: setPrintJob(guid, 'Edit') sets no data mode, so the editor runs them as Partial (the customer can add and remove printings). Call setDataMode('Exact') to lock the structure of the print job. In Create sessions the product methods set the data mode themselves (the last one wins); call setDataMode after them to override it.

Example ​

js
window.tronDesigner.setPrintJob(printJobGuid, 'Edit').setDataMode('Exact').open({ mode: 'dialog' });

See ​

Data modes


setEditorOptions() ​

ts
setEditorOptions(options: Partial<EditorOptions>): this;

Merges options into editorOptions of the editor arguments.

Parameters ​

ParameterTypeDescription
optionsPartial<EditorOptions>Any subset of EditorOptions; the values you pass overwrite those set before.

Returns ​

this

Remarks ​

The product and printing methods accept the options that belong to them (AddProductOptions, AddPrintingOptions) and call this method; use it for anything else, e.g. showSelectedVariants in Exact mode.

Example ​

js
window.tronDesigner
  .setExactProduct('PFC', undefined, (b) => b.addVariant('10086021'))
  .addExactPrinting('front', 'PAD03')
  .setEditorOptions({ showSelectedVariants: 'All' })
  .open({ mode: 'dialog' });

Properties ​

PropertyTypeDescription
addCustomProperties(customProperties: Record<string, string>) => IEditorArgumentsBuilderAdds or updates several custom properties of the print job. See IEditorArgumentsBuilder.addCustomProperties.
addCustomProperty(key: string, value: string) => IEditorArgumentsBuilderAdds or updates a custom property of the print job. See IEditorArgumentsBuilder.addCustomProperty.
open(options: DesignerOptions) => voidOpens the editor with the print job and the changes collected so far, and resets the builder. See IEditorArgumentsBuilder.open.
setOrderInfo(orderTitle?: string, orderCode?: string, orderItemCode?: string) => IEditorArgumentsBuilderSets the order information of the print job. See IEditorArgumentsBuilder.setOrderInfo.
setPrintJobCustomer(customerIdentity?: string, customerPerson?: string, customerCompany?: string, customerEmail?: string) => IEditorArgumentsBuilderSets the customer details stored with the print job. See IEditorArgumentsBuilder.setPrintJobCustomer.
setPrintJobTitle(title: undefined | string) => IEditorArgumentsBuilderSets the title of the print job. See IEditorArgumentsBuilder.setPrintJobTitle.

Czech Republic – The Country for the FutureFunded by the European Union – NextGenerationEUThe project was implemented within the The Country for the Future programme of the Ministry of Industry and Trade and co-financed by the European Union under NextGenerationEU.Support · Examples

Czech Republic – The Country for the FutureFunded by the European Union – NextGenerationEUThe project was implemented within the The Country for the Future programme of the Ministry of Industry and Trade and co-financed by the European Union under NextGenerationEU.Support · Examples