hustlei 发表于 2008-12-10 23:19:00

请教后期绑定问题

本帖最后由 作者 于 2008-12-10 23:19:50 编辑 <br /><br /> Module Module1<br/>&nbsp;&nbsp;&nbsp; Dim AcadApp As Object<br/>&nbsp;&nbsp;&nbsp; Dim AcadDoc As Object <br/>&nbsp;&nbsp;&nbsp; Dim gridLayer As Object<br/>&nbsp;&nbsp;&nbsp; Sub Main()<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ConnectToAcad()<br/>&nbsp;&nbsp;&nbsp; End Sub<br/>&nbsp;&nbsp;&nbsp; Sub ConnectToAcad()<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcadApp = CreateObject("AutoCAD.Application")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcadApp.Visible = True<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcadDoc = AcadApp.ActiveDocument<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; gridLayer = AcadDoc.Layers.Add("网格")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AcadDoc.ActiveLayer.color = 5<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#5c44bb">AcadDoc.ActiveLayer = gridLayer</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#f70968">''''这一句有问题 <br/></font>&nbsp;&nbsp;&nbsp; End Sub<br/>End Module<br/><br/>前边的都运行成功了&nbsp;&nbsp; 就那一句出错,不知道是那儿写错了<br/>提示的出错原因是找不到成员<img height="20" alt="" src="http://byhh.net/style/emotion/sweat.gif" width="20" border="0"/><br/>请问那一位大侠知道原因 谢谢<br/>

hustlei 发表于 2008-12-11 11:24:00

<p>没有人知道么5555</p>
页: [1]
查看完整版本: 请教后期绑定问题