LEADER command lsip

LEADER command lsip

Anonymous
Not applicable
859 Views
1 Reply
Message 1 of 2

LEADER command lsip

Anonymous
Not applicable

can anyone help me in writing lsip for leader command with open arrow, size 2.5in without text.

0 Likes
Accepted solutions (1)
860 Views
1 Reply
Reply (1)
Message 2 of 2

ВeekeeCZ
Consultant
Consultant
Accepted solution

Here your are. Create your dimstyle first, name it "LeaderArrow". Make sure that this style is always in the drawing.

 

You didn't say whether your leader should have 3 point or just 2. Erase the blue PAUSE it the later.

 

(defun c:LeaderArrow ( / *error* oDIMSTYLE)
  
  (defun *error* (errmsg)
    (if (not (wcmatch errmsg "Function cancelled,quit / exit abort,console break,end"))
      (princ (strcat "\nError: " errmsg)))
    (command-s "_.DIMSTYLE" "_Restore" "LeaderArrow" oDIMSTYLE)
    (princ))

  (setq oDIMSTYLE (getvar 'DIMSTYLE))

  (if (tblsearch "DIMSTYLE" "LeaderArrow")
    (command "_.DIMSTYLE" "_Restore" "LeaderArrow"
             "_.LEADER" PAUSE PAUSE PAUSE  ;; erase last PAUSE if you want to have 2 points only
             "_Annotation" "" "_none")
    (princ "\nError: There is no 'LeaderArrow' style in the drawing."))
  (*error* "end")
  )
0 Likes