AnsweredAssumed Answered

SetArrowHeadStyleAtIndex→why don't change arrow style?

Question asked by Yong Ning on Jul 30, 2017
Latest reply on Jul 31, 2017 by Yong Ning

In solidworks 2012 , API. Why don't change arrow head style?




Private Sub del()

   Dim SwApp As SldWorks.SldWorks, SwModel As ModelDoc2

       Set SwApp = Application.SldWorks

       Set SwModel = SwApp.ActiveDoc

   Dim SwSelMgr As SelectionMgr

       Set SwSelMgr = SwModel.SelectionManager

   Dim SwNote As Note, SwAnn As Annotation

       Set SwNote = SwSelMgr.GetSelectedObject5(1)

       Set SwAnn = SwNote.GetAnnotation

       With SwAnn

           Debug.Print .GetArrowHeadStyleAtIndex(1)

           .SetLeader3 swSTRAIGHT, 0, True, True, True, True

           .SetArrowHeadStyleAtIndex -1, swNO_ARROWHEAD ' swDOT_ARROWHEAD

       End With


End Sub




The return status of this method can have the following values:


If value equals...

Then the arrowhead style was...


Successfully set


Not set because of an unknown error


Not set because of an invalid index value


Not set because of smart arrowhead styles being enabled


Not set because of an invalid arrowhead style value