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?

dot.jpg

 

 

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

       Stop

End Sub

 

***********************************************

 

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

    

If value equals...

Then the arrowhead style was...

0

Successfully set

-1

Not set because of an unknown error

-2

Not set because of an invalid index value

-3

Not set because of smart arrowhead styles being enabled

-4

Not set because of an invalid arrowhead style value

Attachments

Outcomes