|
目前我已經(jīng)測試成功,文件名命名格式,代碼+空格+名稱。例:2532532 鋼板6 W# p' N0 c% G7 O0 {
零件代碼:
; g3 S# w+ ^2 E5 G3 {% I名稱代碼:Part.Extension.CustomPropertyManager("").Set("名稱",Right(Part.GetTitle,Len(Part.GetTitle)-InStr(Part.GetTitle," ")))3 j& Q) r: Y4 n- j, r# P
代號代碼:Part.Extension.CustomPropertyManager("").Set("代號",Left(Part.GetTitle,InStr(Part.GetTitle," ")))
3 p M2 Q* s% w3 t/ B裝配體代碼:/ R7 M( ?8 @/ b7 \9 [
名稱代碼:Assembly.Extension.CustomPropertyManager("").Set("名稱",Right(Assembly.GetTitle,Len(Assembly.GetTitle)-InStr(Assembly.GetTitle," ")))! R4 ~) }. E% _( |2 X
代號代碼:Assembly.Extension.CustomPropertyManager("").Set("代號",Left(Assembly.GetTitle,InStr(Assembly.GetTitle," ")))
# G: i+ f L1 |9 J# n( k8 k2 n方程式設(shè)置如圖
: o+ k1 o2 U! P: @文件屬性自定義如圖
, f3 J T$ b# \ s
* A( C) k) Q8 l; B9 ]注意,代碼需要刷新后才能正確運行,自定義內(nèi)需提前添加“名稱”、“代號”兩個屬性
' t7 E7 @+ ]9 w& f) d5 n2 `; M |
|