|
楼主 |
发表于 2024-5-7 10:24:51
|
显示全部楼层
目前我已经测试成功,文件名命名格式,代码+空格+名称。例:2532532 钢板
! }( p4 b9 B* U# v! S2 S: Y零件代码:) J1 p/ t. z% J9 _
名称代码:Part.Extension.CustomPropertyManager("").Set("名称",Right(Part.GetTitle,Len(Part.GetTitle)-InStr(Part.GetTitle," ")))
8 P$ N7 w' v/ J# d' `4 u代号代码:Part.Extension.CustomPropertyManager("").Set("代号",Left(Part.GetTitle,InStr(Part.GetTitle," ")))! |( J6 U) E+ C- A
装配体代码:! [" [+ ]5 B+ r l2 {9 Y5 h
名称代码:Assembly.Extension.CustomPropertyManager("").Set("名称",Right(Assembly.GetTitle,Len(Assembly.GetTitle)-InStr(Assembly.GetTitle," ")))* V0 A* x" p# w- ?
代号代码:Assembly.Extension.CustomPropertyManager("").Set("代号",Left(Assembly.GetTitle,InStr(Assembly.GetTitle," ")))9 d% L: L- t$ P
方程式设置如图" ? v6 Q8 [; S1 y
文件属性自定义如图" p/ f1 E, S6 ^+ p3 \+ K
' R: t E$ I$ @" s3 s注意,代码需要刷新后才能正确运行,自定义内需提前添加“名称”、“代号”两个属性4 O/ s; d' b( @
|
|