KitchenDraw SDK 2
Show / Hide Table of Contents

Method ExportCatalogImage

ExportCatalogImage(string, string, HandingType, bool, ViewMode, string, int, int, string, bool, int, int)

Exports an image of given catalog item.

Declaration
public void ExportCatalogImage(string catalogFilename, string articleReference, Scene.Object.HandingType handingType, bool opened, Scene.ViewMode viewMode, string imageFilename, int imageWidth, int imageHeight, string backgroundColor = "255,255,255", bool transparent = true, int jpegQuality = 80, int antialiasing = 1)
Parameters
Type Name Description
string catalogFilename

Filename of the catalog which contains the item.

string articleReference

The article reference of the item.

Scene.Object.HandingType handingType

Handing of the item.

bool opened

Indicates whether the item should be exported in its open visual state.

Scene.ViewMode viewMode

Specifies which view mode to use for the image generation.

string imageFilename

Filename of the file to create. The image format is determined from the filename extension.

int imageWidth
int imageHeight
string backgroundColor
bool transparent
int jpegQuality
int antialiasing
Remarks

See ExportImage(string, int, int, bool, string, int, int) for details on the rest of parameters.

The catalog item adopts the generic finishes corresponding to the presentation scene associated with the catalog.

Examples
var filename = System.IO.Path.ChangeExtension(
    System.IO.Path.GetTempFileName(),
    ".svg" /* InSitu determines the image format from extension so you can't leave default .tmp here */
);

appli.ExportCatalogImage(
    "@K2",
    "B41P30",
    Scene.Object.HandingType.None,
    opened: false,
    viewMode: Scene.ViewMode.Top,
    imageFilename: filename,
    imageWidth: 1024,
    imageHeight: 1024);

Console.WriteLine(filename);
System.Diagnostics.Process.Start(filename);
// usually you'll want to delete file after.
In this article
Back to top Generated by DocFX