|
楼主 |
发表于 2022-3-21 22:57:23
|
显示全部楼层
& e. ?, i9 p E4 B; P! m, V# z+ p5 s解决了,需要增加代码就可以了) S5 T0 X1 M% Z# D
文件名命名格式(代号 名称)代号及名称中间有个空格,此代码以空格为间隔点,如果不带空格,那会全部显示成名称。% f# V1 P& e7 w; o# m
" |& {, Y9 I5 T
以下是零件代码; Q1 V2 o7 Z/ T" N1 E
名称代码:Part.Extension.CustomPropertyManager("").Set("名称",Right(Part.GetTitle,Len(Part.GetTitle)-InStr(Part.GetTitle," ")
9 L' h' b: d. v: r& d' G1 {代号代码:Part.Extension.CustomPropertyManager("").Set("代号",Left(Part.GetTitle,InStr(Part.GetTitle," ")))- F: E; w0 q h* S
"Dummy1":= "名称代码"
% |. g- ]2 |7 i+ g) U) e. r5 G"Dummy2":= "代号代码"* B: w+ m, i3 n% ?9 S
(其中(Dummy1),(Dummy2)及(名称代码),(代号代码)可随意,保证上下一致即可。)
# ~+ e4 l8 u% F% P; v/ {
; O" f# e5 r! v2 M5 [, L; c
" u! A @" {* P ?" m, M1 U" z, L: F; ]3 E" A# \
5 s1 w' O" c' i( y" @1 A% Z" ?# J
% S# {9 s& H' d: e3 t
: v' q+ H; u* r3 P. _0 |7 x: v) y1 Q; P- g& K
}5 A/ q8 ~0 q" z) R1 V
1 h0 K8 b& \# V E& V- ~
V9 k. @5 \/ z$ s V1 r6 n
0 ~, `; x0 s! o6 f
# K5 W5 R7 T0 g/ E) V) B
以下是装配体代码
! m7 ^ M! v+ Z名称代码:Assembly.Extension.CustomPropertyManager("").Set("名称",Right(Assembly.GetTitle,Len(Assembly.GetTitle)-InStr(Assembly.GetTitle," ")))8 P8 W4 m+ S. s! V, ~, _
代号代码:Assembly.Extension.CustomPropertyManager("").Set("代号",Left(Assembly.GetTitle,InStr(Assembly.GetTitle," ")))
/ r; C- E' [& i3 x( O! S) Z" v8 a: ^ H C1 N: e5 N7 j
"Dummy1":= "名称代码"1 [' g- \/ X* O
"Dummy2":= "代号代码"5 ?1 r2 h& R3 Y+ V. V, R' V
(其中(Dummy1),(Dummy2)及(名称代码),(代号代码)可随意,保证上下一致即可。)
, P8 S0 J% Y" R
j7 M& y h o l8 J% V- t7 @7 [5 W9 @8 P. v5 o: y( i! f( W& X! V
6 O' x! x; L8 L9 J
( I% U8 M+ v2 g6 W; t; _* m- l. n8 l+ ~: K% H* [8 `2 }
|
|