- 积分
- 368
- 明经币
- 个
- 注册时间
- 2020-5-25
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
Dim obj_hatch As Object
Dim PatternType As Integer
Dim GradientName As String
Dim GradientColor1 As Integer, GradientColor2 As Integer
Dim AssociativeHatch As Boolean
Dim outerloop(0 To 0) As Object, innerloop(0 To 0) As Object
Dim aloop As Variant
Dim obj_circle1 As Object, obj_circle2 As Object
Dim center(0 To 2) As Double
Dim color As Object
center(0) = 5#: center(1) = 5#: center(2) = 0#
Set obj_circle1 = obj_ModelSpace.AddCircle(center, 5)
Set obj_circle2 = obj_ModelSpace.AddCircle(center, 2.5)
PatternType = 0
GradientName = "SPHERICAL"
AssociativeHatch = True
Set outerloop(0) = obj_circle1
Set innerloop(0) = obj_circle2
Set obj_hatch = obj_ModelSpace.AddHatch(PatternType, GradientName, AssociativeHatch, 1)
obj_hatch.AppendOuterLoop outerloop
obj_hatch.AppendInnerLoop innerloop
Set color = obj_Acad.GetInterfaceObject("AutoCAD.AcCmColor.16")
color.SetRGB 255, 0, 0
obj_hatch.GradientColor1 = color
color.SetRGB 0, 255, 0
obj_hatch.GradientColor2 = color
obj_hatch.Evaluate
obj_Acad.ZoomExtents
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
x
|