2 Replies Latest reply on Sep 15, 2016 9:50 AM by William Cruz

    SOLIDWORKS API  “SetArrowHeadStyle2”

    Frank Wu Frank Wu

      Hello everyone!

       

      I want to change all the arrows' type to swDOT_ARROWHEAD  (3 = Filled circle) by SOLIDWORKS API  : “SetArrowHeadStyle2”  . But I don't konw how to write code, Who Can do me a favour

       

       

      图片1.png

        • Re: SOLIDWORKS API  “SetArrowHeadStyle2”
          Scott Stuart

          Do you really want to change individual arrows' style, or do you want to change the document properties as shown below?

          Untitled.png

          • Re: SOLIDWORKS API  “SetArrowHeadStyle2”
            William Cruz

            This is part of something that I worked on a while back. It should get you going in the right direction:

             

                                /*FORMAT THE ANNOTATION*/
                                Annotation tmpAnno = _swNote.GetAnnotation();
            
                                /*FORMAT THE ARROW HEAD*/
                                if (chkBentLeader.Checked)
                                {
                                    tmpAnno.SetLeader3((int)swLeaderStyle_e.swBENT, (int)swLeaderSide_e.swLS_SMART, false, false, false, false);
                                }
                                else
                                {
                                    tmpAnno.SetLeader3((int)swLeaderStyle_e.swSTRAIGHT, (int)swLeaderSide_e.swLS_SMART, false, false, false, false);
                                }
            
                                /*CHANGE THE ARROW HEAD*/
                                tmpAnno.SetArrowHeadStyleAtIndex(-1, (int)swArrowStyle_e.swDOT_ARROWHEAD);