|
楼主 |
发表于 2024-5-7 10:26:16
|
显示全部楼层
目前我已经测试成功,文件名命名格式,代码+空格+名称。例:2532532 钢板* p5 X6 w5 l% O- Q* i
零件代码:& k. g2 d7 w+ A* X* e1 ^3 Z6 }
名称代码:Part.Extension.CustomPropertyManager("").Set("名称",Right(Part.GetTitle,Len(Part.GetTitle)-InStr(Part.GetTitle," ")))$ u' {) Y$ H+ z8 A; _* a$ N
代号代码:Part.Extension.CustomPropertyManager("").Set("代号",Left(Part.GetTitle,InStr(Part.GetTitle," ")))
7 G# q$ H# E0 I$ b# p% y1 Z4 m装配体代码:
8 K5 Z( C& |1 ?4 C& i1 ?名称代码:Assembly.Extension.CustomPropertyManager("").Set("名称",Right(Assembly.GetTitle,Len(Assembly.GetTitle)-InStr(Assembly.GetTitle," ")))% M2 `, \& `3 }8 b; W( `- ~ z7 b7 a
代号代码:Assembly.Extension.CustomPropertyManager("").Set("代号",Left(Assembly.GetTitle,InStr(Assembly.GetTitle," ")))* ?" K; z- e7 ^( }: O
方程式设置如图+ u( e1 ?. g+ S9 w
文件属性自定义如图
7 \' o3 F0 d1 E" N' J: ~( B6 n- N- m$ n6 t* Y8 r! d& T
注意,代码需要刷新后才能正确运行,自定义内需提前添加“名称”、“代号”两个属性
, L) f& q* C; s j+ V |
|