Skip to main content

Controls

Controls for interacting with the cad window or elements which can be displayed or hidden, such as irradiance or lidar.

All controls are asynchronous and return a promise. Use await or .then to handle the resolved value and ensure proper execution order.

toggleFullScreen

Allows toggling between full screen and windows view

Usage

const library = await import('<script_url>');
const sdk = await library.load({ token: '<access_token>' });

sdk.cad.toggleFullScreen();

Signature

toggleFullScreen();

Returns

Promise<void>

getViewToggle

Retrieve the current visibility state of the controllable elements within the CAD screen

Usage

const library = await import('<script_url>');
const sdk = await library.load({ token: '<access_token>' });
const design = await sdk.design.load(designId);

const currentViewToggles = await design.getViewToggle();

Signature

getViewToggle();

Returns

A promise that resolves with the current view toggles as described in options-section: #options.

toggleView

Control visibility of elements within the CAD screen, such as trees or lidar

Usage

const library = await import('<script_url>');
const sdk = await library.load({ token: '<access_token>' });

const design = await sdk.design.load(designId);

await design.toggleView({
trees: true,
lidar: false,
irradianceMap: true,
});

Note that toggling irradianceMapPanels from on to off will automatically run the roof and panel irradiance analysis if the data is stale. See the section on the runIrradiance method for context.

Signature

toggleView([options]);

Parameters

parametertypenote
options
(required)
objectDetailed in Options below.

Returns

A promise that resolves when all of the provided elements have finished appearing or disappearing.

Options

All options are boolean values. A value of true will show the view, and false will hide it.

KeyDescription
azimuthArrowsShow/hide azimuth arrow visibility
buildingsShow/hide 3D building models
connectionsShow/hide connections between components.
designComponentsShow/hide design components
disabledPanelsShow/hide disabled panels
edgesShow/hide highlight of roof edges
electricalComponentsShow/hide electrical components
fillZonesShow/hide fill zones
groundShow/hide the ground.
irradianceMapShow/hide irradiance map texture on the roof model
irradianceMapPanelsShow/hide irradiance map texture on the solar panels
lidarShow/hide LIDAR shading map
mapImageryShow/hide map texture on the ground
measurementsShow/hide labels for roof measurements
projectCenterShow/hide the project center icon
setbacksShow/hide setbacks
shadowsShow/hide shadows on building models (ground shadows will remain visible regardless)
skyShow/hide sky texture
solarPanelsShow/hide solar panels
stringsShow/hide strings
sunpathShow/hide sun path (non-animated)
treesShow/hide tree models
walkwaysShow/hide walkways