KitchenDraw SDK 2
Show / Hide Table of Contents

Method ExportResource

ExportResource(int, string)

Exports a resource by row rank in the Resource table into a file.

Declaration
public void ExportResource(int resourceRowRank, string filename)
Parameters
Type Name Description
int resourceRowRank

Zero-based rank of the resource row in the catalog's Resources table.

string filename

Filename of the file to create.

Remarks

This method generates a file (normally images but it could be any file) from a resource embedded to a catalog.

Embedded resources are for example the texture files indicated in the "File (JPG or BMP)" column of the Textures table if the corresponding "Embedded" flag is checked in a row.

However, if is possible to embed any kind of files to a catalog (e.g. images, sounds, videos, JavaScript files, etc.) and to extract them with this method as needed.

For example, photos of door and drawer handles could be embedded to a catalog. Then, a plugin could export these photos and show them in some kind of an UI.

In this article
Back to top Generated by DocFX