Page tree
Skip to end of metadata
Go to start of metadata


You want to find out which components of the CAD assembly have multiple material links and where none of the links is signed. 

Such ambiguous material links may cause troubles e.g. in a BOM derivation process

<ECTR-config-dir>\customize\scripts\macros\ambiguousMaterialLinks.txt
keylist = KEYLIST_FROM_REFOBJ()
setId = CREATE_SET(keylist)
/*
 HASMULTIMATLINK empty - no/only one material
 HASMULTIMATLINK S - multiple links, one link is signed
 HASMULTIMATLINK X - multiple links, nothing signed => ambiguous mat link
*/
ambiguousMatLinksFilter = PARAMETER_MAP( "doc_filter_fields" )
ambiguousMatLinksFilter.HASMATERIAL = "X";
ambiguousMatLinksFilter.HASMULTIMATLINK = "X";
componentsSet = TRANSFORM_SET( setId, "expand_structure" )
ambiguousMatLinksSet = FILTER(componentsSet, "doc", ambiguousMatLinksFilter);
result = KEYLIST_FROM_SET(ambiguousMatLinksSet)
WRITE_RESULTLIST(result)
<ECTR-config-dir>\customize\config\default.txt
#ambiguous material links
plm.smart.container.AMBIG_MAT_LINKS.name  = ambiguous material links
plm.smart.container.AMBIG_MAT_LINKS.macro = ambiguousMaterialLinks.txt 
plm.smart.container.AMBIG_MAT_LINKS.icon  = flag/flag_material_2a
<ECTR-config-dir>\applications\ugs\customize\config\default.txt
plm.om.DOC.containers.UGM = SMART_CONT(AMBIG_MAT_LINKS);the rest of containers...