6 L. {5 {$ x3 }9 x9 T
試了下這個宏(本人用的SW2018)報錯:$ U: O4 B: J" B" ~2 V# P
對象不支持這個屬性或方法(錯誤 438) 9 l0 S1 [ `* m. nStatus = swSelModelext.SaveAs3(mip, 0, 512, Nothing, Nothing, Error, Warning) '更改零件文件名(替換裝配體中的原文件) A3 Q4 @8 T+ |/ c( g6 c5 Y* d7 u; L
有哪位大佬能幫解答一下嗎?是不是SaceAs3語句的問題?8 \8 L0 J- T8 b! U
; _6 k# r: Z$ r5 e8 l 作者: Lean_2017.feng 時間: 2024-4-10 09:40
以下方法說明,請自行測試:) }1 t. z9 q/ R6 {
7 ` I) |6 f0 B* x'Usage x! O- F) E6 N' b+ }, E1 g9 T6 l
IModelDocExtension.SaveAs3(Name, Version, Options, ExportData, AdvancedSaveAsOptions, Errors, Warnings): R7 ^4 \( v+ A" _) g2 Y
w$ u, }5 l3 Y4 ~
* U& ^2 Q! a9 w% h'Func Declaration7 P) ^6 t8 ^7 N
Function SaveAs3( _" J0 U8 |9 Q- d0 R
ByVal Name As System.String, _+ h5 @' A( `8 a; `
ByVal Version As System.Integer, _ ( S0 r5 \; m: O% G& R, g8 i ByVal Options As System.Integer, _ ! @% |' K$ d$ f! ~ ByVal ExportData As System.Object, _* @( `" I8 d0 t! \- r3 W, `. T: k
ByVal AdvancedSaveAsOptions As System.Object, _ 0 w/ g3 q& h3 |5 w ByRef Errors As System.Integer, _2 |* @& R Z% C* C& m: M9 O, v3 K
ByRef Warnings As System.Integer _2 n* [. @/ x+ h4 V. g* z3 b) |# x
) As System.Boolean6 w. C5 [& d- l
/ s5 H0 `' }. O+ q0 x: z5 a
Parameters5 H4 j& f. ^, f& t7 H
Name ( z1 P" Z5 P* O* Z: \5 |$ g$ d
Full pathname of the document to save; the file extension indicates any conversion that should be performed (for example, Part1.igs to save in IGES format) (see Remarks)2 A+ ]+ ^1 z) a. `4 U
Version 0 _' o9 Z( i4 l1 r1 j1 y2 X Format in which to save this document as defined in swSaveAsVersion_e (see Remarks)9 A! T$ `; b$ Z/ j+ N
Options 9 D7 K1 i3 F5 F: j
Option indicating how to save the document as defined in swSaveAsOptions_e (see Remarks) 8 }" O8 ^+ V1 x; q ExportData ! B" L; t/ A) J; W IExportPdfData object for exporting drawing sheets to PDF (see Remarks) . _/ d1 ~. S+ o AdvancedSaveAsOptions . J9 {( `1 h$ D IAdvancedSaveAsOptions (see Remarks) ; z! m7 @; c" t3 b) Y Errors 5 }7 w" @8 }$ E; P- M& ]- K& p
Errors that caused the save to fail as defined in swFileSaveError_e (see Remarks), n- Y* y1 O; A- [
Warnings , i. }) g5 _: k- e
Warnings or extra information generated during the save operation as defined in swFileSaveWarning_e (see Remarks) ! |+ h4 p( p7 p; d+ H; gReturn Value$ O( E! t" `. d% u
True if the save is successful, false if not/ a" g+ ~# g/ |8 t. M