# Data

Provides (read) access to the FluidFlow databases for Pipes, Boundaries, Boosters, etc.
Function/Property | Description
GetPipes(Pipes: TRecordList; [Filter: string]): Integer | Fills Pipes with all the records from the Pipes database, and returns the number of records. See Script References | Pipe Data Record for more information about the record structure.
GetBoundaries(Boundaries: TRecordList; [Filter: string]): Integer | Fills Boundaries with all the records from the Boundaries database, and returns the number of records. See Script References | Boundary Data Record for more information about the record structure.
GetBoosters(Boosters: TRecordList; [Filter: string]): Integer | Fills Boosters with all the records from the Boosters database, and returns the number of records. See Script References | Booster Data Record for more information about the record structure.
GetValves(Valves: TRecordList; [Filter: string]): Integer | Fills Valves with all the records from the Valves database, and returns the number of records. See Script References | Valve Data Record for more information about the record structure.
GetControllers(Controllers: TRecordList; [Filter: string]): Integer | Fills Controllers with all the records from the Controllers database, and returns the number of records. See Script References | Controller Data Record for more information about the record structure.
GetCheckValves(CheckValves: TRecordList; [Filter: string]): Integer | Fills CheckValves with all the records from the CheckValves database, and returns the number of records. See Script References | Check Valve Data Record for more information about the record structure.
GetResistances(Resistances: TRecordList; [Filter: string]): Integer | Fills Resistances with all the records from the Resistances database, and returns the number of records. See Script References | Resistance Data Record for more information about the record structure.
GetReliefValves(ReliefValves: TRecordList; [Filter: string]): Integer | Fills ReliefValves with all the records from the ReliefValves database, and returns the number of records. See Script References | Relief Valve Data Record for more information about the record structure.
GetFluids(Fluids: TRecordList; [Filter: string]): Integer | Fills Fluids with all the records from the Fluids database, and returns the number of records. See Script References | Fluid Data Record for more information about the record structure.
GetSolids(Solids: TRecordList; [Filter: string]): Integer | Fills Solids with all the records from the Solids database, and returns the number of records. See Script References | Solid Data Record for more information about the record structure.
GetPulpPapers(PulpPapers: TRecordList; [Filter: string]): Integer | Fills PulpPapers with all the records from the PulpPapers database, and returns the number of records. See Script References | Pulp Paper Data Record for more information about the record structure.
GetManufacturers(Manufacturers: TRecordList; [Filter: string]): Integer | Fills Manufacturers with all the records from the Manufacturers database, and returns the number of records. See Script References | Manufacturer Data Record for more information about the record structure.
GetMaterials(Materials: TRecordList; [Filter: string]): Integer | Fills Materials with all the records from the Materials database, and returns the number of records. See Script References | Material Data Record for more information about the record structure.
GetApplications(Applications: TRecordList; [Filter: string]): Integer | Fills Applications with all the records from the Applications database, and returns the number of records. See Script References | Application Data Record for more information about the record structure.
GetMaterialInsulations(MaterialInsulations: TRecordList; [Filter: string]): Integer | Fills MaterialInsulations with all the records from the MaterialInsulations database, and returns the number of records. See Script References | Material Insulation Data Record for more information about the record structure.
GetPipeInsulations(PipeInsulations: TRecordList; [Filter: string]): Integer | Fills PipeInsulations with all the records from the PipeInsulations database, and returns the number of records. See Script References | Pipe Insulation Data Record for more information about the record structure.
GetRoughnesses(Roughnesses: TRecordList; [Filter: string]): Integer | Fills Roughnesses with all the records from the Roughnesses database, and returns the number of records. See Script References | Roughness Data Record for more information about the record structure.
GetPipeSizingData(PipeSizingData: TRecordList; [Filter: string]): Integer | Fills PipeSizingData with all the records from the PipeSizingData database, and returns the number of records. See Script References | Pipe Sizing Data Record for more information about the record structure.
GetPipeScalings(PipeScalings: TRecordList; [Filter: string]): Integer | Fills PipeScalings with all the records from the PipeScalings database, and returns the number of records. See Script References | Pipe Scaling Data Record for more information about the record structure.
AddFluid(Filename: string; AddAsDuplicateIfExists: Boolean): string | Adds a .fluid file to your Fluids database, returning the name of the fluid if it was successfully added; blank, otherwise.
SaveFluid(FluidId: Integer; Filename: string): Boolean | Saves a record with the specified FluidId from the Fluids database to a .fluid file, returning True if successful; False, otherwise.
AddComp(GroupId: Integer; Filename: string; AddAsDuplicateIfExists: Boolean): string | Adds a .comp file to your equipment items DATA, returning the name of the component if it was successfully added; blank, otherwise.
SaveComp(GroupId, KindId, ComponentId: Integer; Filename: string) : Boolean | Saves a record from your equipment items DATA to a .comp file, returning True if successful; False, otherwise.
IsReadOnly: Boolean | Returns True if your DATA folder is opened as Read-Only; False, otherwise.
Note: The optional Filter parameter for each of the functions applies only to the top-level fields of the applicable data record structure. Each data structure for the functions can contain sub-records with fields within them. For example, Pipe contains a 'BlobData' sub-record with an 'InsideDiameter' field; however, the Filter can only be applied to a top-level field such as 'Manufacturer'. Example: This example will get all the Pipes from the FluidFlow database, display the data for the first pipe, and access the InsideDiameter field of the first BlobData sub-record. var Pipes: TRecordList; Pipe: TRecord; BlobDataList: TRecordList; BlobData: TRecord; begin Data.GetPipes(Pipes); // Point to the first pipe and display its fields in the Output window. Pipe := Pipes[0]; Output.Add(Pipe.AsText); // Get all the blob data for the pipe and display the InsideDiameter for the first entry. BlobDataList := Pipe['BlobData']; if (BlobDataList.Count > 0) then begin BlobData := BlobDataList[0]; ShowMessage(BlobData['InsideDiameter']); end; end; Example: This example filters the Roughness database for AbsoluteRoughness greater than one, and displays the data for the first record in the Output window. var RoughnessList: TRecordList; RoughnessData: TRecord; begin if (Data.GetRoughnesses(RoughnessList, '(AbsoluteRoughness > 1)') > 0) then begin RoughnessData := RoughnessList[0]; Output.Add(RoughnessData.AsText); end; end;