Model

boolean rw autoCalculate

True if autocalculate is currently enabled for this model.


Chart ro chart

The current view if it is a chart, or null otherwise. See the view property documentation for an explanation of how the current view is determined.


SNamedList<Chart> ro charts

The list of all charts in this model.


SNamedCreateList<Matrix> ro matrices

The list of all matrices in this model.


Matrix ro matrix

The current view if it is a matrix, or null otherwise. See the view property documentation for an explanation of how the current view is determined.


MatrixView ro matrixView

The current view if it is a matrix view, or null otherwise.See the view property documentation for an explanation of how the current view is determined.


SNamedList<MatrixView> ro matrixViews

The list of all matrix views in this model.


String wo message

Use this to set the current progress message. Use with progress to update the progress panel.


Presentation ro presentation

The current view if it is a presentation, or null otherwise. See the view property documentation for an explanation of how the current view is determined.


SNamedCreateList<Presentation> ro presentations

The list of all presentations in this model.


double wo progress

Use this to set the current progress of your script operation (0 - 1). Use with message to update the progress panel.


String ro role

The name of the role that is currently logged in to the model and running the script.


Category ro selectedCategory

Returns the active selection within this model if it is a category selection, or null otherwise.


CellSelection ro selectedCells

Returns the active selection within this model if it is a cell selection, or null otherwise.


GroupOrItemSelection ro selectedGroupsOrItems

Returns the active selection within this model if it is a group or item selection, or null otherwise.


View ro view

Returns the current view for this model. The current view is the last view whose tab was clicked, unless an item was selected in the Model Browser since the last tab click in which case the Model Browser selection takes precedence. Returns null if no tabs are open and there is no Model Browser selection.


SNamedList<View> ro views

The list of all views in this model.


boolean canPushAll()

Returns true if this model can execute all pushes specified by its configurations.


boolean canUpdateAllDataLinks()

True if this model can update all its DataLinks.


void close()

Closes this model.


void ensureCalculated()

Forces completion of any pending calculations for this model, and returns only after they have finished.


DelimitedTextExporter exportDelimitedText()

Returns a new delimited text exporter for this model.


ExcelExporter exportExcel()

Returns a new excel exporter for this model.


PDFExporter exportPDF()

Returns a new pdf exporter for this model. This exporter will only function in the Qloud.


void openPerspective(String name)

Opens the perspective with the given name, if it exists.


Parameters:
name 


Object performWithAuthentication(String username, String password, Closure<Object> closure)

Performs the closure with the username and password passed in for authorization as in performWithAuthentication("user","pw"){|Matrix1|.updateDataLink()}. Please note that this is intended for providing authentication to (for example) web services or databases - it does NOT allow you to escalate privileges within the model (using a Quantrix username and password here will do nothing). For such privilege escalation, use a privileged {} block instead. WARNING: Storing passwords in the model is not secure.


Parameters:
username 
password 
closure 


ModelPublisher publish(String name)

Returns a publisher for this model. The published model will have the name name.


Parameters:
name 


void pushAll()

Pushes all data specified by the DataPush configurations in this model.


void pushAll(Map<String, String> promptFieldsToValuesMap)

Pushes all data specified by the DataPush configurations in this model. The values in the promptFieldsToValues map will be used to populate prompt type custom fields.


Parameters:
promptFieldsToValuesMap 


void recalculate()

Recalculate any cells that need it and waits for it to finish. This is most often used if Auto Calculate has been turned off or to recalculate functions such as now(), today(), and rand().


void recalculateAll()

Perform a complete recalculation of every cell in the model and waits for it to finish. Depending on how complex your model is, this can be quite time-consuming. Under most circumstances, recalculate() is a better option.


void refreshAllDataImportMatrices()

Updates any matrices in the given model that reference a data source and can be updated.


void refreshAllDataNAVMatrices()

Updates any matrices in the given model that reference a data source and can be updated. Deprecated - use refreshAllDataImportMatrices()


void save()

Saves this model.


void saveAs(String filename)

Saves a copy of this model to the specified file, which becomes the new working file.


Parameters:
filename 


void select(String selectionString)

Selects the values within this model that are indicated by selectionString.


Parameters:
selectionString 


void updateAllDataLinks()

Updates all DataLinks according to their respective DataLink configurations.