The ImportSettings namespace
Settings used for the import of DRE datasets. ImportSettings is part of the DRE namespace.
Function List
Function Details
- Get ()
- The settings used during the import.
- Return
- table
- Table.
- Example
app = pf.GetApplication() app:NewProject() app:OpenFile(FEKO_HOME..[[/shared/Resources/Automation/startup.fek]]) -- Retrieve the far field data set local farFieldDataSet = pf.FarField.GetDataSet("startup.StandardConfiguration1.FarFields") -- Export the data set to a new DRE file local fileName = [[temp_startup.dre]] pf.DRE.ExportDataSet(farFieldDataSet, fileName, "/") -- Inspect the DRE file hierarchy to determine the location of the data to import local dreFileHierarchy = pf.DRE.DiscoverHierarchy(fileName) local drePath = "/"..dreFileHierarchy["Groups"][1].Name -- Modify scale values used during DRE import local dbFactor = 10.0 local dbScale = 2.0 local settings = pf.DRE.ImportSettings.Get() for ii=1,#settings.dBScales do if (settings.dBScales[ii].Name == "dBRef") then settings.dBScales[ii].dBScale = tostring(dbScale) end end -- Import data set from DRE file -- Note: The modified scales will not have an effect in this example -- (dBRef is not used in the DRE file) local importedFarFieldDataSet = pf.DRE.ImportDataSet(fileName, drePath, settings) importedFarFieldDataSet:StoreData(pf.Enums.StoredDataTypeEnum.FarField)