AnsweredAssumed Answered

How to use WidthFactor in TableAnnotation

Question asked by Yong Ning on Jan 3, 2014
Latest reply on Jan 3, 2014 by Yong Ning

0.jpg

 

Sub replSwAnn()

  Dim rr, Str

  Dim SwDraw As DrawingDoc, swDrawExt As SldWorks.ModelDocExtension

  Dim SwSelMgr As SldWorks.SelectionMgr  ''

  Dim swTable As SldWorks.TableAnnotation

  Dim SwAnn As Annotation

  Dim SwTextFormat As TextFormat

 

 

  Set SwDraw = Application.SldWorks.ActiveDoc

  Set swDrawExt = SwDraw.Extension

  Set SwSelMgr = SwDraw.SelectionManager

  ' Select general table feature in FeatureManager design tree

  Set swTable = SwSelMgr.GetSelectedObject6(1, 0)

 

  With swTable

     Set SwAnn = .GetAnnotation

  End With

  ''

  Set SwTextFormat = SwAnn.GetTextFormat(0)'' SwTextFormat Result is Nothing

  With SwTextFormat

     .WidthFactor = 0.9 '→ don't run WidthFactor

  End With

End Sub

Attachments

Outcomes