private Plot convert_Ele_to_plot(PlotFunctionElement p) { Plot p1 = new Plot(); p1.Command = p.getPlotFunction(); p1.PaneNum = p.getPeno() == null ? 0 : int.Parse(p.getPeno().getText()); if (mVariableMap.ContainsKey(p.getData().getText())) { double[,] temp = ((MatrixVariableDeclaration)(mVariableMap[p.getData().getText()])).getdoubleValue(); p1.Data = p.getData().getText() == null ? null : temp; } p1.Mode = p.getMode() == null ? 0 : int.Parse(p.getMode().getText()); p1.Dimensions = p.getPlotType() == null ? 0 : p.getPlotType() == "2D" ? 2 : 3; p1.PlotTitle = p.getTitle() == null ? "" : p.getTitle().getText(); p1.X_Fact = p.getXFact() == null ? 1.0 : double.Parse(p.getXFact().getText()); p1.Y_Fact = p.getYFact() == null ? 1.0 : double.Parse(p.getYFact().getText()); p1.Z_Fact = p.getZFact() == null ? 1.0 : double.Parse(p.getZFact().getText()); p1.X_Axis_Title = p.getXTitle() == null ? "" : p.getXTitle().getText(); p1.Y_Axis_Title = p.getYTitle() == null ? "" : p.getYTitle().getText(); p1.Z_Axis_Title = p.getZTitle() == null ? "" : p.getZTitle().getText(); p1.ScaleMode = p.getScaleMode() == null ? 1 : (p.getScaleMode() == "linear") ? 1 : 2; return (p1); }