|
|
发表于 2014-2-11 09:23:49
|
显示全部楼层
来自: 中国辽宁抚顺
算是有缘,又被我回了这个帖子。7 L) y' g) h# K' s& E* ^
我研究后是下面这样的,装配体的表达式是assembly 下面代码我的2011版测试没问题,自己下面看一下有什么不同吧。
) b# T4 s) O" r: M13 M* e' ~+ x4 k( H" M" A- v- o
dim zfd
0 V% n j8 m+ W# P, D {5 K* uzfd=assembly.Extension.CustomPropertyManager("").Set("partno",Left(assembly.GetTitle,InStr(1,assembly.GetTitle,".SLDASM")-1))- I1 K9 d) {9 l8 C
/ R' ?7 T7 R- q$ O" c7 A* {+ }, }+ S6 ?$ V
1- [" D( o4 J* p# V* M& R: |; l7 d
Dim Txt
. i/ l# o b4 r1 Q( M" B, aTxt = assembly.GetPathName
2 ]6 R$ n5 B3 ~5 V) C- oTxt = Mid(Txt, InStrRev(Txt, " ", -1) + 1)% H* a- C1 {/ W5 V( f8 V
Txt = Left(Txt, Len(Txt)-7)
2 u$ T+ t$ B F) D& Z; b, ]assembly.Extension.CustomPropertyManager("").Set "Description", Txt |
|