[求助]使用SaveAs函数时,第二三个参数怎么写
<div id="textstyle_1" style="FONT-SIZE: 12pt; OVERFLOW: hidden; WORD-BREAK: break-all; TEXT-INDENT: 0px; WORD-WRAP: break-word"><p>object.SaveAs FileName, FileType [, SecurityParams] </p>
<p>用c#做cad的二次开发,这个函数的三个参数都是必选的。但是VB中可以只传一个参数,我的问题就是使用这个函数时,第二个,第三个参数该写什么?我就是想保存一个.dwg格式的文件。</p></div> 高手哪去了 空着
…………………………………………
学至于行发表于2010-5-31 20:26:00static/image/common/back.gif空着<p>空着不行 要报错!如果你有空着也可以的方法 发个源码上来看看呗?</p>
<p> </p> <p>第二个参数是文件格式,见下表</p>
<p>
<table style="WIDTH: 162pt; BORDER-COLLAPSE: collapse" cellspacing="0" cellpadding="0" width="216" border="0" x:str>
<colgroup>
<col style="WIDTH: 54pt" span="3" width="72">
<tbody>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="WIDTH: 54pt; HEIGHT: 14.25pt" width="72" height="19">版本</td>
<td class="xl22" style="BORDER-LEFT: medium="medium"none; WIDTH: 54pt" width="72">格式</td>
<td class="xl22" style="BORDER-LEFT: medium="medium"none; WIDTH: 54pt" width="72">值</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19">R12</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dxf</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>1</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19">R13</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dwg</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>4</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19">R13</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dxf</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>5</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19">R14</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dwg</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>8</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19">R14</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dxf</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>9</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19" x:num>2000</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dwg</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>12</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19" x:num>2000</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dxf</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>13</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19" x:num>2000</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dwt</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>14</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19" x:num>2004</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dwg</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>24</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19" x:num>2004</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dxf</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>25</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19" x:num>2004</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dwt</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>26</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19" x:num>2007</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dwg</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>32</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19" x:num>2007</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dxf</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>33</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19" x:num>2007</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dwt</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>34</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19" x:num>2010</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dwg</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>48</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19" x:num>2010</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dxf</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>49</td></tr>
<tr style="HEIGHT: 14.25pt" height="19">
<td class="xl22" style="BORDER-TOP: medium="medium"none; HEIGHT: 14.25pt" height="19" x:num>2010</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none">dwt</td>
<td class="xl22" style="BORDER-TOP: medium="medium"none; BORDER-LEFT: medium="medium"none" x:num>50</td></tr></tbody></table></p>
<p> </p>
<p>第三个参数是安全参数对象,在VBA中可以是对象型(<font face="Verdana">Object</font>)或变体型(<font face="Verdana">Variant</font>)变量.将此参数设为"<font face="Verdana">Nothing"在VBA中是可以被接受的.</font></p>
先感谢一下
woaishuijia发表于2010-6-1 20:21:00static/image/common/back.gif第二个参数是文件格式,见下表版本
格式
值
R12
dxf
1
R13
dwg
4
R13
dxf
5
R14
dwg
8
R14
dxf
9
2000
dwg
12
2000
dxf
13
2000
dwt
<p></p> 有没有哪位遇到过这个情况啊~~ 不懂C.在VB中的NOTHING是对象型变量为空的意思,在C语言中怎么表述就不知道了. 诶没办法啊 有会的不? <p>问题解决 结合5楼兄弟的提醒 只要这样用 </p>
<p><font style="BACKGROUND-COLOR: #ffffff" face="Verdana">SaveAs(路径,24, 0); 就ok了 最后一个参数为0就行了。</font></p>
页:
[1]
2