SELE
左图命名:(对符合规则的元件进行命名)
!namOptRule =object NAMOPTRULE()
!namOptRule.key =|Selector answer eq 0|
!namOptRule.description = |Naming rule for SELEs answer eq 0|
!namOptRule.rule = |All SELEctors answer eq 0|
!namOptRule.scan =|SPEC|
!namOptRule.format = |!!CE.owner.namn & '/' & !!CE.Tanswer|
!namOptRule.indices =|000|
!tempArray.append(!namOptRule)
右图命名:(对符合规则的元件进行命名)
!namOptRule =object NAMOPTRULE()
!namOptRule.key =|Selector Name|
!namOptRule.description = |Naming rule for SELEs|
!namOptRule.rule = |All SELEctors|
!namOptRule.scan =|SPEC|
!namOptRule.format = |!!CE.owner.namn & '/' & !!CE.Answer|
!namOptRule.indices = |000|
!tempArray.append(!namOptRule)
NOTE:
代码在前的优先级高,出现冲突按照优先级高的执行
----------------------------------------------------------------------------------------------------------
左图规则:(筛选出符合条件的SELE
元件)
!rule = objectRULE()
!rule.name = |All SELEctors answer eq 0|
!rule.rule = |Answer of CE eq 0|
!rule.types = |SELE|
!rule.description = |Rule for Selectors answer eq 0|
!!tmpRuleArray.append(!rule)
右图规则:(筛选出符合条件的SELE
元件)
!rule = objectRULE()
!rule.name = |All SELEctors|
!rule.rule = ||
!rule.types = |SELE|
!rule.description = |Rule for Selectors Level|
!!tmpRuleArray.append(!rule)
Note
:!namOptRule.rule
与 !rule.name
相对应
SPCO
SPEC NAME, TYPE, STYPE,PBOR, SHOP均不允许出现空格
SPCO名字中只要包括SPEC NAME, TYPE, STYPE, PBOR, SHOP这五要素,那么SPCO就不可能出现重复
。
双尺寸SPCO
!namOptRule = object NAMOPTRULE()
!namOptRule.key = |SPCO of REDU|
!namOptRule.description =|Naming rule for all SPCOs|
!namOptRule.rule = |All SPecCOmponents of REDU|
!namOptRule.scan = |SPEC|
!namOptRule.format = |!!CE.prmown.namn & '/' &!!CE.catref.gtype & '/' & !!CE.OWNER.Tanswer & '/' & !!CE.Tanswer & '/' &!!CE.catref.PARAM[1] & '×' & !!CE.catref.PARAM[2]|
!tempArray.append(!namOptRule)
----------------------------对应的rule规则:-------------------------------------------------
!rule = object RULE()
!rule.name = |All SPecCOmponents of REDU|
!rule.rule = |Gtype of Catref eq 'REDU'|
!rule.types = |SPCO|
!rule.description = |Rulefor Specification Components of REDU|
!!tmpRuleArray.append(!rule)
NOTE:
!!CE.prmown.Tanswer
的值是
TYPE
!!CE.OWNER.Tanswer
的值是
STYPE
除了
REDU
,双尺寸的还有
TEEOLET
需要设置:
!namOptRule = object NAMOPTRULE()
!namOptRule.key = |SPCO of
TEE|
!namOptRule.description =|Naming rule for TEE SPCOs|
!namOptRule.rule = |All SPecCOmponents of TEE|
!namOptRule.scan = |SPEC|
!namOptRule.format = |!!CE.prmown.namn & '/' &!!CE.catref.gtype & '/' & !!CE.OWNER.Tanswer & '/' & !!CE.Tanswer & '/' &!!CE.catref.PARAM[1] & '×' & !!CE.catref.PARAM[2]|
!namOptRule.indices = |000|
!tempArray.append(!namOptRule)
!namOptRule = object NAMOPTRULE()
!namOptRule.key = |SPCO of
OLET|
!namOptRule.description =|Naming rule for OLET SPCOs|
!namOptRule.rule = |All SPecCOmponents of OLET|
!namOptRule.scan = |SPEC|
!namOptRule.format = |!!CE.prmown.namn & '/' &!!CE.catref.gtype & '/' & !!CE.OWNER.Tanswer & '/' & !!CE.Tanswer & '/' &!!CE.catref.PARAM[1] & '×' & !!CE.catref.PARAM[2]|
!namOptRule.indices = |000|
!tempArray.append(!namOptRule)
---------------------------对应的rule规则:----------------------------------------------
!rule = object RULE()
!rule.name = |All SPecCOmponents of OLET|
!rule.rule = |Gtype of Catref eq 'OLET'|
!rule.types = |SPCO|
!rule.description = |Rulefor Specification Components of OLET|
!!tmpRuleArray.append(!rule)
!rule = object RULE()
!rule.name = |All SPecCOmponents of REDU|
!rule.rule = |Gtype of Catref eq 'REDU'|
!rule.types = |SPCO|
!rule.description = |Rulefor Specification Components of REDU|
!!tmpRuleArray.append(!rule)
!rule = object RULE()
!rule.name = |All SPecCOmponents of TEE|
!rule.rule = |Gtype of Catref eq 'TEE'|
!rule.types = |SPCO|
!rule.description = |Rulefor Specification Components of TEE|
!!tmpRuleArray.append(!rule)
单尺寸SPCO
!namOptRule =object NAMOPTRULE()
!namOptRule.key =|Specification Component Name|
!namOptRule.description = |Naming rule for all SPCOs|
!namOptRule.rule = |All SPecCOmponents|
!namOptRule.scan =|SPEC|
!namOptRule.format = |!!CE.prmown.namn & '/' &!!CE.catref.gtype & '/' & !!CE.OWNER.Tanswer & '/' & !!CE.Tanswer & '/' &!!CE.catref.PARAM[1]|
!namOptRule.indices =|000|
!tempArray.append(!namOptRule)
----------------------------------------------------------------------------------------------------------
!rule = objectRULE()
!rule.name = |AllSPecCOmponents|
!rule.rule = ||
!rule.types = |SPCO|
!rule.description = |Rule for Specification Components|
!!tmpRuleArray.append(!rule)
PDMSparagon的批量autonaming自动重命名视频教程
autonaming运行的前提是:元件没有名字
所以,第一步,把要自动重命名的的元件进行 unname操作,方法是使用list添加需要重命名的元件,然后action里执行unname;
第二步,autonaming;
|