Helper functions that are useful for BomTable. Range from filterFunction, evalFunction, mapFunction, searchFunction
NOTE: THIS IS NOT A REAL NAMESPACE, it is used as a grouping for methods that can be used with BomTable
Methods
-
static basicFilter(occ) → {boolean}
-
Function of type filterFunction that is commonly used for only getting Assembly/Part occs with depth 2
Parameters:
Name Type Description occ Occurrence Returns:
boolean -
static createFilter(depth, types) → {filterFunction}
-
Function that builds a filterFunction
Parameters:
Name Type Description depth integer The tree depth desired for Occurrences types Array.<string> The type of Occurrences you are looking for Returns:
filterFunction A filter to use when building Bom -
static getAttributeFunction(attributeName) → {evalFunction}
-
Function that builds a evalFunction based on getting a component attribute name
Parameters:
Name Type Description attributeName string Desired attribute Returns:
evalFunction A function that returns the value at 'attributeName' of component -
static getCadEntityId(comp, occs) → {string}
-
Function of type evalFunction
Parameters:
Name Type Description comp Component occs Array.<Occurrence> Returns:
string -
static getCompId(comp, occs) → {string}
-
Function of type evalFunction
Parameters:
Name Type Description comp Component occs Array.<Occurrence> Returns:
string -
static getComponentName(comp, occs) → {string}
-
Function of type evalFunction cell value for componenent name
Parameters:
Name Type Description comp Component occs Array.<Occurrence> Returns:
string -
static getDescription(comp, occs) → {string}
-
Function of type evalFunction
Parameters:
Name Type Description comp Component occs Array.<Occurrence> Returns:
string -
static getOccurrenceCount(comp, occs) → {string}
-
Function of type evalFunction
Parameters:
Name Type Description comp Component occs Array.<Occurrence> Returns:
string -
static getType(comp, occs) → {string}
-
Function of type evalFunction
Parameters:
Name Type Description comp Component occs Array.<Occurrence> Returns:
string -
static mapCompId(comp, cell) → {boolean}
-
Function of type mapFunction that maps components to rows based on cadId
Parameters:
Name Type Description comp Component cell number/string Returns:
boolean -
static mapCompName(comp, cell) → {boolean}
-
Function of type mapFunction that maps Components to rows based on name
Parameters:
Name Type Description comp Component cell number/string Returns:
boolean -
static searchForMake(cell)
-
function of type searchFunction that looks for cells with 'MAKE' string
Parameters:
Name Type Description cell string/number -
static searchForQuantityOverOne(cell)
-
Function of type searchFunction that looks for cells with number > 1
Parameters:
Name Type Description cell string/number