fmfm 发表于 2004-5-15 15:34:00

请问怎么访问DimAligned ?

这样到 <FONT color=#e61a1a>For Each dimobj In ThisDrawing.ModelSpace 提示 type mismatch</FONT><BR>Dim dimobj as Acaddimention<BR>For Each dimobj In ThisDrawing.ModelSpace<BR>                       If TypeOf dimobj Is AcadDimAligned Then<BR>                       MsgBox "ok"<BR>                       End If<BR>Next<BR>



这样什么反映都没有


Dim dimobj As AcadEntity<BR>For Each dimobj In ThisDrawing.ModelSpace<BR>                       If TypeOf dimobj Is AcadDimAligned Then<BR>                       MsgBox "ok"<BR>                       End If<BR>Next

雪山飞狐_lzh 发表于 2004-5-15 19:40:00

本帖最后由 作者 于 2004-5-17 23:24:08 编辑 <br /><br /> AcadDimAligned       是对齐标注



AcadDimRotated 是线性标注


你要的是AcadDimRotated 吧


你用





Dim dimobj As AcadEntity<BR>For Each dimobj In ThisDrawing.ModelSpace<BR>                       If TypeOf dimobj Is AcadDimRotated Then<BR>                       MsgBox dimobj.ObjectName<BR>                       End If<BR>Next


<BR>试试


用选择集+过滤器选择所有的标注





Dim FilterType(6) As Integer<BR>Dim FilterData(6) As Variant<BR>Dim ss As AcadSelectionSet<BR>Dim a(2) As Double<BR>a(0) = 100<BR>FilterType(0) = 0<BR>FilterData(0) = "Dim*"<BR>FilterType(1) = -4<BR>FilterData(1) = "&lt;or"<BR>FilterType(2) = -4<BR>FilterData(2) = "=,*,*"<BR>FilterType(3) = 13<BR>FilterData(3) = a<BR>FilterType(4) = -4<BR>FilterData(4) = "=,*,*"<BR>FilterType(5) = 14<BR>FilterData(5) = a<BR>FilterType(6) = -4<BR>FilterData(6) = "or&gt;"<BR>Set ss = ThisDrawing.ActiveSelectionSet<BR>ss.Clear<BR>ThisDrawing.ActiveSelectionSet.Select acSelectionSetAll, , , FilterType, FilterData<BR>MsgBox ss.Count<BR>选择所有横坐标为100的标注
页: [1]
查看完整版本: 请问怎么访问DimAligned ?