|
本帖最后由 fuguangyi 于 2019-9-13 20:16 编辑
如果是几层组件下的元件,例如LY.01.01.01.01-12, 模板里的关系式需要复制几次啊:
ORITEXT = "_"
IF SEARCH(CINDEX,ORITEXT)>1
TMP=EXTRACT(CINDEX,1,SEARCH(CINDEX,ORITEXT)-1)
CINDEX=TMP+"." + EXTRACT(CINDEX,SEARCH(CINDEX,ORITEXT)+1,STRING_LENGTH(CINDEX)\
-SEARCH(CINDEX,ORITEXT))
ENDIF
IF SEARCH(CINDEX,ORITEXT)>1
TMP=EXTRACT(CINDEX,1,SEARCH(CINDEX,ORITEXT)-1)
CINDEX=TMP + "." + EXTRACT(CINDEX,SEARCH(CINDEX,ORITEXT)+1,STRING_LENGTH(\
CINDEX)-SEARCH(CINDEX,ORITEXT))
ENDIF
IF SEARCH(CINDEX,ORITEXT)>1
TMP=EXTRACT(CINDEX,1,SEARCH(CINDEX,ORITEXT)-1)
CINDEX=TMP + "."+ EXTRACT(CINDEX,SEARCH(CINDEX,ORITEXT)+1,STRING_LENGTH(\
CINDEX)-SEARCH(CINDEX,ORITEXT))
ENDIF
IF SEARCH(CINDEX,ORITEXT)>1
TMP=EXTRACT(CINDEX,1,SEARCH(CINDEX,ORITEXT)-1)
CINDEX=TMP + "." + EXTRACT(CINDEX,SEARCH(CINDEX,ORITEXT)+1,STRING_LENGTH(\
CINDEX)-SEARCH(CINDEX,ORITEXT))
ENDIF
IF SEARCH(CINDEX,ORITEXT)>1
TMP=EXTRACT(CINDEX,1,SEARCH(CINDEX,ORITEXT)-1)
CINDEX=TMP + "."+ EXTRACT(CINDEX,SEARCH(CINDEX,ORITEXT)+1,STRING_LENGTH(\
CINDEX)-SEARCH(CINDEX,ORITEXT))
ENDIF
IF SEARCH(CINDEX,ORITEXT)>1
TMP=EXTRACT(CINDEX,1,SEARCH(CINDEX,ORITEXT)-1)
CINDEX=TMP + "." + EXTRACT(CINDEX,SEARCH(CINDEX,ORITEXT)+1,STRING_LENGTH(\
CINDEX)-SEARCH(CINDEX,ORITEXT))
ENDIF |
|