|
30#
樓主 |
發(fā)表于 2024-5-7 10:24:51
|
只看該作者
目前我已經測試成功,文件名命名格式,代碼+空格+名稱。例:2532532 鋼板
) E9 j3 Y9 u- g' j8 U零件代碼:7 j" D( h! r ]6 H6 V/ U& p9 |
名稱代碼:Part.Extension.CustomPropertyManager("").Set("名稱",Right(Part.GetTitle,Len(Part.GetTitle)-InStr(Part.GetTitle," ")))
9 Y* E2 C. w6 g1 U+ Y; |代號代碼:Part.Extension.CustomPropertyManager("").Set("代號",Left(Part.GetTitle,InStr(Part.GetTitle," ")))8 J2 t( R+ R% k$ s
裝配體代碼:- I2 C+ D' W6 ]3 z$ e- h4 k9 G0 F
名稱代碼:Assembly.Extension.CustomPropertyManager("").Set("名稱",Right(Assembly.GetTitle,Len(Assembly.GetTitle)-InStr(Assembly.GetTitle," ")))6 B' [3 A. N7 R/ o# J% D
代號代碼:Assembly.Extension.CustomPropertyManager("").Set("代號",Left(Assembly.GetTitle,InStr(Assembly.GetTitle," ")))- u2 T, K1 F# E" I2 w1 p
方程式設置如圖
1 D: H( F: x4 q1 Y文件屬性自定義如圖
6 V; E% F! }' \% x8 C
* @$ w9 A1 M* N0 _0 y1 X注意,代碼需要刷新后才能正確運行,自定義內需提前添加“名稱”、“代號”兩個屬性6 O9 X5 I& {2 l+ n
|
|