尺寸标注的问题!
在对齐标注中,尺寸界线间的位置不够,我把fit属性设为acBestFit,但为什么还是一样,文字太宽的时候,它还是标在尺寸界线之间?奇怪!请教!是不是还有什么属性要设置的? Sub qingli()<BR>Dim tuceng As AcadLayer<BR>On Error Resume Next<BR>If IsNull(ThisDrawing.Layers.Item("0")) Then<BR> Set tuceng = ThisDrawing.Layers.Add("0")<BR> tuceng.color = 7<BR> tuceng.Lineweight = acLnWt035<BR>End IfIf IsNull(ThisDrawing.Layers.Item("细线")) Then<BR> Set tuceng = ThisDrawing.Layers.Add("细线")<BR> tuceng.color = 1<BR> tuceng.Lineweight = acLnWt013<BR>End If<BR>Dim SSset As AcadSelectionSet '建立选择集"SS1"<BR>Dim enti As AcadEntity<BR>If Not IsNull(ThisDrawing.SelectionSets.Item("SS1")) Then<BR> Set SSset = ThisDrawing.SelectionSets.Item("SS1")<BR> SSset.Delete<BR>End If<BR>Set SSset = ThisDrawing.SelectionSets.Add("SS1")<BR>Dim filterType As Integer<BR>Dim filterData As Variant<BR>filterType = 8<BR>For Each tuceng In ThisDrawing.Layers<BR>filterType = tuceng.Name<BR>SSset.Select acSelectionSetAll<BR>For Each enti In SSset
If enti.Layer = "0" Then '图层"0"<BR> If tuceng.color = 7 Then<BR> If enti.color = acByLayer Or enti.color = 7 Or enti.color = acByBlock Then<BR> ' MsgBox tuceng.Name & "," & enti.color<BR> enti.color = 7<BR> enti.Update<BR> Else<BR> 'MsgBox tuceng.Name & "," & enti.color<BR> enti.color = 1<BR> enti.Layer = "细线"<BR> enti.Update<BR> End If<BR> ElseIf tuceng.color = 1 Then<BR> If enti.color = 7 Or enti.color = acByBlock Then<BR> enti.color = 7<BR> enti.Update<BR> Else<BR> enti.color = 1<BR> enti.Layer = "细线"<BR> enti.Update<BR> End If<BR> Else<BR> If enti.color = 7 Or enti.color = acByBlock Then<BR> enti.color = 7<BR> enti.Update<BR> Else<BR> enti.color = 1<BR> enti.Layer = "细线"<BR> enti.Update<BR> End If<BR> End If<BR> 'End If<BR> ElseIf enti.Layer = "细线" Then '图层"细线"<BR> If tuceng.color = 7 Then<BR> If enti.color = acByLayer Or enti.color = 7 Or enti.color = acByBlock Then<BR> MsgBox tuceng.Name & tuceng.color & enti.color<BR> enti.color = 7<BR> enti.Layer = "0"<BR> enti.Update<BR> Else<BR> 'MsgBox tuceng.Name & "," & enti.color<BR> enti.color = 1<BR> 'enti.Layer = "细线"<BR> enti.Update<BR> End If<BR> ElseIf tuceng.color = 1 Then<BR> If enti.color = 7 Or enti.color = acByBlock Then<BR> enti.color = 7<BR> enti.Layer = "0"<BR> enti.Update<BR> Else<BR> enti.color = 1<BR> 'enti.Layer = "细线"<BR> enti.Update<BR> End If<BR> Else<BR> If enti.color = 7 Or enti.color = acByBlock Then<BR> enti.color = 7<BR> enti.Layer = "0"<BR> enti.Update<BR> Else<BR> enti.color = 1<BR> 'enti.Layer = "细线"<BR> enti.Update<BR> End If<BR> End If<BR> 'End If<BR> Else ' enti.Layer <> "细线" And enti.Layer <> "0" Then '图层"其它"<BR> If tuceng.color = 7 Then<BR> If enti.color = acByLayer Or enti.color = 7 Or enti.color = acByBlock Then<BR> MsgBox tuceng.Name '& "," & enti.color<BR> enti.color = 7<BR> enti.Layer = "0"<BR> enti.Update<BR> Else<BR> 'MsgBox tuceng.Name & "," & enti.color<BR> enti.color = 1<BR> enti.Layer = "细线"<BR> enti.Update<BR> End If<BR> ElseIf tuceng.color = 1 Then<BR> If enti.color = 7 Or enti.color = acByBlock Then<BR> enti.color = 7<BR> enti.Layer = "0"<BR> enti.Update<BR> Else<BR> enti.color = 1<BR> enti.Layer = "细线"<BR> enti.Update<BR> End If<BR> Else<BR> If enti.color = 7 Or enti.color = acByBlock Then<BR> enti.color = 7<BR> enti.Layer = "0"<BR> enti.Update<BR> Else<BR> enti.color = 1<BR> enti.Layer = "细线"<BR> enti.Update<BR> End If<BR> End If<BR> End If
Next enti<BR>Next tuceng<BR>For Each tuceng In ThisDrawing.Layers<BR> If tuceng.Name = "0" Then<BR> tuceng.color = 7<BR> tuceng.Lineweight = acLnWt035<BR> End If<BR> If tuceng.Name = "细线" Then<BR> tuceng.color = 1<BR> tuceng.Lineweight = acLnWt013<BR> End If<BR> If tuceng.Name <> "0" And tuceng.Name <> "细线" And tuceng.Name <> "定义点" And tuceng.Name <> "Defpoints" Then<BR> tuceng.Delete<BR> End If<BR>Next tuceng<BR>SSset.clease<BR>SSset.Delete
End Sub<BR> 你什么意思啊?我问的问题你怎么给我这样一个解释呢?大家评评理!!!!!
我不明白你的意思啊!
页:
[1]