试试下面的代码
- Dim prt As String
- Dim asm As String
- ......
- If Part.GetType <> 2 Then
- prt = ".SLDPRT"
- blnretval = Part.AddCustomInfo3("", "材料", swCustomInfoText, Chr(34) & "SW-Material@" & c & prt & Chr(34))
- Else
- asm = ".SLDASM"
- blnretval = Part.AddCustomInfo3("", "材料", swCustomInfoText, Chr(34) & "SW-Material@" & c & asm & Chr(34))
- End If
复制代码 |