本帖最后由 huyaomeng 于 2016-2-22 20:44 编辑
文件命名规则:xxx yyy_zzz.cccccc;提取xxx到代号;
提取yyy到名称;
提取zzz到项目。
方程如下:
"Dummy1"=part.Extension.CustomPropertyManager("").Set("代号",Left(part.GetTitle,InStr(part.GetTitle," ")-1))
"Dummy2"=part.Extension.CustomPropertyManager("").Set("名称",Mid(part.GetTitle,InStr(part.GetTitle," ")+1,Len(part.GetTitle)-InStr(part.GetTitle,"_")-7))
"Dummy3"=part.Extension.CustomPropertyManager("").Set("项目",Right(part.GetTitle,Len(part.GetTitle)-InStr(part.GetTitle,"_")-7))
|