|
- ''Annotations = SwDraw.InsertModelAnnotations3(0, 32776, False, False, True, True)
- With SwDraw
- pLayerMgr.SetCurrentLayer "文本"
- Annotations = .InsertModelAnnotations3(0, swInsertNotes, False, True, True, True)
- pLayerMgr.SetCurrentLayer "尺寸线"
- Annotations = .InsertModelAnnotations3(0, 1736728, True, True, True, True)
- ''Stop
- ''
- .ClearSelection2 True
- End With
- ''
- Str = Join(Xls.WorksheetFunction.Transpose(Rng), ",")
- 'Debug.Print Rng.Address, Str
- For ii = 0 To UBound(Annotations)
- ''
- Set SwAnn = Annotations(ii)
- Set SwDispDim = SwAnn.GetSpecificAnnotation
- Set SwDim = SwDispDim.GetDimension
- 'nn = InStr(Str, SwDim.Name)
- 'Debug.Print SwDim.FullName
- If InStr(Str, SwDim.FullName) = 0 Then
- SwAnn.Select True
- Else
- SwDispDim.CenterText = True
- End If
- 'Debug.Print SwDim.FullName Next ii
复制代码
要解决的问题是API,插入所有尺寸,需要删除,如何删除就要用到算定的草图中的尺寸。 |
|