RoomlePlanner.Internal.ExternalObjectAPI
Last updated
Last updated
..ExternalObjectAPI
â–¸ 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.
configurationJson
The configuration JSON as string or object.
Promise
<void
>
â–¸ getExternalObjectGroups(): Promise
<object
[]>
"getExternalObjectGroups" returns all groups of external objects modules (PosData) that are currently loaded in the plan.
Promise
<object
[]>
â–¸ loadExternalObjectGroup(groupJson
, 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:
Load a new group of modules
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.
groupJson
string
| object
| string
[]
The group JSON as string or object.
findFreeSpaceInPlan
boolean
A free space is automatically searched for in the plane.
verifyArrangement?
boolean
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).
Promise
<void
>
â–¸ 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.
libraryJson
string
| object
The library JSON as string or object.
void
â–¸ openOrCloseGeometryOfExternalObject(groupIdOrRootModuleId
, subModuleId
, open
, animate
): Promise
<void
>
"openOrCloseGeometryOfExternalObject" switches the geometry of the modules between closed and open representation. The function can switch the geometry of the group or the singe root module with the ID "groupIdOrRootModuleId". If "groupIdOrRootModuleId" is the ID of a root module and the "subModuleId" is also specified, only this one sub-module is opened or closed.
groupIdOrRootModuleId
string
The ID of the group of modules or the ID of the root module.
subModuleId
string
The ID of the sub module.
open
boolean
If true, the modules are opened, if false, they are closed, if the geometry is already in the desired state, nothing happens.
animate
boolean
If true the opening or closing is animated else the geometry is switched instantly.
Promise
<void
>
â–¸ removeExternalObjectGroup(groupId
, wasMerged
): Promise
<void
>
"removeExternalObjectGroup" removes a group and all its modules from the plan.
groupId
string
The ID of the group of modules.
wasMerged
boolean
Should be set to true if the group has been merged with another group (this is required to generate correct undo/redo steps).
Promise
<void
>
â–¸ removeExternalObjectRootModule(rootModuleId
): void
"removeExternalObjectRootModule" removes a root module from a group and splits the remaining group if the removed root module is located between other root modules. If the group consists of only one root module, the group is removed.
rootModuleId
string
void
â–¸ renderImagesOfExternalObjectGroup(groupsJson
): Promise
<{ [key: string]
: string
; }>
"renderImagesOfExternalObjectGroups" renders images of groups of modules.
groupsJson
object
Promise
<{ [key: string]
: string
; }>
â–¸ selectExternalObjectGroup(groupId
): Promise
<void
>
"selectExternalObjectGroup" changes the selected object in the scene. The function selects a complete group of root modules and always switches to planning mode. If the group consists of only one root module, this is equivalent to selecting a single root module.
groupId
string
The ID of the group of modules.
Promise
<void
>
â–¸ selectExternalObjectRootModule(rootModuleId
): Promise
<void
>
"selectExternalObjectRootModule" changes the selected object in the scene. The function selects a root module within a group and always switches to planning mode.
rootModuleId
string
The ID of the root module.
Promise
<void
>
â–¸ selectExternalObjectSubModule(rootModuleId
, subModuleId
): Promise
<void
>
"selectExternalObjectSubModule" changes the selected object in the scene. The function selects a sub module a root module and always switches to configuration mode.
rootModuleId
string
The ID of the root module.
subModuleId
string
The ID of the sub module.
Promise
<void
>
string
|