明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: xiaokk

[VBA]请教两个关于标注的问题

[复制链接]
发表于 2005-2-20 10:02:00 | 显示全部楼层
xiaokk发表于2005-2-19 19:41:00楼主能不能具体点 这.ArrowHead1Type=acArrowOblique '细斜杠.ArrowHead2Type=acArrowArchTick '粗斜杠小数点\".\"前的内容是什么? 谢谢
这个可以看一下AutoCAD VBA的帮助,先把ArrowHead1Type粘贴到代码窗口里面,然后帮光标挪到ArrowHead1Type前面,按“F1”。 帮助里面对于各种对象、方法、属性等等其实都有介绍,一般还有例子可以看,对写程序是很有帮助的,ArrowHead1Type的例子就是: Sub Example_ArrowHead1Type()
' This example creates a Dim3PointAngular object in model space
' and then alters the visible appearance (shape) of its arrow heads
' using the ArrowHead1Type and ArrowHead2Type properties

Dim DimPointAngularObj As AcadDim3PointAngular
Dim AngleVertex(0 To 2) As Double
Dim FirstPoint(0 To 2) As Double, SecondPoint(0 To 2) As Double
Dim TextPoint(0 To 2) As Double

' Define the new Dim3PointAngular object
AngleVertex(0) = 0: AngleVertex(1) = 0: AngleVertex(2) = 0
FirstPoint(0) = 2: FirstPoint(1) = 2: FirstPoint(2) = 0
SecondPoint(0) = 1: SecondPoint(1) = 4: SecondPoint(2) = 0
TextPoint(0) = 6: TextPoint(1) = 6: TextPoint(2) = 0

' Create the new Dim3PointAngular object in model space
Set DimPointAngularObj = ThisDrawing.ModelSpace.AddDim3PointAngular(AngleVertex, FirstPoint, SecondPoint, TextPoint)
ThisDrawing.Application.ZoomAll

' Read and display current arrow head type
MsgBox "The arrow head type for the first arrow of this object is: " & DimPointAngularObj.Arrowhead1Type & vbCrLf & _
"The arrow head type for the second arrow of this object is: " & DimPointAngularObj.Arrowhead2Type

' Alter the arrow head type property for both arrows of this object
DimPointAngularObj.Arrowhead1Type = acArrowBoxBlank
DimPointAngularObj.Arrowhead2Type = acArrowBoxBlank
ThisDrawing.Regen acAllViewports

' Read and display current arrow head type
MsgBox "The arrow head type for the first arrow of this object is now set to: " & DimPointAngularObj.Arrowhead1Type & vbCrLf & _
"The arrow head type for the second arrow of this object is now set to: " & DimPointAngularObj.Arrowhead2Type
End Sub
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-11-27 23:36 , Processed in 0.145807 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表