如何判断从图中取得的标注是水平的,还是竖向的
本帖最后由 作者 于 2004-7-21 10:55:27 编辑如何判断从图中取得的标注是水平的,竖向的,还是dimaligned?
他们的type of 都是acaddimenison
也没有objectname属性,
不知道那个属性可以判断出来? 怎么会没有objectname属性,传个图看看 lzh741206发表于2004-7-21 11:40:00static/image/common/back.gif怎么会没有objectname属性,传个图看看
<BR>有objectname属性的,我用下面的代码在监视窗口看水平和竖向标注的属性,里面没有显示有objectname属性,但用debug.print输出倒是可以的。水平和竖向标注的objectname属性都是AcDbRotatedDimension,他们的Rotation属性也都是0。
我在监视窗口中看不出水平和竖向标注哪个属性不同。
Sub test()
Dim ent1 As Object, ent2 As Object<BR> Dim p1<BR> ThisDrawing.Utility.GetEntity ent1, p1<BR> ThisDrawing.Utility.GetEntity ent2, p1<BR> Dim dimobj1 As AcadDimRotated, dimobj2 As AcadDimRotated<BR> Set dimobj1 = ent1<BR> Set dimobj2 = ent2<BR> Debug.Print dimobj1.Rotation<BR> Debug.Print dimobj2.Rotation<BR> Debug.Print dimobj1.ObjectName<BR> Debug.Print dimobj2.ObjectName<BR> <BR>End Sub 不好意思,自己顶一下,望高手帮忙指点一下。 Sub Test()<BR>Dim pVlax As New VLAX<BR>Dim pName As String<BR>Dim pEntity As AcadEntity<BR>Dim pBlock As AcadBlock<BR>ThisDrawing.Utility.GetEntity pEntity, pnt<BR>pVlax.NullifySymbol "blockname"<BR>pVlax.EvalLispExpression "(setq blockname (cdr (assoc 2 (entget (handent """ & pEntity.Handle & """)))))"<BR>pName = pVlax.GetLispSymbol("blockname")<BR>pVlax.NullifySymbol "blockname"<BR>Set pVlax = Nothing<BR>Set pBlock = ThisDrawing.Blocks(pName)<BR>For Each i In pBlock<BR>If i.ObjectName = "AcDbMText" Then MsgBox i.Rotation : Exit For<BR>Next i<BR>End Sub<BR>
页:
[1]