|
30#
樓主 |
發(fā)表于 2024-5-7 10:24:51
|
只看該作者
目前我已經(jīng)測試成功,文件名命名格式,代碼+空格+名稱。例:2532532 鋼板
, R1 R3 Z( x9 a2 _8 r" q# j零件代碼:1 B: f# e( y4 u' d8 V* U
名稱代碼:Part.Extension.CustomPropertyManager("").Set("名稱",Right(Part.GetTitle,Len(Part.GetTitle)-InStr(Part.GetTitle," ")))* ^ S3 | t) {6 d, O* s& n% e- Z! _
代號代碼:Part.Extension.CustomPropertyManager("").Set("代號",Left(Part.GetTitle,InStr(Part.GetTitle," ")))
) u2 u$ s7 o$ U/ `裝配體代碼:6 J. R9 A" m* R! `+ s/ k9 C- F
名稱代碼:Assembly.Extension.CustomPropertyManager("").Set("名稱",Right(Assembly.GetTitle,Len(Assembly.GetTitle)-InStr(Assembly.GetTitle," ")))
" b# J9 c/ ?: n1 l j1 s. h代號代碼:Assembly.Extension.CustomPropertyManager("").Set("代號",Left(Assembly.GetTitle,InStr(Assembly.GetTitle," ")))! l4 n) C: J7 b) O
方程式設(shè)置如圖![]()
) x$ g) T, A% H# h" ~. A! E1 Q文件屬性自定義如圖& c/ g( a: u2 m( Z- t4 n; E" ?
. ^) G T+ z2 c0 K* P
注意,代碼需要刷新后才能正確運(yùn)行,自定義內(nèi)需提前添加“名稱”、“代號”兩個屬性5 Y# x! j) o4 J9 s1 s4 ]* q3 g. v# F- U
|
|