AnsweredAssumed Answered

Why don't get the DisplayDimension in Sheet Format

Question asked by Yong Ning on Aug 14, 2015
Latest reply on Aug 14, 2015 by Leon Wurr

Follow code, why don't get DisplayDimension in Sheet Format?

1.jpg

 

Set swView = swDraw.GetFirstView

Ss = swView.GetAnnotations →  is empty, see bottom picture

 

 

 

2.jpg

 

 

 

 

 

follow code, don't find displaydimention.in Sheet Format? can be get displaydimension in View?

 

 

Private Sub ll3()

   Dim swApp As SldWorks.SldWorks, swModel As ModelDoc2

      Set swApp = Application.SldWorks

      Set swModel = swApp.ActiveDoc

   Dim swDraw As DrawingDoc, swView As View

      Set swDraw = swModel

      Set swView = swDraw.GetFirstView

   Dim SwAnn As Annotation, Ss

      Ss = swView.GetAnnotations

   Dim SwDispDim As DisplayDimension, SwDim As Dimension

 

   For ii = 0 To UBound(Ss)

      Set SwAnn = Ss(ii)

      Set SwDispDim = SwAnn.GetSpecificAnnotation

      Set SwDim = SwDispDim.GetDimension

      Debug.Print SwDim.FullName, SwDim.Value

   Next ii

End Sub

'''*****************

 

Set SwDispDim = swView.GetFirstDisplayDimension

  result → result is nothing?

3.jpg

 

 

 

 

 

Private Sub ll4()

   Dim swApp As SldWorks.SldWorks, swModel As ModelDoc2

      Set swApp = Application.SldWorks

      Set swModel = swApp.ActiveDoc

   Dim swDraw As DrawingDoc, swView As View

      Set swDraw = swModel

      Set swView = swDraw.GetFirstView

   Dim SwDispDim As DisplayDimension, SwDim As Dimension

      Set SwDispDim = swView.GetFirstDisplayDimension

      Stop

 

End Sub

Attachments

Outcomes