Assembly: OpenTD.Results.dll Dataset representing data stored in a csv-style file. Each column is a series, while each row is a record. The first row contains DataItemIdentifiers. The second row contains units. Third and subsequent rows contain data. “NaN” or empty cells are treated as NaN. Default delimiters are comma and tab. All registers (except TIMEN) are considered dimensionless and their units are ignored. The name “time” (case-insensitive) can also be used for TIMEN.
Inheritance
object ← Dataset ← SimpleDataset ← SpreadsheetDataFileImplements
ISimpleDataset, IDatasetInherited Members
SimpleDataset.GetAllData(bool), SimpleDataset.GetData(DataItemIdentifierCollection), SimpleDataset.GetUdcaData(DataItemIdentifierCollection), SimpleDataset.Close(), SimpleDataset.ReOpen(), Dataset.GetData(DataItemIdentifierCollection), Dataset.GetUdcaData(DataItemIdentifierCollection), Dataset.GetData(params string[]), Dataset.GetData(ItemIdentifierCollection, DataSubtype, UnitsData), Dataset.GetDataAtRecord(DataSubtype, long), Dataset.GetRegisterDataAtRecord(long, DataSubtype, UnitsData), Dataset.GetUdfasAtRecord(long), Dataset.GetUdcaDataAtRecord(DataSubtype, long), Dataset.GetConstraintData(long, DataSubtype, UnitsData), Dataset.GetReliabilityData(long, DataSubtype, UnitsData), Dataset.GetRegisterData(string, DataSubtype, UnitsData), Dataset.GetRecordNumbers(), Dataset.GetRecordNumbersAsDataArray(), Dataset.GetRecordNames(), Dataset.GetTimes(), Dataset.GetTimesOrRecordNumbers(), Dataset.GetNsol(long), Dataset.GetNpcsrec(long), Dataset.GetSigma(), Dataset.GetAbszro(), Dataset.GetPatmos(), Dataset.GetLoopctData(), Dataset.GetLoopcoData(), Dataset.GetNamedInt(IntegerNames), Dataset.GetNamedInt(string), Dataset.GetNamedIntArray(ArrayIntegerNames), Dataset.GetNamedIntArray(string), Dataset.GetThermalSubmodels(), Dataset.GetFluidSubmodels(), Dataset.GetRegisterNames(), Dataset.GetLumpIds(string), Dataset.GetPathIds(string), Dataset.GetTieIds(string), Dataset.GetFtieIds(string), Dataset.GetIfaceIds(string), Dataset.GetNodeIds(string), Dataset.GetConductorIds(string), Dataset.GetInternalIndex(DataTypes, string, long), Dataset.GetInternalIndex(string), Dataset.Units, Dataset.UnitsChangedSinceLastRead(), Dataset.Source, Dataset.Close(), Dataset.ReOpen(), Dataset.UDFAManager, Dataset.GetUDFAManager(), Dataset.AutoNamer, Dataset.Name, Dataset.InternalSuggestedName, Dataset.GetSelfSuggestedName(), Dataset.ToString(), Dataset.AutoCommenter, Dataset.Comment, Dataset.InternalSuggestedComment, Dataset.GetSelfSuggestedComment(), Dataset.Relay<T_collection, T_item>(T_collection), Dataset.Relay<T_item>(List<T_item>), object.ToString(), object.Equals(object), object.Equals(object, object), object.ReferenceEquals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone()Constructors
SpreadsheetDataFile(string)
Parameters
pathname string
Fields
DisallowedDelimiters
Field Value
char[]Properties
Delimiters
An array of delimiters to use when parsing the input file. Defaults to comma and tab, i.e., either of those characters will be treated as a column delimiter when found in the input file. Cannot be any of the following since they’re used for units expressions: /-()^ or space.Property Value
char[]Pathname
Property Value
stringMethods
GetAbszro()
Returns
Dimensional<Temp>GetAllData(bool)
Parameters
includeXDataAsFirstArray bool
Returns
DataArrayCollectionGetConductorIds(string)
Parameters
submodel string
Returns
List<long>GetConstraintData(long, DataSubtype, UnitsData)
Parameters
constraintNumber long
subtype DataSubtype
units UnitsData
Returns
DataArrayGetDataAtRecord(DataSubtype, long)
Gets all data for a given subtype at a single record. If recordNum is invalid, or if no data of the given subtype exists at the record, will return an empty DataArray.Parameters
subtype DataSubtype
recordNum long
Returns
DataArrayExceptions
OpenTDException Thrown if theDataSubtype
represents a character UDFA.
GetFluidSubmodels()
Returns
List<string>GetFtieIds(string)
Parameters
submodel string
Returns
List<long>GetIfaceIds(string)
Parameters
submodel string
Returns
List<long>GetInternalIndex(DataTypes, string, long)
The 0-indexed position of the given Sinda entity in arrays returned by GetDataAtRecord. Returns -1 if entity can’t be found.Parameters
dataType DataTypes
submodel string
id long
Returns
longSee Also
Dataset.GetDataAtRecord(DataSubtype, long)GetLoopcoData()
Returns
List<long>GetLoopctData()
Returns
List<long>GetLumpIds(string)
Parameters
submodel string
Returns
List<long>GetNamedInt(string)
Parameters
name string
Returns
longGetNamedIntArray(string)
Parameters
name string
Returns
List<long>GetNodeIds(string)
Parameters
submodel string
Returns
List<long>GetNpcsrec(long)
Parameters
recordNum long
Returns
longGetNsol(long)
Parameters
recordNum long
Returns
longGetPathIds(string)
Parameters
submodel string
Returns
List<long>GetPatmos()
Returns
Dimensional<Pressure>GetRecordNames()
Returns
List<string>GetRecordNumbers()
SpreadsheetDataFiles don’t have record numbers, so this returns a list of sequential integers starting at 0.Returns
List<long>GetRegisterData(string, DataSubtype, UnitsData)
Gets all data for a register across all records. If data doesn’t exist at a record, NaN will be returned instead.Parameters
registerName string
subtype DataSubtype
units UnitsData
Returns
DataArrayGetRegisterDataAtRecord(long, DataSubtype, UnitsData)
Gets all register data at a single record. Use GetRegisterNames to get a list of register names in the same order as the data returned from this method. Or use GetInternalIndex to find the index of a specific register in this list. If recordNum is invalid, or if no register data exists at the record, will return an empty DataArray.Parameters
recordNum long
subtype DataSubtype
units UnitsData
Returns
DataArraySee Also
Dataset.GetRegisterNames(), Dataset.GetInternalIndex(DataTypes, string, long)GetRegisterNames()
Returns
List<string>GetReliabilityData(long, DataSubtype, UnitsData)
Parameters
reliabilityNumber long
subtype DataSubtype
units UnitsData
Returns
DataArrayGetSelfSuggestedName()
Returns
stringGetSigma()
Returns
Dimensional<StefanBoltzmann>GetThermalSubmodels()
Returns
List<string>GetTieIds(string)
Parameters
submodel string
Returns
List<long>GetTimes()
Returns
DataArrayGetUdcaDataAtRecord(DataSubtype, long)
Gets the UDFA of strings represented by aDataSubtype at a given record
Parameters
subtype DataSubtype
recordNum long
Record number from which to extract UDFA strings.
Returns
List<string> A list of character UDFA values.Exceptions
OpenTDException Thrown if theDataSubtype
represents a noncharacter UDFA.
GetUdfasAtRecord(long)
GetsDataSubtypes UDFA at the given record number.
Parameters
recordNum long
Record number from which to extract UDFA subtypes.
Returns
List<DataSubtype> A list ofDataSubtype objects.