'Option Explicit
Dim swApp As SldWorks.SldWorks
Dim swPart As SldWorks.ModelDoc2
Dim swView As IView
Dim swViewd As IAnnotation
Dim swAnnotation As SldWorks.Annotation
Dim swDisplayDimension As SldWorks.DisplayDimension
Sub main()
Set swApp = Application.SldWorks
Set swPart = swApp.ActiveDoc
Set swAnnotation = swPart.GetFirstAnnotation2
Set swView = swPart.GetFirstView '激活图纸页中模型的配置
Set swViewd = swView
vv = swView.GetDimensionDisplayString2()
vvv = swViewd.IsDangling()
End Sub