|
楼主 |
发表于 2024-5-7 10:24:51
|
显示全部楼层
目前我已经测试成功,文件名命名格式,代码+空格+名称。例:2532532 钢板
h% I( b+ o8 @: f* Y* L/ Y. c, ~零件代码:- g7 `; g9 `. E, P9 y
名称代码:Part.Extension.CustomPropertyManager("").Set("名称",Right(Part.GetTitle,Len(Part.GetTitle)-InStr(Part.GetTitle," ")))
( Y5 i% H! N3 z V: [" o: h9 Q( z代号代码:Part.Extension.CustomPropertyManager("").Set("代号",Left(Part.GetTitle,InStr(Part.GetTitle," ")))* y) u/ I; e4 e% u+ [ ?* m
装配体代码:. R7 O! B6 s/ U9 I/ I' B1 q
名称代码:Assembly.Extension.CustomPropertyManager("").Set("名称",Right(Assembly.GetTitle,Len(Assembly.GetTitle)-InStr(Assembly.GetTitle," ")))! X" L+ p$ c' G: D
代号代码:Assembly.Extension.CustomPropertyManager("").Set("代号",Left(Assembly.GetTitle,InStr(Assembly.GetTitle," ")))
& B' X" q8 @/ K8 e5 Z& ]方程式设置如图
/ `+ T2 d1 E1 t7 l% F1 s文件属性自定义如图$ w6 \7 ]% M2 l0 s
$ @- c0 f& r: M2 V, N0 J5 s9 i
注意,代码需要刷新后才能正确运行,自定义内需提前添加“名称”、“代号”两个属性
& O1 W# _& o. f1 J |
|