|
31#
樓主 |
發(fā)表于 2024-5-7 10:26:16
|
只看該作者
目前我已經測試成功,文件名命名格式,代碼+空格+名稱。例:2532532 鋼板9 N4 B2 H! x- ?# q Q& I/ _
零件代碼:2 o: I+ y! r7 O0 X- c; _2 o+ }& w
名稱代碼:Part.Extension.CustomPropertyManager("").Set("名稱",Right(Part.GetTitle,Len(Part.GetTitle)-InStr(Part.GetTitle," ")))! j" I! ~9 @7 U
代號代碼:Part.Extension.CustomPropertyManager("").Set("代號",Left(Part.GetTitle,InStr(Part.GetTitle," ")))+ M$ Q$ B0 h+ r1 n- F% @
裝配體代碼:
2 Z: f, j/ I8 R8 h) x% }" P+ |名稱代碼:Assembly.Extension.CustomPropertyManager("").Set("名稱",Right(Assembly.GetTitle,Len(Assembly.GetTitle)-InStr(Assembly.GetTitle," ")))7 z, R3 E/ ?1 u+ G& f0 s
代號代碼:Assembly.Extension.CustomPropertyManager("").Set("代號",Left(Assembly.GetTitle,InStr(Assembly.GetTitle," ")))( z# o5 `8 K) ?, w, u
方程式設置如圖
0 j: S% R: d7 s' k文件屬性自定義如圖
- Q! `. u( g: X1 ?! x0 R/ O; s- U0 C+ p+ {6 K
注意,代碼需要刷新后才能正確運行,自定義內需提前添加“名稱”、“代號”兩個屬性
* D7 v$ h0 e6 L7 t6 L& G0 c5 E& T |
|