godspeedm9 发表于 2009-5-21 21:16:00

问下使用VB的AutoCAD尺寸标注问题

<p>就是填写上下偏差 然后标注在图上,代码如下</p><p>Private Sub Command1_Click()<br/>Dim dimobj As AcadDimAligned<br/>Dim zcad As AcadApplication<br/>Dim point1 As Variant<br/>Dim point2 As Variant<br/>&nbsp;point1 = ThisDrawing.Utility.GetPoint(, vbCr &amp; "第一点")<br/>&nbsp;point2 = ThisDrawing.Utility.GetPoint(, vbCr &amp; "第二点")<br/>&nbsp;Set dimobj = acadApp.ActiveDocument.ModelSpace.AddDimAligned(point1, point2, location)<br/>&nbsp;dimobj.DecimalSeparator = "."<br/>&nbsp;dimobj.ToleranceDisplay = acTolSymmetrical<br/>&nbsp;dimobj.ToleranceHeightScale = 0.5<br/>&nbsp;dimobj.ToleranceLowerLimit = Text1.Text<br/>&nbsp;dimobj.ToleranceUpperLimit = Text2.Text<br/>End Sub</p><p>出现 实时错误 424 在point1 = ThisDrawing.Utility.GetPoint(, vbCr &amp; "第一点") 这一行 </p><p>请问这是怎么一回事啊?<br/></p>

mccad 发表于 2009-5-21 21:31:00

ThisDrawing有没有定义并赋值

godspeedm9 发表于 2009-5-21 21:48:00

没有耶
页: [1]
查看完整版本: 问下使用VB的AutoCAD尺寸标注问题