//TODO: Do we need both of these? //To get the TSD Document private TSD.TSDDocument GetTsdDocumentReadOnly() { tsdDocument = new TSD.TSDDocument(); if (!String.IsNullOrEmpty(tsdFilePath) && System.IO.File.Exists(tsdFilePath)) { tsdDocument.openReadOnly(tsdFilePath); } else if (!String.IsNullOrEmpty(tsdFilePath)) { tsdDocument.create(tsdFilePath); //What if an existing file has the same name? } else { BH.Engine.Base.Compute.RecordError("The TSD file does not exist"); } return(tsdDocument); }