robbin840311 发表于 2010-5-20 20:34:00

Import的调用

<p>代码如下:</p><p>On Error GoTo errHdl<br/>&nbsp; Dim varPt(2) As Double<br/>&nbsp; varPt(0) = 0<br/>&nbsp; varPt(1) = 0<br/>&nbsp; varPt(2) = 0<br/>&nbsp; Dim dblS As Double<br/>&nbsp; dblS = 1<br/>&nbsp; Dim strFile As String<br/>&nbsp; strFile = "C:\00\1.dwg"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; '如果我将文件存为DXF格式,这里就正确了<br/>&nbsp; ThisDrawing.Import strFile, varPt, dblS<br/>&nbsp; <br/>errHdl:<br/>&nbsp; MsgBox Err.Description</p><p></p><p>如果是DWG格式,提示“参数无效”,但插入dxf就没有问题。请问这是什么原因?</p>

coolway 发表于 2010-5-21 15:24:00

<p>如果要插入.dwg文件,请用ThisDrawing.ModelSpace.InsertBlock()</p>
页: [1]
查看完整版本: Import的调用