Below is the example of using the GetMs operation to get variable data. The request contains an instance of opened modeling container and data getting pattern. The response contains the workbook that includes variable data.
{ "GetMs" : { "tMs" : { "id" : "ABDCEIPPHFNBFOAEENCEKLAHPHGOOLIEGJBPFILIJAJFBPCP!M!S!CKKCPMIPPHFNBFOAELEOCFGAMOCFDJCMEOJLDMHNONLNFNAMH" }, "tArg" : { "pattern" : { "obInst" : "true", "item" : { "key" : "89669", "problem" : { "metamodel" : { "visualControllerPattern" : { "workbooks" : { "types" : { "Item" : "Variable" }, "key" : "true", "getWbkArg" : { "pattern" : { "obInst" : "true", "useGridAutoAdjust" : "true", "series" : "Get", "cellsTable" : { "headers" : "true", "slots" : { "elementKey" : "true", "elementName" : "true" }, "cells" : "true", "emptyCells" : "false", "getCellDate" : "true" } } }, "getEaxArg" : { "pattern" : { "obInst" : "true", "dataEditState" : "true", "dataSources" : "Get", "gridStyle" : { "all" : "true", "parts" : { "it" : "Table" } }, "grid" : "true", "useGridAutoAdjust" : "true" } } }, "useSourceName" : "false", "levelFormat" : "Short" } } } } }, "execParams" : { "scenarioKeys" : "", "execFillWithVariables" : { "entryKeys" : { "l" : "2" }, "scenarioKeys" : { "l" : "-1" } } } } } }
{ "GetMsResult" : { "id" : { "id" : "ABDCEIPPHFNBFOAEENCEKLAHPHGOOLIEGJBPFILIJAJFBPCP!M!S!CKKCPMIPPHFNBFOAELEOCFGAMOCFDJCMEOJLDMHNONLNFNAMH" }, "meta" : { "obInst" : { "obDesc" : { "@fullUrl" : "http:\/\/v-shp-development.dev.fs.fsight.world\/", "@isShortcut" : "0", "@isLink" : "0", "@ver" : "4", "@hf" : "0", "i" : "MODELSPACE", "n" : "Modeling container", "k" : "1581", "c" : "5121", "p" : "1580", "h" : "0", "hasPrv" : "0", "ic" : "0", "isPermanent" : "1", "isTemp" : "0" } }, "dirty" : "0", "item" : { "k" : "89669", "id" : "MODEL_NEW", "n" : "MODEL_NEW", "vis" : "1", "type" : "Problem", "problemMd" : { "metamodel" : { "k" : "89670", "visualController" : { "workbooks" : { "its" : { "Item" : { "key" : "92066", "getWbkResult" : { "id" : { "id" : "ABDCEIPPHFNBFOAEENCEKLAHPHGOOLIEGJBPFILIJAJFBPCP!M!S!WNMLHEMPPHFNBFOAEDPJLALPEMIMEKMCEPICNJELKMOBDNFBH" }, "meta" : { "obInst" : { "obDesc" : { "@fullUrl" : "http:\/\/v-shp-development.dev.fs.fsight.world\/", "@isShortcut" : "0", "@isLink" : "0", "@ver" : "1", "@hf" : "0", "i" : "VARIABLESWB_89670", "n" : "VariablesWorkBook", "k" : "92066", "c" : "2827", "p" : "89669", "h" : "0", "hasPrv" : "0", "ic" : "0", "isPermanent" : "0", "isTemp" : "0" } }, "dirty" : "1", "windowsPosition" : "Vertical", "hasPivot" : "0", "hasLaner" : "1", "series" : { "@count" : "1", "its" : { "it" : [ { "k" : "1", "id" : "OBJ1", "n" : "MyOutputVavable|A", "vis" : "1", "kind" : "Calculate", "selectedUnit" : "", "tag" : "2|-1", "hasChildren" : "0", "index" : "0", "expanded" : "0", "level" : "Year", "childrenCount" : "0", "visibleChildrenCount" : "0", "flags" : "0" } ] }, "displayDataAs" : "SourceValues", "autoRecalc" : "1", "createDerivedSeries" : "Default", "permanentData" : "0" }, "cellsTable" : { "@rowCount" : "1", "@columnCount" : "31", "columns" : { "dims" : { "it" : { "k" : "0", "id" : "calendar" } }, "slots" : { "s" : [ { "@date" : "1990-01-01", "els" : { "e" : { "k" : "YEARS:1990", "n" : "1990A1" } } }, { "@date" : "1991-01-01", "els" : { "e" : { "k" : "YEARS:1991", "n" : "1991A1" } } }, { "@date" : "1992-01-01", "els" : { "e" : { "k" : "YEARS:1992", "n" : "1992A1" } } }, { "@date" : "1993-01-01", "els" : { "e" : { "k" : "YEARS:1993", "n" : "1993A1" } } }, { "@date" : "1994-01-01", "els" : { "e" : { "k" : "YEARS:1994", "n" : "1994A1" } } }, { "@date" : "1995-01-01", "els" : { "e" : { "k" : "YEARS:1995", "n" : "1995A1" } } }, { "@date" : "1996-01-01", "els" : { "e" : { "k" : "YEARS:1996", "n" : "1996A1" } } }, { "@date" : "1997-01-01", "els" : { "e" : { "k" : "YEARS:1997", "n" : "1997A1" } } }, { "@date" : "1998-01-01", "els" : { "e" : { "k" : "YEARS:1998", "n" : "1998A1" } } }, { "@date" : "1999-01-01", "els" : { "e" : { "k" : "YEARS:1999", "n" : "1999A1" } } }, { "@date" : "2000-01-01", "els" : { "e" : { "k" : "YEARS:2000", "n" : "2000A1" } } }, { "@date" : "2001-01-01", "els" : { "e" : { "k" : "YEARS:2001", "n" : "2001A1" } } }, { "@date" : "2002-01-01", "els" : { "e" : { "k" : "YEARS:2002", "n" : "2002A1" } } }, { "@date" : "2003-01-01", "els" : { "e" : { "k" : "YEARS:2003", "n" : "2003A1" } } }, { "@date" : "2004-01-01", "els" : { "e" : { "k" : "YEARS:2004", "n" : "2004A1" } } }, { "@date" : "2005-01-01", "els" : { "e" : { "k" : "YEARS:2005", "n" : "2005A1" } } }, { "@date" : "2006-01-01", "els" : { "e" : { "k" : "YEARS:2006", "n" : "2006A1" } } }, { "@date" : "2007-01-01", "els" : { "e" : { "k" : "YEARS:2007", "n" : "2007A1" } } }, { "@date" : "2008-01-01", "els" : { "e" : { "k" : "YEARS:2008", "n" : "2008A1" } } }, { "@date" : "2009-01-01", "els" : { "e" : { "k" : "YEARS:2009", "n" : "2009A1" } } }, { "@date" : "2010-01-01", "els" : { "e" : { "k" : "YEARS:2010", "n" : "2010A1" } } }, { "@date" : "2011-01-01", "els" : { "e" : { "k" : "YEARS:2011", "n" : "2011A1" } } }, { "@date" : "2012-01-01", "els" : { "e" : { "k" : "YEARS:2012", "n" : "2012A1" } } }, { "@date" : "2013-01-01", "els" : { "e" : { "k" : "YEARS:2013", "n" : "2013A1" } } }, { "@date" : "2014-01-01", "els" : { "e" : { "k" : "YEARS:2014", "n" : "2014A1" } } }, { "@date" : "2015-01-01", "els" : { "e" : { "k" : "YEARS:2015", "n" : "2015A1" } } }, { "@date" : "2016-01-01", "els" : { "e" : { "k" : "YEARS:2016", "n" : "2016A1" } } }, { "@date" : "2017-01-01", "els" : { "e" : { "k" : "YEARS:2017", "n" : "2017A1" } } }, { "@date" : "2018-01-01", "els" : { "e" : { "k" : "YEARS:2018", "n" : "2018A1" } } }, { "@date" : "2019-01-01", "els" : { "e" : { "k" : "YEARS:2019", "n" : "2019A1" } } }, { "@date" : "2020-01-01", "els" : { "e" : { "k" : "YEARS:2020", "n" : "2020A1" } } } ] } }, "rows" : { "dims" : { "it" : { "k" : "0", "id" : "series" } }, "slots" : { "s" : { "els" : { "e" : { "k" : "MyOutputVavable|A", "n" : "MyOutputVavable|A" } } } } }, "cells" : { "c" : [ { "@v" : "3", "@dt" : "3", "@row" : "0", "@column" : "0", "@date" : "1990-01-01" }, { "@v" : "7", "@dt" : "3", "@row" : "0", "@column" : "1", "@date" : "1991-01-01" }, { "@v" : "2", "@dt" : "3", "@row" : "0", "@column" : "2", "@date" : "1992-01-01" }, { "@v" : "6", "@dt" : "3", "@row" : "0", "@column" : "3", "@date" : "1993-01-01" }, { "@v" : "4", "@dt" : "3", "@row" : "0", "@column" : "4", "@date" : "1994-01-01" }, { "@v" : "1", "@dt" : "3", "@row" : "0", "@column" : "5", "@date" : "1995-01-01" }, { "@v" : "5", "@dt" : "3", "@row" : "0", "@column" : "6", "@date" : "1996-01-01" }, { "@v" : "3.42857143", "@dt" : "3", "@row" : "0", "@column" : "7", "@date" : "1997-01-01" }, { "@v" : "3.28571429", "@dt" : "3", "@row" : "0", "@column" : "8", "@date" : "1998-01-01" }, { "@v" : "3.14285714", "@dt" : "3", "@row" : "0", "@column" : "9", "@date" : "1999-01-01" }, { "@v" : "3", "@dt" : "3", "@row" : "0", "@column" : "10", "@date" : "2000-01-01" }, { "@v" : "2.85714286", "@dt" : "3", "@row" : "0", "@column" : "11", "@date" : "2001-01-01" }, { "@v" : "2.71428571", "@dt" : "3", "@row" : "0", "@column" : "12", "@date" : "2002-01-01" }, { "@v" : "2.57142857", "@dt" : "3", "@row" : "0", "@column" : "13", "@date" : "2003-01-01" }, { "@v" : "2.42857143", "@dt" : "3", "@row" : "0", "@column" : "14", "@date" : "2004-01-01" }, { "@v" : "2.28571429", "@dt" : "3", "@row" : "0", "@column" : "15", "@date" : "2005-01-01" }, { "@v" : "2.14285714", "@dt" : "3", "@row" : "0", "@column" : "16", "@date" : "2006-01-01" }, { "@v" : "2", "@dt" : "3", "@row" : "0", "@column" : "17", "@date" : "2007-01-01" }, { "@v" : "1.85714286", "@dt" : "3", "@row" : "0", "@column" : "18", "@date" : "2008-01-01" }, { "@v" : "1.71428571", "@dt" : "3", "@row" : "0", "@column" : "19", "@date" : "2009-01-01" }, { "@v" : "1.57142857", "@dt" : "3", "@row" : "0", "@column" : "20", "@date" : "2010-01-01" }, { "@v" : "1.42857143", "@dt" : "3", "@row" : "0", "@column" : "21", "@date" : "2011-01-01" }, { "@v" : "1.28571429", "@dt" : "3", "@row" : "0", "@column" : "22", "@date" : "2012-01-01" }, { "@v" : "1.14285714", "@dt" : "3", "@row" : "0", "@column" : "23", "@date" : "2013-01-01" }, { "@v" : "1", "@dt" : "3", "@row" : "0", "@column" : "24", "@date" : "2014-01-01" }, { "@v" : "0.85714286", "@dt" : "3", "@row" : "0", "@column" : "25", "@date" : "2015-01-01" }, { "@v" : "0.71428571", "@dt" : "3", "@row" : "0", "@column" : "26", "@date" : "2016-01-01" }, { "@v" : "0.57142857", "@dt" : "3", "@row" : "0", "@column" : "27", "@date" : "2017-01-01" } ] } } } }, "getEaxResult" : { "id" : { "id" : "" }, "meta" : { "obInst" : { "obDesc" : { "@fullUrl" : "http:\/\/v-shp-development.dev.fs.fsight.world\/", "@isShortcut" : "0", "@isLink" : "0", "@ver" : "1", "@hf" : "0", "i" : "VARIABLESWB_89670", "n" : "VariablesWorkBook", "k" : "92066", "c" : "2827", "p" : "89669", "h" : "0", "hasPrv" : "0", "ic" : "0", "isPermanent" : "0", "isTemp" : "0" } }, "dirty" : "1", "dataEditState" : { "readOnly" : "0", "modified" : "0", "modifiedSeries" : "0" }, "dataSources" : { "its" : "" }, "grid" : { "visible" : "1", "active" : "1", "enabled" : "1", "viewScale" : "1", "viewSize" : { "width" : "-1", "height" : "-1", "units" : "DLU96" }, "sizeChanged" : "0", "viewOrder" : "0", "available" : "1", "syncIndicators" : "0", "style" : { "defaultStyle" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "Font" : { "@B" : "false", "@S" : "8", "@C" : "#000000", "@F" : "Arial", "@H" : "12", "@I" : "false" }, "Borders" : "", "Hyperlink" : "" }, "fixedCorner" : { "Text" : { "@VA" : "1", "@HA" : "-1", "@M" : "7px 6px 8px 6px", "@WW" : "1" }, "NumberFormat" : { "@F" : "", "@FT" : "0" }, "Borders" : "", "Hyperlink" : "" }, "topHeader" : { "Text" : { "@VA" : "1", "@HA" : "2", "@M" : "7px 6px 8px 6px", "@WW" : "1" }, "NumberFormat" : { "@F" : "", "@FT" : "0" }, "Borders" : "", "Hyperlink" : "" }, "leftHeader" : { "Text" : { "@VA" : "1", "@HA" : "1", "@M" : "7px 6px 8px 6px", "@WW" : "0" }, "NumberFormat" : { "@F" : "", "@FT" : "0" }, "Borders" : "", "Hyperlink" : "" }, "internals" : { "Text" : { "@VA" : "1", "@HA" : "0", "@M" : "7px 6px 8px 6px", "@WW" : "1" }, "NumberFormat" : { "@F" : "#,##0.00", "@FT" : "1" }, "Borders" : "", "Hyperlink" : "" }, "ABC" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "Borders" : "", "Hyperlink" : "" }, "ABCHeader" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "Font" : { "@B" : "true" }, "Borders" : "", "Hyperlink" : "" }, "ABCTop" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "Fill" : { "@C" : "#20B8F2" }, "Borders" : "", "Hyperlink" : "" }, "ABCBottom" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "Fill" : { "@C" : "#FF8F45" }, "Borders" : "", "Hyperlink" : "" }, "highlightedCells" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "Font" : { "@B" : "true", "@C" : "#FF0000" }, "Borders" : "", "Hyperlink" : "" }, "changedCells" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "Font" : { "@B" : "true" }, "Borders" : "", "Hyperlink" : "" }, "virtualCells" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "Borders" : "", "Hyperlink" : "" }, "valueChange" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "NumberFormat" : { "@F" : "0.00%", "@FT" : "4" }, "Borders" : "", "Hyperlink" : "" }, "table" : { "Name" : "EAX table style", "Range" : { "left" : "0", "top" : "0", "width" : "0", "height" : "0" }, "Corner" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "Fill" : { "@C" : "#EEEEEE" }, "Borders" : "", "Hyperlink" : "" }, "FirstRow" : { "Width" : "1", "Style" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "Fill" : { "@C" : "#FFFFFF" }, "Borders" : "", "Hyperlink" : "" } }, "SecondRow" : { "Width" : "1", "Style" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "Fill" : { "@C" : "#F3F3F3" }, "Borders" : "", "Hyperlink" : "" } }, "FirstColumn" : { "Width" : "1" }, "SecondColumn" : { "Width" : "1" }, "HeaderRow" : { "Width" : "0", "Style" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "Fill" : { "@C" : "#EEEEEE" }, "Borders" : { "Border" : [ { "@S" : "0", "@C" : "#BBBBBB", "@I" : "2" }, { "@S" : "0", "@C" : "#BBBBBB", "@I" : "5" }, { "@S" : "0", "@C" : "#FFFFFF", "@I" : "6" }, { "@S" : "0", "@C" : "#FFFFFF", "@I" : "7" } ] }, "Hyperlink" : "" } }, "HeaderColumn" : { "Width" : "0", "Style" : { "Text" : { "@VA" : "-1", "@HA" : "-1", "@M" : "-1 -1 -1 -1", "@WW" : "-1" }, "Fill" : { "@C" : "#EEEEEE" }, "Borders" : { "Border" : [ { "@S" : "0", "@C" : "#BBBBBB", "@I" : "3" }, { "@S" : "0", "@C" : "#BBBBBB", "@I" : "4" }, { "@S" : "0", "@C" : "#FFFFFF", "@I" : "6" }, { "@S" : "0", "@C" : "#FFFFFF", "@I" : "7" } ] }, "Hyperlink" : "" } }, "FooterRow" : { "Width" : "0" }, "FooterColumn" : { "Width" : "0" }, "PredefinedStyle" : "ExtGreyStriped", "IsEmpty" : "0" }, "calcs" : "", "internalFormatConditions" : "", "totalsFormatConditions" : "", "ABCFormatConditions" : "", "rangeFormatConditions" : "", "rangeCellStyles" : "" }, "transposed" : "0", "displayLegend" : "0", "displayNumbers" : "0", "displayGrid" : "0", "fixHeaders" : "1", "fixHeadersOnPrint" : "1", "rowsHierarchical" : "1", "columnsHierarchical" : "1", "rowsHierarchyIndent" : "-1", "columnsHierarchyIndent" : "-1", "headerTitleType" : "None", "headerTitleContentType" : "Dim", "headerTitle" : "", "adjust" : { "mode" : "Simple", "minVisibleDataColumns" : "1", "maxRowsInCell" : "2" }, "isEnabledRowsGrowth" : "0", "isEnabledColsGrowth" : "0", "canEnableRowsGrowth" : "1", "canEnableColsGrowth" : "1", "dataDisplayMode" : "Interactive", "rowsSparklines" : "0", "columnsSparklines" : "0", "totalsSparklines" : "0", "legends" : { "md" : { "Legends" : { "Legend0" : { "@Marker" : "Custom", "@Type" : "Intervals", "@AutoColumnsCount" : "true", "@ColorApplying" : "Marker", "@NoDataVisible" : "true", "@CellSpacing" : "5.00000 5.00000", "@Mode" : "LessGreater", "@Visibility" : "Visible", "@HoverMode" : "MouseOver", "@HorizontalAlignment" : "Right", "@Format" : "#,##0.00", "@TextSpacing" : "3.00000", "@DoHighlight" : "false", "@IsOuter" : "true", "@NoDataPosition" : "After", "@Id" : "Legend0", "@TextHorizontalAlignment" : "Left", "@IncludeEquals" : "true", "@IsOverlap" : "false", "@ColumnCount" : "1", "@Padding" : "6.00000 6.00000 6.00000 6.00000", "@VerticalAlignment" : "Top", "@ContentAlignment" : "Center", "@Margin" : "0.00000 0.00000 0.00000 0.00000", "@ItemsOrder" : "LeftToRight", "Style" : { "Release" : { "Font" : { "@IsItalic" : "false", "@IsUnderline" : "false", "@FontFamily" : "Calibri", "@Size" : "12.00000", "@IsBold" : "false", "@Color" : "#FF505050" }, "Background" : { "@PPType" : "PP.SolidColorBrush", "@Opacity" : "1.00000", "@Color" : "#EFEFEF" } } }, "EqualFormat" : { "@IsAuto" : "true" }, "MarkerImage" : { "@ResourceId" : "TRANSPARENT" }, "MarkerImageMask" : { "@ResourceId" : "TEXTCOLORLEGENDICON" }, "GreaterFormat" : { "@IsAuto" : "true" }, "LessFormat" : { "@IsAuto" : "true" }, "BetweenFormat" : { "@IsAuto" : "true" }, "NoDataText" : { "@IsAuto" : "true" }, "Header" : { "@Padding" : "0.00000 0.00000 0.00000 0.00000", "@IsVisible" : "true", "@NoDataText" : "", "@TextWrapping" : "WrapWithEllipsis", "@Margin" : "0.00000 0.00000 0.00000 11.00000", "@Alignment" : "Center", "Style" : { "Release" : { "Font" : { "@IsItalic" : "false", "@IsUnderline" : "false", "@FontFamily" : "Calibri", "@Size" : "12.00000", "@IsBold" : "false", "@Color" : "#FF505050" } } }, "MaskText" : { "@IsAuto" : "true" }, "NoDataText" : { "@IsAuto" : "true" }, "Text" : { "@IsAuto" : "true" } } }, "Legend1" : { "@MinValue" : "0.00000", "@Type" : "Size", "@Marker" : "Custom", "@MaxValue" : "0.00000", "@IsOverlap" : "false", "@Padding" : "6.00000 6.00000 6.00000 6.00000", "@Visibility" : "Visible", "@HorizontalAlignment" : "Right", "@Format" : "", "@VerticalAlignment" : "Top", "@TextSpacing" : "10.00000", "@IsOuter" : "true", "@Id" : "Legend1", "@Margin" : "0.00000 0.00000 0.00000 0.00000", "Style" : { "Release" : { "Font" : { "@IsItalic" : "false", "@IsUnderline" : "false", "@FontFamily" : "Calibri", "@Size" : "12.00000", "@IsBold" : "false", "@Color" : "#FF505050" }, "Background" : { "@PPType" : "PP.SolidColorBrush", "@Opacity" : "1.00000", "@Color" : "#EFEFEF" } } }, "MaxValueFormat" : { "@IsAuto" : "false", "@Value" : "{0:0.00}" }, "MinValueFormat" : { "@IsAuto" : "false", "@Value" : "{0:0.00}" }, "MinMarkerImage" : { "@Width" : "32", "@Source" : "data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACHSURBVFhH7ZHBCYAwEASvBWvJX1DSQlqwBVuwBVuwJ1uwBd2Vi4gvQbzXDiwx62P0zoQQQogvtF2\/IatfY4E4U47sSPI6DkhnZEIWnl7HASnHn5CBz17HAGGpUpwNwjXk82UEkHH8lN4TswaI+Mccf\/GK3cjOr\/9C8VOGe13D9VFCCCHEO8wOnREwX6ApumAAAAAASUVORK5CYII=", "@Height" : "32" }, "MaxMarkerImage" : { "@Width" : "32", "@Source" : "data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFQSURBVFhH7Zb9DYIwEMVZwRVcwf9NNK7ACqzACqzgCq7gCqzACqygv5KredaPtNCamPCSC3C9vgd37ZVqxYq\/xP5wbLGbWG1DvwGCY\/ACVxsqD8ROgbi3rYWUBUJnEdX71kLKAZEN5tN\/xTQbvYWVAyKNCE5fzFXXw24KLAUELiI21ZxrJ75uCiwByF36vdAj3dxrGQZz5wfkuvefFhzPWoaTufMC4l5EnrYcz1qGs7nzwQmKwMtqx6dlcNnY2FAeQPgx\/R74tQx5WzOEg5C\/3Wr4tQwXcy8HZFHNJohzlqcMEOmXfW23jGsZ8rTmgDTFlrdmSOqANNWWnZAQaOuNSilx2i\/ml4HJ2nqdRS0q4nTLzm\/NTNaTL3pbERu++LzWzER33nuSxtxRIF5Ll35CMklbb3JrJV6zN5o7HkzS1Z98uDBH\/5yc\/eZ\/ccUfoqru\/Rsv7haParsAAAAASUVORK5CYII=", "@Height" : "32" }, "Header" : { "@Padding" : "0.00000 0.00000 0.00000 0.00000", "@IsVisible" : "true", "@NoDataText" : "", "@TextWrapping" : "WrapWithEllipsis", "@Margin" : "0.00000 0.00000 0.00000 11.00000", "@Alignment" : "Center", "Style" : { "Release" : { "Font" : { "@IsItalic" : "false", "@IsUnderline" : "false", "@FontFamily" : "Calibri", "@Size" : "12.00000", "@IsBold" : "false", "@Color" : "#FF505050" } } }, "MaskText" : { "@IsAuto" : "true" }, "NoDataText" : { "@IsAuto" : "true" }, "Text" : { "@IsAuto" : "true" } } }, "Legend2" : { "@Marker" : "Rectangle", "@Type" : "Intervals", "@AutoColumnsCount" : "true", "@ColorApplying" : "Marker", "@NoDataVisible" : "true", "@CellSpacing" : "5.00000 5.00000", "@Mode" : "LessGreater", "@Visibility" : "Visible", "@HoverMode" : "MouseOver", "@HorizontalAlignment" : "Right", "@Format" : "", "@TextSpacing" : "3.00000", "@DoHighlight" : "false", "@IsOuter" : "true", "@NoDataPosition" : "After", "@Id" : "Legend2", "@TextHorizontalAlignment" : "Left", "@IncludeEquals" : "true", "@IsOverlap" : "false", "@ColumnCount" : "1", "@Padding" : "6.00000 6.00000 6.00000 6.00000", "@VerticalAlignment" : "Top", "@ContentAlignment" : "Center", "@Margin" : "0.00000 0.00000 0.00000 0.00000", "@ItemsOrder" : "LeftToRight", "Style" : { "Release" : { "Font" : { "@IsItalic" : "false", "@IsUnderline" : "false", "@FontFamily" : "Calibri", "@Size" : "12.00000", "@IsBold" : "false", "@Color" : "#FF505050" }, "Background" : { "@PPType" : "PP.SolidColorBrush", "@Opacity" : "1.00000", "@Color" : "#EFEFEF" } } }, "EqualFormat" : { "@IsAuto" : "true" }, "GreaterFormat" : { "@IsAuto" : "true" }, "LessFormat" : { "@IsAuto" : "true" }, "BetweenFormat" : { "@IsAuto" : "true" }, "NoDataText" : { "@IsAuto" : "true" }, "Header" : { "@Padding" : "0.00000 0.00000 0.00000 0.00000", "@IsVisible" : "true", "@NoDataText" : "", "@TextWrapping" : "WrapWithEllipsis", "@Margin" : "0.00000 0.00000 0.00000 11.00000", "@Alignment" : "Center", "Style" : { "Release" : { "Font" : { "@IsItalic" : "false", "@IsUnderline" : "false", "@FontFamily" : "Calibri", "@Size" : "12.00000", "@IsBold" : "false", "@Color" : "#FF505050" } } }, "MaskText" : { "@IsAuto" : "true" }, "NoDataText" : { "@IsAuto" : "true" }, "Text" : { "@IsAuto" : "true" } } }, "Legend3" : { "@MinValue" : "6.00000", "@Type" : "Size", "@Marker" : "Custom", "@MaxValue" : "18.00000", "@IsOverlap" : "false", "@Padding" : "6.00000 6.00000 6.00000 6.00000", "@Visibility" : "Visible", "@HorizontalAlignment" : "Center", "@Format" : "# ##0,00", "@VerticalAlignment" : "Center", "@TextSpacing" : "10.00000", "@IsOuter" : "true", "@Id" : "Legend3", "@Margin" : "0.00000 0.00000 0.00000 0.00000", "Style" : { "Release" : { "Font" : { "@IsItalic" : "false", "@IsUnderline" : "false", "@FontFamily" : "Calibri", "@Size" : "12.00000", "@IsBold" : "false", "@Color" : "#FF505050" }, "Background" : { "@PPType" : "PP.SolidColorBrush", "@Opacity" : "1.00000", "@Color" : "#EFEFEF" } } }, "MaxValueFormat" : { "@IsAuto" : "false", "@Value" : "18,00" }, "MinValueFormat" : { "@IsAuto" : "false", "@Value" : "6,00" }, "MinMarkerImage" : { "@Width" : "32", "@Source" : "data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEBSURBVFhHxZMxD8FQFIX9PgmrsAqTRGIWk0FYxY4ZiwU7Ozs\/oIOx4+W85MojZ6rnGL6092t77+ltWjKzv0KlEiqVUKmESiVUKqFSCZVKqFRCpRIqlVCphMqY5nBzf2IFubOeMVTGoFGe54XAs5\/9PqEyxgMcjyc7Xy6WZZnNF0vb7Q\/BxzWu4\/x6u6UNgIblSjU0R5BavRGGeTCvcc90NrP+YJB+AxgO\/I2brfbbBlB3e71X0KQBMATNAVbtA3FcrTevGsNH43HYQvINYNXAzxHKv7XXwO9JFqAz2YZGBfn+N\/w1VCqhUgmVSqhUQqUSKpVQqYRKJVQqoVIJlTqs9AAV\/Pr88\/9WbQAAAABJRU5ErkJggg==", "@Height" : "32" }, "MaxMarkerImage" : { "@Width" : "32", "@Source" : "data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAErSURBVFhH7ZWxTgJBFEX3E\/wiEyxNoCXaEqxMTKgNFQXB1tCDtdrYKD320MMHbEG55ZP7zCRvhxuMJlwoLM7uzpk3M3dfNtnCzI4KlUqoVEKlEiqVUKmESiVUKqFSCZVKis7g9WzLZouJ2cQAVlWVFJzpAXD5D8ACTKZPdt64sNV67eP21bWPwfNLvT6fWyyXdtls+fiu16vVJvYGeP+Y+UJsEAPEmkg+h\/Cd7o0\/I0jaI\/JjB7AoD4AxNsQbxtp8DsANRyMPE2sTvw6QQGfu+\/2ay+fm80\/vAALgXpblTu1BA+D+OB77wdgDgfLavQHwIWFhAi1Nz3gjhEJrcVA6JM7F9X\/uwKE5rQC3D28uxHz\/C3A5JlQqoVIJlUqoVEKlEiqVUKmESh1WfAE6KHMXvxr0twAAAABJRU5ErkJggg==", "@Height" : "32" }, "Header" : { "@Padding" : "0.00000 0.00000 0.00000 0.00000", "@IsVisible" : "true", "@NoDataText" : "", "@TextWrapping" : "WrapWithEllipsis", "@Margin" : "0.00000 0.00000 0.00000 11.00000", "@Alignment" : "Center", "Style" : { "Release" : { "Font" : { "@IsItalic" : "false", "@IsUnderline" : "false", "@FontFamily" : "Calibri", "@Size" : "12.00000", "@IsBold" : "false", "@Color" : "#FF505050" } } }, "MaskText" : { "@IsAuto" : "true" }, "NoDataText" : { "@IsAuto" : "true" }, "Text" : { "@IsAuto" : "false", "@Value" : "Value: " } } } } }, "legendAssignment" : { "it" : [ { "Key" : "Value", "Value" : { "index" : "3", "id" : "Legend3" } }, { "Key" : "BackgroundColor", "Value" : { "index" : "2", "id" : "Legend2" } }, { "Key" : "FontColor", "Value" : { "index" : "0", "id" : "Legend0" } }, { "Key" : "FontSize", "Value" : { "index" : "1", "id" : "Legend1" } } ] } }, "hyperlinksAsText" : "0", "footnotesOptions" : { "position" : "None", "percentWidth" : "-1", "percentHeight" : "-1" }, "highlightEvaluatedCells" : "0" }, "windowsPosition" : "Vertical", "hasPivot" : "0" } } } } }, "userRPath" : "", "isRExist" : "0" }, "suppressEmptyFilter" : { "suppressEmpty" : "0", "suppressEmptyArea" : "SerieBounds" }, "readOnly" : "0", "variableTestUseR" : "0", "calculateIdentOnFact" : "0" }, "useScenarios" : "0", "readOnly" : "0" } } } } }
The GetMsOpenVar function gets data of the first input variable in the equation. Input parameters:
ms. Opened modeling container instance.
modelKey. Key of the model that contains the equation.
eq. Equation.
After execution the function returns the data series that corresponds to the first input variable in the equation. Variable data is displayed in the console window.
public static LnSerie GetMsOpenVar(MsId ms, ulong modelKey, MsModel eq) { // Get input variable MsFormulaTransformVariable inp = eq.transform.inputs.its.GetValue(0) as MsFormulaTransformVariable; var getMsOp = new GetMs(); getMsOp.tMs = ms; getMsOp.tArg = new GetMsArg() { // Set data getting pattern pattern = new MsMdPattern() { item = new MsItemPattern() { // Specify model key key = modelKey, problem = new MsProblemPattern() { metamodel = new MsMetaModelPattern() { // Set metamodel visual building pattern visualControllerPattern = new MsMetaModelVisualControllerPattern() { levelFormat = MsLevelFormat.Short, useSourceName = false, workbooks = new MsWorkbookPattern() { key = true, types = new MsWorkbookType[] { MsWorkbookType.Variable },// Set internal express view getting pattern getEaxArg = new GetEaxMdArg() { pattern = new EaxMdPattern() { dataEditState = true, dataSources = ListOperation.Get, grid = true, gridStyle = new EaxGridStylePattern() { all = true, parts = new EaxGridStylePart[] { EaxGridStylePart.Table } } } },// Set internal workbook getting pattern getWbkArg = new GetWbkMdArg() { pattern = new WbkMdPattern() { cellsTable = new WbkCellsTablePattern() { headers = true, slots = new PvtSlotPattern() { elementKey = true, elementName = true }, cells = true, emptyCells = false, }, series = ListOperation.Get } } } } } } } },// Set operation execution parameters execParams = new MsMdExecParams() { scenarioKeys = new long[]{}, //slice = model.metamodel.visualController.freeVariables.its.GetValue(0) as MsFormulaTransformSlice, execFillWithVariables = new MsMdExecFillWithVariables() { entryKeys = new long[] { (long)inp.k }, scenarioKeys = new long[] { -1 } } } }; // Create a proxy object for operation execution var somClient = new SomPortTypeClient(); // Open variable GetMsResult getMsResult = somClient.GetMs(getMsOp); MsMd k= getMsResult.meta; // Display variable data MsMetaModelVisualController metaVC = getMsResult.meta.item.problemMd.metamodel.visualController; MsWorkbook wbk = metaVC.workbooks.its.GetValue(0) as MsWorkbook; WbkMd meta = wbk.getWbkResult.meta; LnSerie series = meta.series.its.GetValue(0) as LnSerie; Console.WriteLine("Variable:" + series.n); WbkCellsTable table = meta.cellsTable; int ar = table.cells.Length; Console.WriteLine("Data - Value"); for (int i = 0; i <= (ar - 1); i++) { Console.Write((table.cells.GetValue(i) as PvtTableCell).date + " - "); Console.WriteLine((table.cells.GetValue(i) as PvtTableCell).v); }; return series; }
See also: