WbkDocument.OpenRub

Syntax

OpenRub: Object;

Description

The OpenRub property determines time series database.

Comments

Time series database is determined if a directory opens right away. If the database was not opened at the start, the method returns null.

Example

To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component) and a time series database with the 112 key. The following code must be added in the document opening event handler:

	var createWbkFromRubButt = new PP.Ui.Button({
		ParentNode: document.body, //DOM parent node
		Content: "Create Book", //Text      
		Click: PP.Delegate(onClickCreateWbkFromRub)     
	}); 
				
	function onClickCreateWbkFromRub(){
		//Create a workbook from time series database and open it
		tsService.createWbkFromRub(112, PP.Delegate(onResponse));
	}
				
	function onResponse(sender, args){
		var wbk = args.Workbook;
		//Get time series database
		var openRub = wbk.getOpenRub();
		alert("Time series database name : " + openRub.meta.obInst.obDesc.n);
	}

After executing the example the WorkbookBox component and the button named New Book are placed in the HTML page. Clicking this button creates a workbook based on time series database and opens this workbook. An appropriate message shows name of the received time series database.

See also:

WbkDocument