/// <summary> /// Creates a new Layout that is a copy of the current instance. /// </summary> /// <param name="newName">Layout name of the copy.</param> /// <returns>A new Layout that is a copy of this instance.</returns> /// <remarks>The Model Layout cannot be cloned.</remarks> public override TableObject Clone(string newName) { if (Name == ModelSpaceName || newName == ModelSpaceName) { throw new NotSupportedException("The Model layout cannot be cloned."); } Layout copy = new Layout(newName, null, (PlotSettings)plot.Clone()) { TabOrder = tabOrder, MinLimit = minLimit, MaxLimit = maxLimit, BasePoint = basePoint, MinExtents = minExtents, MaxExtents = maxExtents, Elevation = elevation, UcsOrigin = origin, UcsXAxis = xAxis, UcsYAxis = yAxis, Viewport = (Viewport)viewport.Clone() }; foreach (XData data in XData.Values) { copy.XData.Add((XData)data.Clone()); } return(copy); }
public void Resize(Viewport viewport) { Viewport = viewport.Clone(); }