[求助]vb中怎么打不DWG文件啊?
<BR>我写了一个程序:Dim acadapp As New AcadApplication '建立Application对象<BR>Dim acaddoc As New AcadDocument '建立Document对象<BR>On Error Resume Next
Set acadapp = GetObject(, "autocad.application") '若AutoCad已启动 , 则直接得到<BR>If Err Then<BR> Err.Clear<BR> Set acadapp = CreateObject("autocad.application") '若AutoCad未启动,则运行它<BR> If Err Then<BR> MsgBox Err.Description<BR> Exit Function<BR> End If<BR>End If<BR>MsgBox "Now running " + acadapp.Name + " version " + acadapp.Version
acadapp.Visible = True<BR>Set acaddoc = acadapp.ActiveDocument '设acaddoc为当前图形文件
Dim dwgname As String<BR>dwgname = "F:\ElectroSign\updataDwg\dwg\jxf.dwg"<BR>If Dir(dwgname) <> "" Then<BR> acaddoc.Open(dwgname) '打开一个CAD文件<BR> acadapp.Visible = True '使AutoCad可见<BR>Else<BR> MsgBox "没有此文件"<BR>End If
jxf.dwg文件找得到,为什么AutoCad可见后,仍然是默认的Drawing1.dwg啊?
这样的话,我无法对jxf.dwg进行修改啊??
在此请教高手!:)
回复
dwg文件的版本相同吗?
页:
[1]