Home Reference Source Repository
public class | source

MagiCloud

Method Summary

Public Methods
public

findOptimalSpeed(productId: string, systemTypeId: string, qv: number, dpTot: number): *

Find suitable fanSpeed for given operation point.

public

Return dimension image query url

public

getDpTot(productId: string, systemTypeId: string, qv: number, fanSpeed: number): *

Get pressure drop of curve at specific flow.

public

getImageQueryUrl(options: object): *

Return image query url

public

Return release info of MagiCloud Widget SDK in example Production 2.35.0

public

init(options: object, context: object)

Initialize MagiCloud Widget SDK

public

isLoggedIn(): *

Return information is user logged in.

public

load(options: object): Promise<ProductData>

Load and initialize MagiCloud Javascript Library

public

renderMagiCloudLogo(containerId: string, transparent: boolean)

Render MagiCloud logo to container with specified identified

public

setDiagram(data: object, options: object)

Set specified diagram and bind click event to given elementId.

public

signin(): Promise<void>

Signin.

public

signout(): Promise<void>

Signout current logged in user

Public Methods

public findOptimalSpeed(productId: string, systemTypeId: string, qv: number, dpTot: number): * source

Find suitable fanSpeed for given operation point.

Params:

NameTypeAttributeDescription
productId string

Product identifier (GUID)

systemTypeId string

Value = {Unknown, AnyFluid, SupplyFluid, ReturnFluid, ColdWater, HotWater, FireHydrant, HotSupplyFluid, Sprinkler, Sewer, AnyAir, SupplyAir, ExtractAir, OutdoorSupply, OutdoorExhau}

qv number

Specified flow

dpTot number

Pressure drop value

Return:

*

Example {PressureDrop: 107.4791, Succeed: true, Value: 6}

public getDimensionImageQueryUrl(options: object): * source

Return dimension image query url

Params:

NameTypeAttributeDescription
options object

{ QModelId: Optional QModelId of model, QModelParameters: Optional QModelParameters of model, ViewMode: one value of { 0=Rendered, 1=DimensionLabels, 2=DimensionValues }, ViewPosition: one value of { 0=Default, 1=Front, 2=Right, 3=Left, 4=Top, 5=Bottom, 6=IsometricLeft, 7=IsometricRight } }

Return:

*

Dimension image url

public getDpTot(productId: string, systemTypeId: string, qv: number, fanSpeed: number): * source

Get pressure drop of curve at specific flow.

Params:

NameTypeAttributeDescription
productId string

Product identifier (GUID)

systemTypeId string

Value = {Unknown, AnyFluid, SupplyFluid, ReturnFluid, ColdWater, HotWater, FireHydrant, HotSupplyFluid, Sprinkler, Sewer, AnyAir, SupplyAir, ExtractAir, OutdoorSupply, OutdoorExhau}

qv number

Specified flow

fanSpeed number

Specified Fan Speed

Return:

*

Example {Succeed: true, Value: 27.870676}

public getImageQueryUrl(options: object): * source

Return image query url

Params:

NameTypeAttributeDescription
options object

{ QModelId: Optional QModelId of model, QModelParameters: Optional QModelParameters of model, ViewPosition: one value of { 0=Default, 1=Front, 2=Right, 3=Left, 4=Top, 5=Bottom, 6=IsometricLeft, 7=IsometricRight } }

Return:

*

Image url

public getReleaseInfo(): string source

Return release info of MagiCloud Widget SDK in example Production 2.35.0

Return:

string

public init(options: object, context: object) source

Initialize MagiCloud Widget SDK

Params:

NameTypeAttributeDescription
options object

example object: { client_id: 'your_client_id', popup_redirect_uri: 'callback file url', enableX3D: true, // default value is true and x3dom library will be loaded onLoadUser: function(user) { console.log(user.username); }, // Set event handler to get signed in user if any exists e.g. case when page refreshed onSignin: function(user) { console.log(user.username); }, // Set event handler to perform some action on user signin onSignout: function() { console.log('user signed out'); }, // Set event handler to perform some action on user signout onRenderX3D: function() { console.log('x3d rendered'); }, // Set event handler to perform some action after rendering x3d image onGetDpTot function(result) { console.log(result); }, // Set event handler to perform some action with calculation result onFindOptimalSpeed: function(result) { console.log(result); } // Set event handler to perform some action with calculation result }

context object

(optional)

public isLoggedIn(): * source

Return information is user logged in.

Return:

*

boolean value is used logged in

public load(options: object): Promise<ProductData> source

Load and initialize MagiCloud Javascript Library

Params:

NameTypeAttributeDescription
options object

{ productId: string, articleNumber: string, manufacturerId: string }

Return:

Promise<ProductData>

Successful response will contain product/variant data

Render MagiCloud logo to container with specified identified

Params:

NameTypeAttributeDescription
containerId string

Container identifier

transparent boolean

Boolean value should transparent image be used

public setDiagram(data: object, options: object) source

Set specified diagram and bind click event to given elementId. Click event will add possible data to given dataElementId

Params:

NameTypeAttributeDescription
data object

Product data

options object

example { type: diagramType, elementId: 'el', dataElementId: 'dataEl' } where diagramType is one of { Ventilation, Heating, Cooling, SupplyAir, ExtractAir, Radiator, Pump }

public signin(): Promise<void> source

Signin. Will open MagiCloud login popup.

Return:

Promise<void>

public signout(): Promise<void> source

Signout current logged in user

Return:

Promise<void>