Verify Revit reference CSV
This commit is contained in:
parent
bfe8b790b2
commit
da689af518
8 changed files with 149 additions and 11 deletions
|
|
@ -59,7 +59,9 @@ export function parseExternalCsv(
|
|||
|
||||
const headerRowIndex = headerMatches[0];
|
||||
const configuredColumnNames = [
|
||||
...Object.values(configuration.columns),
|
||||
...Object.values(configuration.columns).filter(
|
||||
(column): column is string => column !== null
|
||||
),
|
||||
...configuration.additionalSourceMappings.map((mapping) => mapping.sourceColumn),
|
||||
];
|
||||
const headerValues = parsed.rows[headerRowIndex].map((cell) => cell.value);
|
||||
|
|
@ -81,7 +83,9 @@ export function parseExternalCsv(
|
|||
configuration.columns.familyAndType,
|
||||
configuration.columns.selectionMarker,
|
||||
configuration.columns.power,
|
||||
configuration.columns.quantity,
|
||||
...(configuration.columns.quantity === null
|
||||
? []
|
||||
: [configuration.columns.quantity]),
|
||||
...configuration.additionalSourceMappings.map((mapping) => mapping.sourceColumn),
|
||||
].map((column) => headerLookup.get(column)!);
|
||||
const seenIfcGuids = new Set<string>();
|
||||
|
|
@ -274,7 +278,9 @@ function findHeaderRows(
|
|||
configuration: ExternalCsvConfiguration
|
||||
) {
|
||||
const requiredColumns = new Set([
|
||||
...Object.values(configuration.columns),
|
||||
...Object.values(configuration.columns).filter(
|
||||
(column): column is string => column !== null
|
||||
),
|
||||
...configuration.additionalSourceMappings.map((mapping) => mapping.sourceColumn),
|
||||
]);
|
||||
const matches: number[] = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue