Creo文件名不能用“.”,我们都是在模板里加好关系式,转换文件名为图号名:例如文件名GG_01 ,图号名就是GG.01
CINDEX=REL_MODEL_NAME
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
|