For the complete documentation index, see llms.txt. This page is also available as Markdown.

RoomlePlanner.default

planner-core/src/roomle-planner.default

Shared API between configurator and planner

Type parameters

Name
Type

P

extends readonly PluginName[] = readonly []

Implements

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new default<P>(creator, activePlugins?)

Type parameters

Name
Type

P

extends readonly "external-objects"[] = readonly []

Parameters

Name
Type

creator

string

activePlugins?

P

Properties

_creator_

_creator_: string

Implementation of

Context.creator

Accessors

PlannerCoreTypes

get PlannerCoreTypes(): PlannerKernelContainer

Returns

PlannerKernelContainer

an object which has all type constants from Roomle Core (C/C++)


callbacks

get callbacks(): default

Returns

default

Implementation of

ExternalEmbeddable.callbacks

set callbacks(callback): void

Parameters

Name
Type

callback

default

Returns

void

Implementation of

ExternalEmbeddable.callbacks


hasSingleRoom

get hasSingleRoom(): boolean

Check if the 3D scene contains only one room

Returns

boolean

True if there is only one room, false otherwise

Methods

_selectExternalObjectGroup

_selectExternalObjectGroup(groupId, switchToPlanner): Promise<void>

Parameters

Name
Type

groupId

string

switchToPlanner

boolean

Returns

Promise<void>


_selectExternalObjectModule

_selectExternalObjectModule(rootModuleId, subModuleId, selectPlanObject, switchToConfigurator, selectComponent, highlightSelection): Promise<void>

Parameters

Name
Type

rootModuleId

string

subModuleId

string

selectPlanObject

boolean

switchToConfigurator

boolean

selectComponent

boolean

highlightSelection

boolean

Returns

Promise<void>


addAtticToWall

addAtticToWall(wall, kneeHeight, width, preferredSide?): KernelAttic

Creates a sloping roof attic on a given wall.

Parameters

Name
Type
Description

wall

KernelWall

The wall to add an attic to.

kneeHeight

number

Height of the attic knee wall.

width

number

Width of the sloping roof.

preferredSide?

WallSide

The side where the attic should be added.

Returns

KernelAttic

The newly created attic.


back

back(): void

Returns

void


backTo

backTo(_cssClass): void

Parameters

Name
Type

_cssClass

string

Returns

void


backToPlanner

backToPlanner(): void

Returns

void


calcPartsPriceSum

calcPartsPriceSum(partList): Promise<KernelPartListPrice>

Parameters

Name
Type

partList

KernelPartList

Returns

Promise<KernelPartListPrice>


cancelSelection

cancelSelection(reason?): void

Parameters

Name
Type
Default value

reason

CancelSelectionReasons

'unknown'

Returns

void

Implementation of

RoomlePlannerCallback.cancelSelection


changeExteriorWallsMaterial

changeExteriorWallsMaterial(material): void

Parameters

Name
Type

material

BatchPaintMaterial

Returns

void


changeFloorsMaterial

changeFloorsMaterial(material): void

Parameters

Name
Type

material

BatchPaintMaterial

Returns

void


changeInteriorWallsMaterial

changeInteriorWallsMaterial(material): void

Parameters

Name
Type

material

BatchPaintMaterial

Returns

void


configureExternalObjectApi

configureExternalObjectApi(configurationJson): Promise<void>

With "configureExternalObjectApi" the default representation of the objects and UI and the default behavior when interacting with external objects can be completely or partially overwritten. This configuration should be set prior to loading plans or objects.

Parameters

Name
Type
Description

configurationJson

string | ExternalObjectApiConfiguration

The configuration JSON as string or object.

Returns

Promise<void>

Implementation of


createNewSerializedConfiguration

createNewSerializedConfiguration(configurationRuntimeId): Promise<string>

Parameters

Name
Type

configurationRuntimeId

number

Returns

Promise<string>


createPlanFromObject

createPlanFromObject(id, position?, rotation?): Promise<number>

creates and loads a plan from a given object

Parameters

Name
Type
Description

id

string

position?

Position3

rotation?

number

return the object runtime id

Returns

Promise<number>


deleteSelection

deleteSelection(): void

Returns

void

Implementation of

RoomlePlannerCallback.deleteSelection


disableAdvancedDocking

disableAdvancedDocking(): void

disable docking of objects that fit together when objects are snapped in the plan

Returns

void


disableEvents

disableEvents(): void

Returns

void


disableMeasurementLineDrawing

disableMeasurementLineDrawing(): void

Returns

void


disableMultiselect

disableMultiselect(): void

Disable the selection of multiple elements.

Returns

void


disableRotation

disableRotation(): void

Disable rotation of selected elements

Returns

void


disableShowChildrenOfPlanObject

disableShowChildrenOfPlanObject(planElementViewModel): void

disable interaction with child components of configurable objects in the plan

Parameters

Name
Type

planElementViewModel

default

Returns

void


disableSnapping

disableSnapping(): void

disable all types of snapping

Returns

void


disableWallDrawing

disableWallDrawing(): void

Returns

void


downloadHomagIxExportPoC

downloadHomagIxExportPoC(): Promise<any>

Returns

Promise<any>


dragInObject

dragInObject(idOrSerializedConfigString, dragEvent, type?): Promise<number>

Parameters

Name
Type
Default value

idOrSerializedConfigString

string

undefined

dragEvent

DragEvent

undefined

type

ID_TYPE

'rml_id'

Returns

Promise<number>


drawWalls

drawWalls(wallDefinitions, interactionOptions?): KernelWall[]

Draws walls according to the wall definitions this can be used to create a room on the fly

Parameters

Name
Type

wallDefinitions

WallDefinition[]

interactionOptions

InteractionOptions

Returns

KernelWall[]


duplicateItems

duplicateItems(itemList): PlanObject[]

Duplicates all planObjects in the array and inserts them into the current plan

Parameters

Name
Type
Description

itemList

PlanObject[]

Array of PlanObjects

Returns

PlanObject[]


enableAdvancedDocking

enableAdvancedDocking(): void

enable docking of objects that fit together when objects are snapped in the plan

Returns

void


enableEvents

enableEvents(): void

Returns

void


enableMeasurementLineDrawing

enableMeasurementLineDrawing(): void

Returns

void


enableMultiselect

enableMultiselect(): void

Enable the selection of multiple elements. Common parameters shared between those elements can then be changed at once

Returns

void

Implementation of

RubensAPI.enableMultiselect


enableRotation

enableRotation(): void

Enables rotation of selected elements

Returns

void


enableShowChildrenOfPlanObject

enableShowChildrenOfPlanObject(planElementViewModel): void

enable interaction with child components of configurable objects in the plan

Parameters

Name
Type

planElementViewModel

default

Returns

void


enableSnapping

enableSnapping(): void

enable snapping of object to object and object to wall

Returns

void


enableWallDrawing

enableWallDrawing(): void

Returns

void


escapeDrawing

escapeDrawing(cancelDrawing): void

Parameters

Name
Type

cancelDrawing

boolean

Returns

void


exportCanvasScreenshot

exportCanvasScreenshot(quality?): Promise<string>

Parameters

Name
Type

quality?

number

Returns

Promise<string>

Implementation of


exportGLB

exportGLB(): void

Returns

void


exportImageFromCamera

exportImageFromCamera(filename?, shouldWaitForAssets?): Promise<void>

Parameters

Name
Type
Default value

filename

string

'image'

shouldWaitForAssets

boolean

false

Returns

Promise<void>

Implementation of


formatValueToUnitString

formatValueToUnitString(value, parameter): string | number

Returns the formatted value based on the parameter.unitType

Parameters

Name
Type

value

number

parameter

KernelParameter

Returns

string | number


generateTCExport

generateTCExport(planObjectIds?): Promise<any>

Parameters

Name
Type
Default value

planObjectIds

string[]

[]

Returns

Promise<any>


getAttachedAttic

getAttachedAttic(wall): KernelAttic

Gets the attached attic from a wall.

Parameters

Name
Type
Description

wall

KernelWall

The wall to retrieve the attic from.

Returns

KernelAttic

The first attached attic or null.


getCameraOffset

getCameraOffset(): CanvasOffset

Gets the available screen space for our item default: 'left: 0, top: 1, right: 1, bottom: 0'

Returns

CanvasOffset

Implementation of

GlobalAPI.getCameraOffset


getConfigurator

getConfigurator(): Configurator

Returns

Configurator


getConfiguratorApi

getConfiguratorApi(): default<P>

Returns

default<P>


getConfiguratorContext

getConfiguratorContext(): default

returns class containing configurator specific data properties

Returns

default


getCurrentSkin

getCurrentSkin(): Promise<RapiSkin>

Returns

Promise<RapiSkin>


getExternalObjectGroups

getExternalObjectGroups(): Promise<object[]>

"getExternalObjectGroups" returns all groups of external objects modules (PosData) that are currently loaded in the plan.

Returns

Promise<object[]>

Implementation of


getObjects

getObjects(): Promise<UiPlanObject[]>

returns all objects found in the current plan this includes info about size, rotation, id and parts

Returns

Promise<UiPlanObject[]>


getPartlistOf

getPartlistOf(id): Promise<KernelPartList>

get the Partlist of certain runtimeID can be used if partlist of a selected Item is needed

Parameters

Name
Type
Description

id

number

runtimeID of a configurable item

Returns

Promise<KernelPartList>

kernelPartlist with processed price, currency and RAL colors


getPlanInteractionHandler

getPlanInteractionHandler(): Promise<PlanInteractionHandler>

Returns

Promise<PlanInteractionHandler>


getPlanModelViewHelper

getPlanModelViewHelper(): Promise<PlanModelViewHelper>

Returns

Promise<PlanModelViewHelper>


getPlanOverview

getPlanOverview(): Promise<PlanOverview>

get all info available for the current plan, including objects, rooms and walls

Returns

Promise<PlanOverview>


getPlanXmlFrom

getPlanXmlFrom(plan): any

Parameters

Name
Type

plan

Returns

any


getRuntimeComponentIdOfRootComponent

getRuntimeComponentIdOfRootComponent(planObjectId): number

Returns the runtime component id of the plan object with the given id

Parameters

Name
Type
Description

planObjectId

number

id of the plan object you want to get the runtime component id of the root component from

Returns

number

number the number of the runtime id of the root component

Implementation of


getScene

getScene(): Scene

Returns the three.js scene (https://threejs.org/docs/#api/en/scenes/Scene) WARNING: This is the actual scene (reference) and not a copy!

Returns

Scene

Implementation of

GlobalAPI.getScene


getStorage

getStorage(): default

returns manager class to interface with indexedDB storage

Returns

default

Implementation of

RubensAPI.getStorage


getUnitFormatter

getUnitFormatter(): default

returns unit formatter for formatting input und output values in scene

Returns

default

Implementation of

GlobalAPI.getUnitFormatter


getWallAngleDegrees

getWallAngleDegrees(wall): number

Returns the wall angle in degrees relative to the camera

Parameters

Name
Type
Description

wall

default

a WallPlanElementViewModel instance

Returns

number


hasWalls

hasWalls(): boolean

Returns

boolean


highlightPlanElements

highlightPlanElements(runtimeIds): void

Highlights one or more objects in the scene based on their runtime IDs. If runtimeIds is null, all highlighted objects will be unhighlighted.

Parameters

Name
Type
Description

runtimeIds

number | number[]

A single runtime ID, an array of runtime IDs, or null.

Returns

void


importGLB

importGLB(url): void

Parameters

Name
Type

url

string

Returns

void


init

init(element, preloadPlanId?, options?): Promise<void>

Parameters

Name
Type

element

HTMLElement

preloadPlanId?

string

options?

Returns

Promise<void>


insertItemList

insertItemList(ids): Promise<number[]>

Parameters

Name
Type

ids

string[]

Returns

Promise<number[]>


insertItems

insertItems(itemList): Promise<number[]>

Inserts all of the items in the array into current plan

Parameters

Name
Type
Description

itemList

(RapiItem | RapiConfiguration | `__ext__obj__#${string}` | ExternalObject)[]

Array of items received from the Roomle API

Returns

Promise<number[]>


insertObject

insertObject(id, position?, rotation?): Promise<number>

Inserts the object into the scene (at a given position and rotation)

Parameters

Name
Type
Description

id

string

position?

Position3

x (left/right),y (up, down) and z(front, back) in meters

rotation?

number

in radians

Returns

Promise<number>


isCurrentlyDrawing

isCurrentlyDrawing(): boolean

Returns

boolean


isReady

isReady(): void

Returns

void

Implementation of


loadError

loadError(error?): void

Parameters

Name
Type

error?

any

Returns

void

Implementation of


loadExternalObjectGroup

loadExternalObjectGroup(groupData, findFreeSpaceInPlan, verifyArrangement?, mergedGroups?): Promise<void>

"loadExternalObjectGroup" loads a group of modules and places them in the plan. If the group has already been loaded, it is completely replaced by the new group. This function therefore has 2 use cases:

  1. Load a new group of modules

  2. Update or modify an existing group of modules The initial location of the group and the IDs of the modules are defined in the group JSON.

Parameters

Name
Type
Default value
Description

groupData

ExternalGroupData

undefined

The group JSON as string or object.

findFreeSpaceInPlan

boolean

undefined

A free space is automatically searched for in the plane.

verifyArrangement

boolean

false

Verify whether the root modules of the group need to be rearranged as they have changed in size.

mergedGroups

string[]

[]

Groups that were merged into another group and have to be delete (this is required to generate correct undo/redo steps).

Returns

Promise<void>

Implementation of


loadExternalObjectLibrary

loadExternalObjectLibrary(libraryJson): void

"loadExternalObjectLibrary" loads the master data of a library. If master data has already been loaded for the library, it is completely replaced by the new master data.

Parameters

Name
Type
Description

libraryJson

string | object

The library JSON as string or object.

Returns

void

Implementation of


loadPlan

loadPlan(id, options?): Promise<RapiPlan | RapiPlanSnapshotGetData>

Parameters

Name
Type

id

string

options?

Returns

Promise<RapiPlan | RapiPlanSnapshotGetData>