| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 384 人关注过本帖
标题:[原创]把我的原码发来大家看下哪里还有错误啊
取消只看楼主 加入收藏
huayv
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2007-6-8
收藏
 问题点数:0 回复次数:0 
[原创]把我的原码发来大家看下哪里还有错误啊

Option Explicit
Dim acadapp As AcadApplication
Dim preference As AcadPreferences
Dim acaddoc As AcadDocument
Dim paspace As AcadPaperSpace
Dim mospace As AcadModelSpace
Dim q(2, 50) As Double

Private Sub Command1_Click()
Static i As Integer
Combo1.AddItem i + 1
i = i + 1
q(0, i) = Text1.Text
q(1, i) = Text2.Text
q(2, i) = 0



End Sub

Private Sub Command2_Click()
On Error Resume Next
Set acadapp = GetObject("autocad.application")
If Err Then
Err.Clear
Set acadapp = CreateObject("autocad.application")
If Err Then
MsgBox "不能运行AutoCAD!!!"
Exit Sub
End If
End If
acadapp.Visible = True
Set preference = acadapp.Preferences
Set acaddoc = acadapp.ActiveDocument
Set mospace = acaddoc.ModelSpace
Set paspace = acaddoc.PaperSpace
Call acaddoc.New("acad.dwt")
End Sub

Private Sub Command3_Click()
Dim A(2) As Double
Dim B(2) As Double
Dim C(2) As Double
Dim D(2) As Double
Dim i As Integer

For i = 0 To 40

A(0) = q(0, i) + q(i + 1, 0)
A(1) = q(1, i) / 2
A(2) = 0
B(0) = q(0, 0) + q(i + 1, 0)
B(1) = -q(1, i) / 2
B(2) = 0
C(0) = q(0, i) + q(i + 1, 0)
C(1) = -q(1, i) / 2
C(2) = 0
D(0) = q(0, i) + q(i + 1, 0)
D(1) = q(1, i) / 2
D(2) = 0
mospace.AddLine A, B
mospace.AddLine B, C
mospace.AddLine C, D
mospace.AddLine D, A
Next i
End Sub
Private Sub GUANYU_Click()
MsgBox "作者:huayv"
End Sub

[此贴子已经被作者于2007-6-14 10:03:46编辑过]

2007-06-13 21:54
快速回复:[原创]把我的原码发来大家看下哪里还有错误啊
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.038845 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved