Class Appli
Gives access to the application global data: language, menus, catalog files, sites, users, suppliers, plugins.
Inherited Members
Namespace: KD.SDK2
Assembly: KD.SDK2.dll
Syntax
public class Appli
Remarks
Among the members of the Appli class, there are the utilitary functions which are attached neither to the Catalog class, nor to the Scene class like the property LanguageCode which allows to force the current language or the function GetTranslatedText(string) that provides the translation of a character string into the current language (provided it is present in the current catalog).
There are also members to access the information contained in catalogs other than the current catalog(catalogs that are not loaded into memory). These functions require that the catalog file name is passed as a parameter.
There are finally the members dedicated to the management of the entities like the sites, the users, the suppliers, the documents, the plugins.
Constructors
Name | Description |
---|---|
Appli() | Constructs an instance of Appli class. |
Appli(string) | Constructs an instance of Appli class. |
Properties
Name | Description |
---|---|
AccountNumber | Current account number (as it is displayed in the KitchenDraw main window title). |
CallParamsInfo | Information related to a particular plugin function call (e.g. menu item which provoked a plugin call or a supplier for which an order should be generated). |
Catalog | Returns an instance of Catalog class that allows reading and writing data in KitchenDraw catalogs. Do not confuse this property with SelectedCatalog. |
CatalogsDir | Path to the catalogs directory (where the catalog files are located, without trailing slash). |
Currencies | A collection that represents all the currencies configured in the application. |
CurrentUser | Returns the current user of the application. |
DebugMode | Controls the registration of the debug information in the KDSDK.TXT file located in the KitchenDraw installation directory. |
Dico | Returns a Dico object that allows to read and write information into the DICO.LNG dictionary file which is used to translate the KitchenDraw user interface. |
Documents | Collection of the documents (which are more precisely document generation templates) preloaded into memory by call the LoadDocuments(string) method. |
ExeDir | Path to the application root directory (where the application executable file is located, without trailing slash). |
IsSceneAvailable | Indicates whether a scene is available in the application. |
LanguageCode | The current language as displayed in the "Setup|System" KitchenDraw dialog box. |
LogMode | Controls the registration of log information related to the events trigered by KitchenDraw as well as the calls to the SDK functions in the kd.sdk.log file located in the KitchenDraw installation directory. |
MobiscriptWindow | Allows access to data displayed in the MobiScript window. |
ObjectSnapping | Represents the KitchenDraw facility to snap the objects that are placed into the scene to the existing ones. |
Plugins | Collection of plugins loaded in the application. |
Scene | Returns a Scene object that gives access to the scene content (objects, observer and view points, generics, headings,...) and provides methods to interact with them. |
ScenesDir | Path to the scenes directory (where the scene files are located, without trailing slash). |
SelectedCatalog | The catalog which is selected in the KitchenDraw catalog combobox. |
ShowMessages | Indicates whether some warning messages should be displayed. |
Sites | Returns a collection that represents all the registered sites in the KitchenDraw software. |
SpaceIniFilePath | Path to SPACE.INI file that is used by the Appli instance. |
SuppliersOfCurrentSite | A collection that represents all the suppliers registered in the KitchenDraw software for the site to which the current user belongs. |
SystemLocale | Returns current system locale that's used by the application. |
Users | A collection that represents all the registered users in the application. |
Version | Returns the KitchenDraw version number as a string. |
VersionDate | Returns modification date of the application executable. |
WindowHandle | Gets the window handle of the KitchenDraw application. |
Methods
Name | Description |
---|---|
AddPlugin(string) | Loads a plugin in the application so that it becomes immediately operational. |
AddSite(string) | Adds a new site in the list of the KitchenDraw registered sites. |
AddSupplierToCurrentSite(string) | Adds a supplier at the end of the list of the suppliers registered in the KitchenDraw software for the site to which the current user belongs. |
AddUser(string) | Adds a new user in the list of the KitchenDraw registered users. |
AppliCatSetXLink(string, int, string, string) | |
DisableMenuItem(MenuItem) | Disables (grays) menu item in KitchenDraw. |
DisableUndo() | |
EnableMenuItem(MenuItem) | Enables (ungrays) menu item in KitchenDraw. |
EnableUndo() | |
EndSession() | Frees the memory space allocated previously by the StartSession or StartSessionFromCallParams function. |
EvalWebCatalogJavaScript(string) | Runs the Javascript code in the context of the Web catalog application displayed in KitchenDraw catalog area. |
EvalWebManagerJavaScript(string) | Runs the Javascript code in the context of the Web management application displayed in KitchenDraw main area when no scene is open. |
ExecuteMenuItem(MenuItem) | Launches menu item as if it was selected in the menu by the user. |
ExecuteMobiscriptMenuItem(MobiscriptMenuItem) | Launches MobiScript menu item as if it was selected in the menu by the user. |
ExportCatalogBlockImages(string, IEnumerable<int>, HandingType, bool, ViewMode, string, int, int, string, bool, int, int) | Exports the images corresponding to the blocks of a catalog. |
ExportCatalogImage(string, string, HandingType, bool, ViewMode, string, int, int, string, bool, int, int) | Exports an image of given catalog item. |
ExportCatalogImageFromScript(string, string, HandingType, double, double, double, bool, ViewMode, string, int, int, string, bool, int, int) | Exports an image representing a block created from a given script. |
ExportCatalogOutlineImage(string, string, HandingType, double, double, double, double, bool, string, int, int) | Exports an image corresponding to the outline of given catalog item. |
GetCallParamsInfoDirect(int) | Returns an information related to a particular plugin function call (e.g. menu item which provoked a plugin call or a supplier for which an order should be generated) from the call parameters block identified by the value passed to the plugin event handler function as a parameter. |
GetCatalogByFilename(string) | Creates an instance of CatalogSummary class which allows to read various data of the catalog without fully loading it into the application and thus with no ability to modify it. |
GetCatalogOutlinePointsString(string, string, HandingType, double, double, double, double, bool, int, int) | Returns polylines composing the outline of a catalog item. |
GetCatalogs(bool) | Collection of the catalogs installed on the system (.CAT files contained in the directory defined in the SPACE.INI file). |
GetCurrencyByCode(string) | Gets currency by its code. |
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. |
GetMenuItemByRank(int, int) | Gets a menu item with given rank from a menu with given rank or
|
GetMenuItemFromId(int) | Gets a menu item with given id or |
GetPluginByFilename(string) | Returns plugin which has a given filename, or |
GetSceneByFilename(string) | Creates an instance of SceneSummary class which allows to read various data of the scene without fully loading it into the application and thus with no ability to modify it. |
GetScenes(string, bool, string, SceneListSortingType) | Returns the scenes located in the given directory and listes in the SCENES.LST file in that directory. |
GetTranslatedText(string) | Translates a text in a key language to the current application's language using the default application's dictionary (DICO.LNG file in the application's folder). Key language is French for a DICO.LNG file which bundled with the program by default. |
GetTranslatedTextFromCatalog(string, string) | Translates a text using the given catalog's dictionary from the catalog's key language into current language of KitchenDraw. |
InsertActiveObjectContextualMenuItem(MenuItemInsertionInfo, MenuItem, MenuItemInsertionPosition) | Inserts an item in the contextual menu which appears when an object of the scene is selected and the right button of the mouse is pressed. |
InsertActiveObjectContextualMenuItem(MenuItemInsertionInfo, StandardId, MenuItemInsertionPosition) | Inserts an item in the contextual menu which appears when an object of the scene is selected and the right button of the mouse is pressed. |
InsertMenuItem(MenuItemInsertionInfo, MenuItem, MenuItemInsertionPosition) | This function inserts a menu item or a separator into main menu of the KitchenDraw application. |
InsertMenuItem(MenuItemInsertionInfo, StandardId, MenuItemInsertionPosition) | This function inserts a menu item or a separator into main menu of the KitchenDraw application. |
InsertMenuItem(MenuItemInsertionInfo, int, int) | This function inserts a menu item or a separator into main menu of the KitchenDraw application. |
InsertMobiscriptMenuItem(MenuItemInsertionInfo, MobiscriptMenuItem, MenuItemInsertionPosition) | This function inserts a menu item or a separator into the menu of the MobiScript window. |
InsertMobiscriptMenuItem(MenuItemInsertionInfo, StandardId, MenuItemInsertionPosition) | This function inserts a menu item or a separator into the menu of the MobiScript window. |
InsertSite(string, Site) | Inserts new site in the list of the KitchenDraw registered sites just above some other site. |
InsertSite(string, int) | Inserts new site in the list of the KitchenDraw registered sites just above the site with given rank. |
InsertSupplierToCurrentSite(string, Supplier) | Inserts a supplier in the list of the suppliers registered in the KitchenDraw software for the site to which the current user belongs. |
InsertUser(string, User) | Adds a new user in the list of the KitchenDraw registered users just above a given user. |
LoadDocuments(string) | Loads the INSITU.DOD file which is located in a given directory. After calling this method, you can access individual documents with the Documents property. |
PluginCall(string, string, string, object) | Calls from the currently running plugin a method in another plugin (providing that it is developed with .NET technology). |
ReadIniValueOrDefault(string, string, string, bool) | Returns value of an .INI file entry, or default value if the entry does not exist. |
ReadIniValueOrDefault(string, string, string, double) | Returns value of an .INI file entry, or default value if the entry does not exist. |
ReadIniValueOrDefault(string, string, string, int) | Returns value of an .INI file entry, or default value if the entry does not exist. |
ReadIniValueOrDefault(string, string, string, string) | Returns value of an .INI file entry, or default value if the entry does not exist. |
RemoveMenuItem(MenuItem) | Removes a menu item (a command, a separator, or a sub-menu) from the KitchenDraw main menu. |
RemoveMenuItem(MobiscriptMenuItem) | Removes a menu item (a command, a separator, or a sub-menu) from the Mobiscript window menu. |
RemovePlugin(Plugin) | Unloads a plugin from the application so that it immediately stops being operational. |
RemovePlugin(string) | Unloads a plugin from the application so that it immediately stops being operational. |
RemoveScene(string, bool) | Removes the scene from the SCENES.LST file so that the scene can't be seen in the list of scenes (e.g. shown in the "File|Open" KitchenDraw dialog box). Also deletes the file in necessary. |
RemoveSite(Site) | Removes the site from the list of the KitchenDraw registered sites. Throws an exception if unsuccessful. |
RemoveSupplierFromCurrentSite(Supplier) | Removes the supplier from the list of the suppliers registered in the KitchenDraw software for the site to which the current user belongs. |
RemoveUser(User) | Removes the user from the list of the KitchenDraw registered users. |
RestoreScene(string, string) | Performs a scene restore operation: copies the scene (with new filename) in the scenes directory, integrates it in the SCENES.LST file so that the scene san be seen for example in "File|Open" KitchenDraw dialog box, and assigns the scene to a specified KitchenDraw user. |
SaveConfigFile() | Saves users and sites configuration to disk. |
SaveSuppliersFile() | Saves the suppliers, the associated catalogs as well as the catalog coefficients modifications to disk. |
SendEmail(string, string, string, string, string, string[], string[], bool) | Sends an email. |
SetArticleToBePlaced(string, string, HandingType) | Selects the article in the Catalogs window. |
SetCurrentUser(string, string) | Sets the KitchenDraw current user. |
StartSessionFromCallParams(int) | Allocates a memory workspace that will be used to store the current catalog, the current scene and the current language among other information. |
TransferScenesFromUserToAnother(string, string) | Assigns all the scenes belonging to a user to a new user. |
TryGetSiteFromCode(string, out Site) | Finds a site matching the given code. |
TryGetSupplierOfCurrentSiteFromCatalogFilename(string, out Supplier) | Finds a supplier to which the given catalog is attached in the list of the suppliers registered in the KitchenDraw software for the site to which the current user belongs. |
TryGetSupplierOfCurrentSiteFromIdentifier(string, out Supplier) | Finds a supplier with matching identifier in the list of the suppliers registered in the KitchenDraw software for the site to which the current user belongs. |
TryGetUserByIdentifier(string, out User) | Tries to get a user which has specified identifier. |
TryReadIniValue(string, string, string, out bool) | Tries to read value of an .INI file entry. |
TryReadIniValue(string, string, string, out double) | Tries to read value of an .INI file entry. |
TryReadIniValue(string, string, string, out int) | Tries to read value of an .INI file entry. |
TryReadIniValue(string, string, string, out string) | Tries to read value of an .INI file entry. |
TrySetCurrentUser(string, string) | Sets the KitchenDraw current user. |
UnitConvert(UnitType, UnitType, double) | Converts value in source units to an equal value in destination units. |
UnitConvertFromIncrements(UnitType, int) | Converts a value given in unit increments to the same value expressed in the units. |
UnitConvertToIncrements(UnitType, double) | Converts a value given in units to the same value expressed in the unit increments. |
UpdateCatalogsList() | Updates the CATALOGS.LST file which is located in the catalog directory. |
WriteIniValue(string, string, string, bool) | Writes value value to the .INI file. Corresponding entry and section are created if necessary. |
WriteIniValue(string, string, string, double) | Writes value value to the .INI file. Corresponding entry and section are created if necessary. |
WriteIniValue(string, string, string, int) | Writes value value to the .INI file. Corresponding entry and section are created if necessary. |
WriteIniValue(string, string, string, string) | Writes value value to the .INI file. Corresponding entry and section are created if necessary. |