KitchenDraw SDK 2
Show / Hide Table of Contents

Class Scene

Provides access to the scene and its content (e.g. objects, observer and view points, generics, headings).

Inheritance
object
Scene
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 Scene
Remarks

This class handles some of the functions of the Kitchendraw user interface when a scene is opened. They can be found in the File, Edit, Selection, Object, Zoom, View menus.

The members of the Scene class allow reading and writing data from and into KitchenDraw scenes programmatically.

Thanks to them, it is possible to develop suppliers order files generation modules, or KitchenDraw extensions (plugin functions that are executed automatically when certain events are fired or that are associated to specific menu commands).

These members are also used to develop wizards which are specific programs to configure highly parameterizable objects like special worktops or cabinets, staircases, conservatories, etc.

Properties

Name Description
ActiveObject

Active object of the scene (which was last selected or unselected by user). Returns null if there's no active object in the scene.

ActiveShape

Returns active shape of the scene, or empty string if no shape is active.

ActiveShapeRank

The rank of the active shape in the scene (starting from 0), or -1 of no shape is active.

ActiveZone

Returns a zone that is currently active, or null. A zone is special container to separate a room space into several dedicated areas, e.g. one for kitchen and one for wardrobe.

CoordinateSystem

Returns an instance of the Scene.CoordinateSystem_ class, which provides access to the scene's local coordinate system.

CreationTime

Time of creation of the scene.

CurrencyCode

Code of the currency in which prices in the scene are expressed.

CustomInfo

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

DimensionX

Width of the scene space.

DimensionY

Depth of the scene space.

DimensionZ

Height of the scene space.

DrawingStyle2D

Drawing style of the scene for the top view mode.

DrawingStyle3D

Drawing style of the scene for the perspective view modes.

DrawingStyleElevation

Drawing style of the scene for the elevation view modes.

EventsToIgnore

Suppresses the triggering of the embedded plugin events for any object in the scene (use | sign to supply more than one event if necessary).

FilenameWithPath

Absolute filename of the scene.

FinalToneMapping

Tone-mapping values applied to final photorealistic renderings.

Generics

Returns a collection that represents all the headings in the scene.

GridSettings2D

Grid settings of the scene for the top view.

GridSettingsElevation

Grid settings of the scene for elevation views.

HasEcoParticipationDeee

Indicates whether the scene includes eco-participation of electrical and electronic equipment (DEEE, only applicable in France).

HasEcoParticipationMobile

Indicates whether the scene includes eco-participation of furniture (only applicable in France only).

Headings

Returns a collection that represents all the headings in the scene.

HighestObjectNumber

Highest number assigned to a scene object.

IsActiveVersion

Indicates whether the scene version is active (as opposed to not "chosen" versions of the same project).

IsAuto3dFileDownloadDisabled

Indicates whether the automatic 3D file download is disabled.

IsAutomaticLinearsUpdatingEnabled

Indicates whether the continous automatic linear updates are enabled in the scene.

IsDimensioningElevationAutomatic

Indicates whether the automatic dimensioning facility is enabled in the scene for elevation view modes.

IsDimensioningTopViewAutomatic

Indicates whether the automatic dimensioning facility is enables in the scene for top view mode.

IsInTableView

Indicates whether the "pricing view" is currently active in KitchenDraw.

IsLoaded

Allows to know if a scene is loaded in memory and thus if it is possible to call the functions which apply to the scene loaded in memory (majority of the Scene class members).

IsModified

Indicates whether the scene has been modified since it was last saved. Please be aware that this flag is NOT automatically triggered when changing the scene via the SDK.

KeywordInfo

Provides access to the scene data through the special variables that are used for the document generation.

LanguageCode

Code of the langoage set for the scene.

LastObjectDropAngleXY

Angle in the horizontal plane of the last object that has been dropped in the scene (before any automatic positioning). In degrees.

LastObjectDropPositionX

Position on the Ox axis (width of the screen on top view) of the last object that has been dropped in the scene before any automatic positioning, in scene measurement units.

LastObjectDropPositionY

Position on the Oy axis (height of the screen on top view) of the last object that has been dropped in the scene before any automatic positioning, in scene measurement units.

LastObjectDropPositionZ

Position on the Oz axis (altitude) of the last object that has been dropped in the scene before any automatic positioning, in scene measurement units.

LastSaveTime

Time of the last save of the scene.

LastUpdateTime

Time of the last update (modification) of the scene.

LayerSetName

Name of the scene's current layer set.

Lighting
Marking

Type of the marking of the scene objects.

Name

Returns scene's unique internal name (which is currently the same as its filename without extension if the file wasn't renamed).

Objects

Provides access to objects contained in the scene.

ObjectsBySupplier

Returns objects belonging to a given supplier.

ObjectsBySupplierFactorized

Returns objects belonging to a given supplier.

RealtimeToneMapping

Tone-mapping values applied to final photorealistic renderings.

Selection

Represents current selection and contains methods to modify it.

Shapes

Returns a collection that represents all the shapes in the scene.

UndoStack

Provides access to the scene's undo stack, which is dedicated to undo/redo facilities of the program.

Unit

The scene measurement unit.

VatRate

VAT rate type which is applied to the scene.

View

Provides access to the scene's functionality dedicated to displaying scene to a user.

ViewPoints

Returns a collection that represents all the view points registered in the scene.

Zones

Returns a collection that represents all the zones in the scene. A zone is a special container to separate a room space into several dedicated areas, e.g. one for kitchen and one for wardrobe.

Methods

Name Description
AddGeneric(string)

Adds a generic to the current scene.

AddShape(string)

Adds a shape to the current scene.

AddViewPoint(string)

Adds a view point at the end of the list of view points registered in the scene. The view point will have the characterictics of the current observer.

ChangeCatalog(string, string)

Changes a catalog in the scene: replaces each object coming from the old catalog with the same object coming from the new catalog. This operation may leave some objects in unchanged state requiring further actions. Check the Scene.CatalogChangeResult value being returned to examine the issues, or query CatalogChangeErrors to get the description of an error appeared during the last change operation applied to the object.

Close(bool?)

Closes the current scene.

Export3dGeometry(string, bool, bool, bool, bool)

Generates a 3D file representing the scene.

ExportActiveObjectHighlightImage(string, int, int)

Exports an image of the scene's active object. This image is not intended to provide a realistic representation of the current object. Instead of that, thanks to images superposition operation, it can be used to highlight active object on other image by adding this image on top of another.

ExportBomList(string, bool, string, bool, bool)

Exports a Bill Of Material (BOM) of the scene.

ExportImage(string, int, int, bool, string, int, int)

Exports the scene view window contents as a raster or vectorial image.

ExportImageForObjects(IEnumerable<Object>, ViewMode, string, int, int, IEnumerable<Object>, bool, bool, bool, string, int, int)

Exports an image containing objects from the given list. Camera position is calculated automatically. One of the object's may be darkened - this allows to emphasize it on the exported image.

ExportImageFromScript(string, string, HandingType, double, double, double, double, double, double, AltitudeType, double, bool, bool, ViewMode, string, int, int, string, bool, int, int)

Exports an image representing a block created from a given script.

ExportManufacturingFiles(string)

Exports .csv files dedicates to manufacturing feature of KitchenDraw. The files contain information about parts to be manufactured, their faces, contacts and conflicts.

ExportObjectsList(string, bool, bool)

Exports the contents of the scene as a "flat" text file.

ExportOrderFile(string, string, int, int)

Generates an order file listing all the scene articles belonging to one of the catalogs attached to a given supplier.

ExportXml(string, bool)

Exports the scene contents as an XML file.

GetFilenamesOfInvolvedTextures()

Returns filenames of textures involved in the scene.

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.

GetInfoAsDate(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.

GetObjectById(int)

Retrieves an object of the scene which has a given id.

GetObjectsFiltered(string)

Lists the objects of the scene on any level of hierarchy matching the given criteria expression.

GetScript(bool)

Returns the script corresponding to the scene.

GetZonesForSupplier(Supplier)

Returns a collection that represents all the zones in the scene bound to the given supplier. A zone is a special container to separate a room space into several dedicated areas, e.g. one for kitchen and one for wardrobe.

ImportObjectsList(string)

Import in the scene a list of objects, which was previously exported with ExportObjectsList(string, bool, bool).

ImportScene(string)

Imports a scene in the current scene. Does the same as "File|Import|Scene" KitchenDraw menu item.

InsertGeneric(string, Generic)

Inserts a generic before the given existing generic.

Load(string)

Loads a scene. Throws an exception if unsuccessful.

LoadAutosavedScene()

Loads last autosaved scene for the current user. The scene being edited by a user is autosaved by InSitu/KitchenDraw with a time interval specified in System settings dialog window (usually 1 min). The autosave file is removed when the scene is closed normally.

LoadCatalogScene(string)

Loads a catalog presentation scene.

LoadLayerSet(string, string)

Loads the layers set from a layers set file.

New(UnitType, double, double, double)

Creates a new scene.

New(bool, bool, bool)

Creates a new scene.

PlaceAutomaticLinearObject(string, string, string)

First removes the linear objects of the same type as given article, then places one or several objects along special generated shape of objects existing in the scene.

PlaceDimensions(DimensionType, DimensionLevel, DimensionViewMode, string)
PlaceElevationSymbolForObjects(IEnumerable<Object>, Object, double)

Places an elevation symbol so that is displays all the objects from the passed list. The first object is used to infer the elevation symbol's orientation. Then the elevation symbol size is adjusted so that it displays all the objects. After, addedDepth is added to the calculated depth of the symbol.

PlaceObject(string, string, HandingType, double, double, double, double, double, double, AltitudeType, double, bool, bool, bool)

Places given catalog item in the scene.

PlaceObjectFromUrl(string)

Places in the scene an item described by an url, which is typically found in a web catalog for KitchenDraw.

PlaceOpenArticle(string, int, string, HandingType, string, string, double, double, bool, double)

Places an "open article", i.e. an article not belonging to any catalog, in the current scene.

PlaceText(string, double, TextColor, TextColor, ViewType, Object, double, double, int, bool)

Places a special type of object in the scene that displays the specified text.

PlaceWalls(double, double, string)

Places walls of given thickness and height along a given shape.

Rebuild()

Rebuilds scene geometry. See remarks.

RemoveActiveObjectAndSelectPrevious()

Removes the active object from the scene and sets as active the object placed just before the deleted one (chronologically speaking). In fact does the same as if user pressed the Backspace key in KitchenDraw.

RemoveAllShapes()

Removes all the shapes from the current scene.

RemoveGeneric(Generic)

Removes given generic from the current scene.

RemoveObjects(IEnumerable<Object>)

Deletes given objects from the scene.

RemoveShape(int)

Deletes the shape whose rank is given from the scene.

RemoveViewPoint(ViewPoint)

Removes the view point from the scene's registered view points list.

Renumber(IEnumerable<Object>, int, bool)

Numbers given objects of the scene starting from given number.

Save(string)

Saves the current scene in a file.

SaveCatalogScene(string)

Saves catalog presentation scene in a file.

SaveVersion()

Saves a new version of the scene. Versions have the same number as the original scene, but increased version number, and are displayed in the Open dialog window near their originals.

SelectAll()

Selects all the selectable objects belonging to the current scene.

SelectReverse()

Reverses the selection status of all objects in the current scene. Thus, the selected objects become unselected and vice versa.

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, int, DateTime)

Sets a datetime through two separate infoTypes that take "YYYYMMDD" and "HHMMSS" strings. Private use only.

SetInfo(int, string)

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

TryClose(bool?)

Closes the current scene. Returns false if user cancels while being asked whether to save changes.

TryGetObjectById(int, out Object)

Retrieves an object of the scene which has a given id.

TryLoad(string)

Loads a scene. Returns false if unsuccessful.

TryLoadAutosavedScene()

Loads last autosaved scene for the current user. The scene being edited by a user is autosaved by InSitu/KitchenDraw with a time interval specified in System settings dialog window (usually 1 min). The autosave file is removed when the scene is closed normally.

TryLoadLayerSet(string, string)

Loads the layers set from a layers set file.

TryPlaceElevationSymbolForObjects(IEnumerable<Object>, Object, double, out Object)

Places an elevation symbol so that is displays all the objects from the passed list. The first object is used to infer the elevation symbol's orientation. Then the elevation symbol size is adjusted so that it displays all the objects. After, addedDepth is added to the calculated depth of the symbol.

TryPlaceObject(string, string, HandingType, double, double, double, double, double, double, AltitudeType, double, bool, bool, bool, out Object)

The same as PlaceObject(string, string, HandingType, double, double, double, double, double, double, AltitudeType, double, bool, bool, bool) except that it doesn't throw an exception if fails to place the object.

TryPlaceObjectFromUrl(string, out Object)

The same as PlaceObjectFromUrl(string) except that it doesn't throw an exception if fails to place the object.

TryPlaceText(string, double, out Object, TextColor, TextColor, ViewType, Object, double, double, int, bool)

Places a special type of object in the scene that displays the specified text.

TryPlaceWalls(double, double, string, out IEnumerable<Object>)

Places walls of given thickness and height along a given shape.

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 scene measurement units.

UnitConvertTo(double, UnitType)

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

UpdateHeadings()

Replaces the headings of the current scene by the set of headings defined in the SPACE.INI configuration file.

UpdatePrices()

Updates the information allowing the calculation of the object prices in the scene (catalog prices, supplier coefficients related to the catalogs, VAT rates, descriptions, etc).

In this article
Back to top Generated by DocFX