KitchenDraw SDK 2
Show / Hide Table of Contents

Class Catalog

Provides access to a catalog and its contents in the same way as it does the MobiScript window. Allows reading and writing data in KitchenDraw catalogs programmatically.

Inheritance
object
Catalog
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: KD.SDK2
Assembly: KD.SDK2.dll
Syntax
public class Catalog
Remarks

Thanks to members of this class, it's possible to automatically generate or update whole or part of a catalog from the data present somewhere outside the program (e.g. in the company database). On the other hand, the class makes it possible to read information in the catalogs to present them in another way (e.g. automatically generate paper or online catalogs), or to use them in other applications like configurators.

The basic principles of working with catalogs are simple. First, create a new catalog with the New(string, UnitType, bool) method or load the existing one with the Load(string, string) method. Then, read or write data with other members of the class. Eventually preserve the mofications done, saving the catalog with the Save(string) method, if necessary.

The functions of the catalog class can also apply to the catalog currently open in the MobiScript window, either if that was explicitly specified with the UseMobiscriptCatalog() method, either if the instance of the class is accessed in the catalog-related plugin event.

Properties

Name Description
ActiveRow

Returns an active row of an active table of the catalog.

ActiveTable

Returns the table that is currently selected in the "Entity" combobox of the MobiScript window.

AfterSalesCode

After sales service code of the catalog.

ApplicatControlsTable

ApplicatControls table of the catalog. This is a shortcut to Tables[TableType.ApplicatControls].

ApplicatDataTable

ApplicatData table of the catalog. This is a shortcut to Tables[TableType.ApplicatData].

ApplicatDataTypesTable

ApplicatDataTypes table of the catalog. This is a shortcut to Tables[TableType.ApplicatDataTypes].

ApplicatRulesTable

ApplicatRules table of the catalog. This is a shortcut to Tables[TableType.ApplicatRules].

ApplicatsTable

Applicats table of the catalog. This is a shortcut to Tables[TableType.Applicats].

ArticlesTable

Articles table of the catalog. This is a shortcut to Tables[TableType.Articles].

BaseCatalogFilename

Filename of the catalog's base catalog.

BaseCatalogTime

Last write time of the catalog's base catalog (as it was at the moment when the base catalog contents was embedded inside the catalog).

BlocksTable

Blocks table of the catalog. This is a shortcut to Tables[TableType.Blocks].

Code

Code of the catalog (8 characters maximum, useful for statistics in particular).

ComplementaryCatalogTable

ComplementaryCatalog table of the catalog. This is a shortcut to Tables[TableType.ComplementaryCatalog].

ConstantsTable

Constants table of the catalog. This is a shortcut to Tables[TableType.Constants].

CreationTime

Creation time of the catalog.

Currency

Code of the currency in which purchase and selling prices are defined in the catalog.

CustomInfo

Provides access to the catalogs's custom data area dedicated wholely to the application extensions.

Dico

Provides access to the catalog's translations dictionary.

Entities2dTable

Entities2d table of the catalog. This is a shortcut to Tables[TableType.Entities2d].

Entities3dTable

Entities3d table of the catalog. This is a shortcut to Tables[TableType.Entities3d].

FamiliesTable

Families table of the catalog. This is a shortcut to Tables[TableType.Families].

FamilyFinishTypesTable

FamilyFinishTypes table of the catalog. This is a shortcut to Tables[TableType.FamilyFinishTypes].

FamilyFinishesTable

FamilyFinishes table of the catalog. This is a shortcut to Tables[TableType.FamilyFinishes].

Filename

Filename of the catalog, without path and extension (8 characters maximum).

FilenameWithPath

Filename of the catalog, with complete path and extension.

HasPurchasePrices

Indicates whether the catalog contains purchase prices.

HasSellingPrices

Indicates whether the catalog contains purchase prices.

IsBaseCatalog

Indicates whether the catalog is a base catalog.

IsComplementaryCatalog

Indicates whether the catalog is complementary.

IsLoadedInMobiscriptWindow

Allows to know if the catalog is shown in the Mobiscript Window.

IsModifiedInMobiscriptWindow

Allows to know if the catalog in the Mobiscript Window has unsaved changes.

IsSellingPricesTableEditableWithoutPassword

Indicates whether the selling prices table of the catalog can be accessed (read and write) even without a password.

IsValidFromDateEnabled

Indicates whether the catalog validity start date check is enabled.

IsValidTillDateEnabled

Indicates whether the catalog validity end date check is enabled.

IsVatIncluded

Indicates whether prices in the catalog include VAT.

LanguageCode

Language code of the catalog (also known as working language).

LastSaveTime

Time of the last save of the catalog.

ModelFinishTypesTable

ModelFinishTypes table of the catalog. This is a shortcut to Tables[TableType.ModelFinishTypes].

ModelFinishesTable

ModelFinishes table of the catalog. This is a shortcut to Tables[TableType.ModelFinishes].

ModelHandlesTable

ModelHandles table of the catalog. This is a shortcut to Tables[TableType.ModelHandles].

ModelsTable

Models table of the catalog. This is a shortcut to Tables[TableType.Models].

Name

Name of the catalogue displayed in the KitchenDraw planning window (max 30 characters).

Password

Password protecting the access to the catalog.

PriceConfiguration

Price configuration used in the catalog (e.g. selling prices only, or purchase and selling prices, or purchase prices only).

PricesTable

Prices table of the catalog. This is a shortcut to Tables[TableType.Prices].

Primitives2dTable

Primitives2d table of the catalog. This is a shortcut to Tables[TableType.Primitives2d].

Primitives3dTable

Primitives3d table of the catalog. This is a shortcut to Tables[TableType.Primitives3d].

PurchasePricesTable

PurchasePrices table of the catalog. This is a shortcut to Tables[TableType.PurchasePrices].

ReferencesTable

References table of the catalog. This is a shortcut to Tables[TableType.References].

ResourcesTable

Resources table of the catalog. This is a shortcut to Tables[TableType.Resources].

SectionsTable

/// Sections table of the catalog. This is a shortcut to Tables[TableType.Sections].

SelectedRows

Returns a collection os currently selected rows of an active table of the catalog.

SubType

Subtype of the catalog.

SubTypeRank

Subtype rank of the catalog.

Tables

Tables of the catalog.

TexturesTable

Textures table of the catalog. This is a shortcut to Tables[TableType.Textures].

Type

Type of the catalog.

TypeRank

Type rank of the catalog.

Unit

Measuring unit of the catalog.

ValidFromDate

Catalog validity start date.

ValidTillDate

Catalog validity end date.

VatRate

VAT rate included in the catalog prices, if any is included, 0.0 otherwise.

WebCatalogUrl

An internet address dedicated to represent the catalog's items as a special kind of html page.

WebFinishesUrl

An internet address dedicated to represent the catalog's finishes as a special kind of html page.

Xml

XML data used to extend the catalog format.

Methods

Name Description
ChangePassword(string, string)

Sets new password for the catalog.

ExportArticleImage(int, bool, ViewMode, string, int, int, bool, string, int, int)

Exports thumbnail corresponding to a given article as an image file.

ExportFamilyFinishImage(int, int, int, int, int, string, int, int, int, int)

Exports a sample of a particular family finish texture to an image.

ExportModelFinishImage(int, int, int, int, int, string, int, int, int, int)

Exports a sample of a particular model finish texture to an image.

ExportModelImage(string, string, int, int, int, int)

Exports an image representing a model and its finishes defined by a given finishes config string.

ExportPrices(string, bool)

Generates a file containing the prices of the articles of the current catalog.

ExportResource(int, string)

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

ExportResourceFromName(string, bool)

Exports a resource which has a given filename.

GetInfo(int)

Gets a value from arbitrary datafield specified by the infoType parameter.

GetInfoAsBool(int)

Gets a value from arbitrary datafield specified by the infoType parameter.

GetInfoAsDouble(int)

Gets a value from arbitrary datafield specified by the infoType parameter.

GetInfoAsInt(int)

Gets a value from arbitrary datafield specified by the infoType parameter.

Import3d(string, string, int)

Adds one ore more 3D entities to the catalog from a 3D file. The accepted 3D formars are .3DS, .SKP and .ALK.

ImportPrices(string)

Updates the prices in the current catalog from a file which was initially generated by ExportPrices(string, bool).

ImportResource(string, bool)

Imports a file into the current catalog as a resource.

Load(string, string)

This function loads in memory the catalogue whose file name (including the full access path) is specified in the CatalogFileName parameter.

LoadWithoutTableAccess(string, string)

Loads a catalog into memory but without converting it to the format that MobiScript can understand. This mode is faster but doesn't allow to use the functionality related to the catalog tables.

New(string, UnitType, bool)

Creates a new catalog.

Save(string)

Saves the current catalog in a file.

SetInfo(int, bool)

Writes the value to the arbitrary datafield specified by the infoType parameter.

SetInfo(int, double)

Writes the value to the arbitrary datafield specified by the infoType parameter.

SetInfo(int, int)

Writes the value to the arbitrary datafield specified by the infoType parameter.

SetInfo(int, string)

Writes the value to the arbitrary datafield specified by the infoType parameter.

TryGetFamilyFinishClusterFromFamilyAndType(int, string, out Cluster)

Retrieves a cluster of the "Family finishes" table of the catalog by given model and finish type.

TryGetModelFinishClusterFromModelAndType(int, string, out Cluster)

Retrieves a cluster of the "Model finishes" table of the catalog by given model and finish type.

TryGetModelHandleClusterFromModelAndType(int, string, out Cluster)

Retrieves a cluster of the "Model handles" table of the catalog by given model and finish type.

TryLoad(string, string)

The same as Load(string, string), except of it returns false instead of throwing an exception if catalog load fails.

TryLoadWithoutTableAccess(string, string)

The same as LoadWithoutTableAccess(string, string), except of it returns false instead of throwing an exception if catalog load fails.

TrySetInfo(int, bool)

Writes the value to the arbitrary datafield specified by the infoType parameter.

TrySetInfo(int, double)

Writes the value to the arbitrary datafield specified by the infoType parameter.

TrySetInfo(int, int)

Writes the value to the arbitrary datafield specified by the infoType parameter.

TrySetInfo(int, string)

Writes the value to the arbitrary datafield specified by the infoType parameter.

UnitConvertFrom(UnitType, double)

Converts a value measures in a given unit to the catalog measurement units.

UnitConvertTo(double, UnitType)

Converts a value measured in the catalog units to another unit.

UseLoadedCatalog()

Sets the internal state of the SDK so that all the further called members of the class are applied to the catalog loaded into memory by Load(string, string) or New(string, UnitType, bool) methods (as opposed to calling UseMobiscriptCatalog(), which applies the later member calls to a catalog open interactively in MobiScript window).

UseMobiscriptCatalog()

Sets the internal state of the SDK so that all the further called members of the class are applied to the catalog opened interactively in the MobiScript window (as opposed to calling UseLoadedCatalog(), which applies the later member calls to a catalog loaded into memory by Load(string, string) or New(string, UnitType, bool) methods ).

In this article
Back to top Generated by DocFX