public string NextObjectName(string prefix) { int i = 1; while (Sheets.Exists(sh => sh is GlobalSheet && sh.Sketch.Objects.Exists(obj => obj.Name == prefix + i))) { i++; } return(prefix + i); }
public string NextObjectName(string prefix, List <DrawableObject> list) { int i = 1; while (Sheets.Exists(sh => sh.Sketch.Objects.Exists(obj => obj.Name == prefix + i)) || list.Exists(obj => obj.Name == prefix + i)) { i++; } return(prefix + i); }
private string NextChildSheetName(string prefix) { int i = 1; while (Sheets.Exists(sh => sh.Name == prefix + i)) { i++; } return(prefix + i); }