|
楼主 |
发表于 2024-5-7 10:26:16
|
显示全部楼层
目前我已经测试成功,文件名命名格式,代码+空格+名称。例:2532532 钢板
. w8 n# L1 T% P' l% {- e零件代码:
/ F- S2 ]& K k名称代码:Part.Extension.CustomPropertyManager("").Set("名称",Right(Part.GetTitle,Len(Part.GetTitle)-InStr(Part.GetTitle," ")))
' ?& F5 W* @$ ]2 n0 Q0 [% f1 V代号代码:Part.Extension.CustomPropertyManager("").Set("代号",Left(Part.GetTitle,InStr(Part.GetTitle," ")))1 }$ i i: r6 C; r
装配体代码:
" ?& u7 p" s1 s+ k9 ?1 Z名称代码:Assembly.Extension.CustomPropertyManager("").Set("名称",Right(Assembly.GetTitle,Len(Assembly.GetTitle)-InStr(Assembly.GetTitle," ")))
( H8 S' G3 w' X# Q) D代号代码:Assembly.Extension.CustomPropertyManager("").Set("代号",Left(Assembly.GetTitle,InStr(Assembly.GetTitle," ")))
& I5 f# N) c3 E方程式设置如图* n" n! P; p3 e4 K- ~
文件属性自定义如图
0 w* N- Q4 d& x1 v9 X6 p5 }. j2 ~. b \& B; l7 Q
注意,代码需要刷新后才能正确运行,自定义内需提前添加“名称”、“代号”两个属性
8 D) ~( H: t' Q( S) i |
|