|
楼主 |
发表于 2024-5-7 10:26:16
|
显示全部楼层
目前我已经测试成功,文件名命名格式,代码+空格+名称。例:2532532 钢板
, Z) c( c7 w8 v, g8 E1 {0 ?零件代码:
1 C! u& z; u' j8 R) `) d名称代码:Part.Extension.CustomPropertyManager("").Set("名称",Right(Part.GetTitle,Len(Part.GetTitle)-InStr(Part.GetTitle," ")))
7 U/ {- _* b( s/ U代号代码:Part.Extension.CustomPropertyManager("").Set("代号",Left(Part.GetTitle,InStr(Part.GetTitle," ")))
6 V2 L* |! u" I8 R% A装配体代码:
' ?6 d! ]4 s; e6 \名称代码:Assembly.Extension.CustomPropertyManager("").Set("名称",Right(Assembly.GetTitle,Len(Assembly.GetTitle)-InStr(Assembly.GetTitle," ")))
/ d' p l6 p" X2 e$ m9 i代号代码:Assembly.Extension.CustomPropertyManager("").Set("代号",Left(Assembly.GetTitle,InStr(Assembly.GetTitle," ")))
8 f" ^: p, ?, Y) u方程式设置如图
( r* U8 c f( L7 f( _5 t. O文件属性自定义如图/ R. _& ^7 S5 c9 f, }' h
( m C, O+ S; E注意,代码需要刷新后才能正确运行,自定义内需提前添加“名称”、“代号”两个属性
% G& v2 J# w. B0 I3 q7 ~* l! w |
|