CAD VBA 标注角度问题
CADVBA利用循环标注文字但每次最后一个都不正常,下面是其中一段代码'设计高程WithSheets("中桩坐标")i=3DoUntil.Cells(i,2).value...
CAD VBA 利用循环标注文字 但每次最后一个都不正常,下面是其中一段代码
'设计高程
With Sheets("中桩坐标")
i = 3
Do Until .Cells(i, 2).value = ""
Set newLayer = DOC.Layers("标注")
DOC.ActiveLayer = newLayer
newLayer.Color = acCyan
dmPnt(0) = (.Cells(i, 2).value - first) * 1.0001 + 50: dmPnt(1) = 112: dmPnt(2) = 0
txtStr = Format(.Cells(i, 5).value, "00.00")
txtHeight = 4
TextObj.Rotation = 3.14159 / 2
insPnt = dmPnt
Set TextObj = DOC.ModelSpace.AddText(txtStr, insPnt, txtHeight)
i = i + 1
Loop 展开
'设计高程
With Sheets("中桩坐标")
i = 3
Do Until .Cells(i, 2).value = ""
Set newLayer = DOC.Layers("标注")
DOC.ActiveLayer = newLayer
newLayer.Color = acCyan
dmPnt(0) = (.Cells(i, 2).value - first) * 1.0001 + 50: dmPnt(1) = 112: dmPnt(2) = 0
txtStr = Format(.Cells(i, 5).value, "00.00")
txtHeight = 4
TextObj.Rotation = 3.14159 / 2
insPnt = dmPnt
Set TextObj = DOC.ModelSpace.AddText(txtStr, insPnt, txtHeight)
i = i + 1
Loop 展开
若以下回答无法解决问题,邀请你更新回答
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询