|
楼主 |
发表于 2022-3-21 22:57:23
|
显示全部楼层
% }+ a" C( w+ v' m
解决了,需要增加代码就可以了6 h; p! |" P/ N. I I n/ _
文件名命名格式(代号 名称)代号及名称中间有个空格,此代码以空格为间隔点,如果不带空格,那会全部显示成名称。4 x5 ^, B9 D K* o8 b5 A F
6 _5 B( y9 c4 W+ @
以下是零件代码2 X& ]+ e+ {9 D- F: n/ E
名称代码:Part.Extension.CustomPropertyManager("").Set("名称",Right(Part.GetTitle,Len(Part.GetTitle)-InStr(Part.GetTitle," ")
. t1 E3 q6 H( G* ~& ~6 Q代号代码:Part.Extension.CustomPropertyManager("").Set("代号",Left(Part.GetTitle,InStr(Part.GetTitle," ")))+ o3 J; U' P5 }) `
"Dummy1":= "名称代码"
- V1 }& [4 A4 i5 O# D+ t& {4 Z& |2 |' r"Dummy2":= "代号代码"5 u/ w1 w! o8 \; t
(其中(Dummy1),(Dummy2)及(名称代码),(代号代码)可随意,保证上下一致即可。)# e+ V- D" W2 j
3 l$ y6 Y4 u& C: U
$ F4 z2 p# E$ [$ k$ o; [ X! s8 R/ |( m4 [" L" w6 a
* Q r7 K5 ^ ]" p6 ?
5 d- e! o; Z7 P G$ ]# [% M8 y2 `' Y6 a& J6 k+ V+ `2 I+ X
* Z7 b7 B8 J( V: R
' J! w: J0 d! O5 X5 w; r/ t
) d j9 @; r( T$ E! j4 w
) ?: w- C, |8 S2 K3 d
. o, y7 o) O; d) p
. `" ?! i& |( A# }. U以下是装配体代码
5 O6 r& u0 b6 d9 C/ s0 z名称代码:Assembly.Extension.CustomPropertyManager("").Set("名称",Right(Assembly.GetTitle,Len(Assembly.GetTitle)-InStr(Assembly.GetTitle," ")))
% j: b4 T4 L8 B @; `+ B0 @+ _& N# k代号代码:Assembly.Extension.CustomPropertyManager("").Set("代号",Left(Assembly.GetTitle,InStr(Assembly.GetTitle," "))) C1 s9 K7 q& K6 _# Q1 d `
3 r% O7 R! C! c V0 l+ O6 M' q! g
"Dummy1":= "名称代码"3 I. J1 J/ z5 a; G% _
"Dummy2":= "代号代码"+ o. b1 o c- j5 |& S
(其中(Dummy1),(Dummy2)及(名称代码),(代号代码)可随意,保证上下一致即可。)! B; |& A* A, |, d: @' N
& a0 o6 x q/ S! F
5 [ e- X* C2 }' e; V: w* k( K7 i
/ S$ Q3 y. j* z8 o; N
' A8 ^: J4 f: J% h( I- q6 D9 q% ]7 v7 i" p% ?
|
|