Author Topic: Curved leader  (Read 10626 times)

0 Members and 1 Guest are viewing this topic.

VENUS

  • Guest
greedy needs
« Reply #15 on: January 25, 2005, 05:06:19 PM »
CAB,  
I recently found this forum in my search for a curved leader routine so thanks for sharing the lisp routines.  I'm having trouble getting the routine to use a different arrow head type.  How would I go about doing this?  Also, how could I format the arrow and add text to the leader  and have both be a specific size as a standard AutoCAD leader would?  Maybe you have a routine that fullfills my greedy needs. . .??!
Thanks again for the help
PS I'm a lisp newbee

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Curved leader
« Reply #16 on: January 25, 2005, 05:15:10 PM »
Welcome aboard.
Which routine are you trying to use?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

VENUS

  • Guest
Curved leader
« Reply #17 on: January 25, 2005, 05:51:53 PM »
it's the first lisp routine you posted here (post dated Jan 04, 05) for the arcl command.  I saw the post posts of related lisp routines, but being new to the whole lisp thing, didn't know where to begin. . .

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Curved leader
« Reply #18 on: January 25, 2005, 06:19:10 PM »
Well all you want to do is add a TEXT command to the routine.
Does it need to be on a particular layer or current, if not current define the layer.
Do you want a particular text style or current? If not current define the text style.
Do you use a text style with zero height, If so what height do you want the text?
Do you want to place the leader first? if so what text justification do you want?
[ top, middle, or bottom ] Left, Right will be determined by the leader direction.

You see there are a lot of options when you add text. :)

You do realize that the curved leader is not linked to the text like an ACAD leader is?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

VENUS

  • Guest
Curved leader
« Reply #19 on: January 25, 2005, 06:30:18 PM »
:shock: AHHH!
ok forget the text :) I can do without it; but the arrow is a must (ya gotta have standards ya know).  back to my initial question (before I got greedy):
how can I get my arrow onto the curved leader and specify what the scale of the arrow is?

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Curved leader
« Reply #20 on: January 25, 2005, 06:49:39 PM »
Ok, are you using your block?
Does it need to be scaled?
Is the point on the left & it points left?
Will it exist in the drawing? Or is it a DWG in the ACAD path?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

VENUS

  • Guest
Curved leader
« Reply #21 on: January 25, 2005, 07:24:28 PM »
yes, I have the routine loaded and it works great
right now it is just part of the dwg but I would like AutoCAD to automaticallly load it at startup.
for the drawing I'm doing right now, it doesn't need to be scaled
I really appreciate the help

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Curved leader
« Reply #22 on: January 25, 2005, 07:37:06 PM »
To have the routine load into every drawing enter appload at the command line.
Click on 'Contents' under the "Startup Suite"
Then click add, find the lisp & click add.
Now in any drawing you may enter arcl at the command line & it will run.

Tell me about the block you are trying to use with the routine.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

VENUS

  • Guest
Curved leader
« Reply #23 on: January 25, 2005, 07:42:07 PM »
It is a simple dwg file.  I'm able to use it successfully when doing a spline leader or other type of leader.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Curved leader
« Reply #24 on: January 25, 2005, 08:13:10 PM »
Try this routine
http://theswamp.org/phpBB2/viewtopic.php?t=3753
Is your arrow head solid like that?
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

t-bear

  • Guest
Curved leader
« Reply #25 on: January 25, 2005, 08:45:15 PM »
Welcome to the Swamp, Venus!  You've discovered the finest Gurus of CAD in the industry today.  While you're here, take a few seconds to join the gang....(there's *SECRET* forums that only members can see...tempt, tempt....).  It won't hurt hardly at all....LOL
In the mean time, you're in good hands!  Enjoy the ride.

venus

  • Guest
Curved leader
« Reply #26 on: January 26, 2005, 11:01:29 AM »
Thanks, Bear.  I'm official now - you're right about the *secret* stuff!
CAB:
I tried out the routine linked previously but it is not the correct arrowhead - I've uploaded the arrowhead I use into lilypond.  It's a dwg file called Arrow90.  Is this something that has to be programmed into the routine?  I take it I can't just go into some kind of options menu and select the arrowhead I want. . .
btw:  I found the link (here in the swamp none the less!) to http://www.smadsen.com/
It has been most helpful in my understanding of LISP
THE SWAMP ROCKS!

SMadsen

  • Guest
Curved leader
« Reply #27 on: January 26, 2005, 11:11:49 AM »
Quote from: venus
btw:  I found the link (here in the swamp none the less!) to http://www.smadsen.com/

Hmmm .. that url seems familiar somehow  :shock:
(glad if you could use some of that old stuff)

Welcome aboard, Venus.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Curved leader
« Reply #28 on: January 26, 2005, 11:27:19 AM »
venus,
I took the liberty of creating a folder in your name and moved your drawing there.
Here is the link
Arrow90
I will take a look at your dwg and get back to you.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Curved leader
« Reply #29 on: January 26, 2005, 12:13:43 PM »
OK try this one out.
But you must first download the Arrow90 file from here because your file
had a Arrow90 block alread in it. Your file will cause an error. Replace it.

Code: [Select]
;;;   ArcLv.lsp    (Arc Leader)
;;;   Created for venus @ the Swamp
;;;   Uses the current layer & Arrow90 Arrow head
;;;   Creates an arc leader, Arrow90.DWG must be in the ACAD path
;;;
;;; ARGUMENTS
;;; none
;;;
;;; USAGE
;;; arclv
;;;
;;; PLATFORMS
;;; 2000+
;;;
;;; AUTHOR
;;; Copyright© 2005 Charles Alan Butler
;;; ab2draft@TampaBay.rr.com
;;;
;;; VERSION
;;; 1.0 Jan 21, 2005
;;
;; YOU MAY USE THIS CODE ONLY FOR *NON-COMMERCIAL*
;; PURPOSES AND ONLY IF YOU RETAIN
;; THIS HEADER COMPLETE AND UNALTERED
;; you must contact me if you want to use it commercially
;;
;;;======  Main Lisp Routine  =======
(defun c:arclv (/ usercmd useros userangdir loop ptpick lastpt arwsize
                ang dist enpt len p1 stpt vobj)
  (vl-load-com)
  ;; error function & Routine Exit
  (defun *error* (msg)
    (if
      (not
        (member
          msg
          '("console break" "Function cancelled" "quit / exit abort" "")
        )
      )
       (princ (strcat "\nError: " msg))
    ) ; if
    (setvar "osmode" useros)
    (setvar "CMDECHO" usercmd)
    (setvar "angdir" userangdir)
    (princ)
  ) ;end error function


;;;=============================================================
;;;=============================================================
;;;                  Routine Starts Here                        
;;;=============================================================
;;;=============================================================
  (princ "\n")
  (princ "\n            Arc Leader 2 Heads - Version 1.2")
  (princ "\n")
  (if (and (not (tblsearch "block" "Arrow90"))
           (not (findfile "Arrow90.dwg")))
    (progn
      (alert "Arrow90 DWG not found.")
      (exit)
    )
  )


;;; -------  Some Housekeeping   ------------------
  (setq usercmd (getvar "CMDECHO"))
  (setvar "CMDECHO" 0)
  (setq useros (getvar "osmode"))
  (setvar "osmode" 0)
  (setq userangdir (getvar "angdir"))
  (setvar "angdir" 0)

  ;;-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  (setq arwsize (* (getvar "dimasz") (getvar "dimscale")))
  ;;-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  (setq ptpick (getpoint "\nDraw Arc, Arrow location first."))
  (if (= (type ptpick) 'list)
    (progn
      (command "._arc" ptpick pause pause)
      (if (= "ARC" (cdr (assoc 0 (entget (entlast)))))
        (progn ; arc created
          ;;-------------------------------------------------------
          (setq vobj (vlax-ename->vla-object (entlast)))
          (setq stpt (vlax-curve-getstartpoint vobj))
          (setq enpt (vlax-curve-getendpoint vobj))
          (setq len (vlax-curve-getdistatparam
                      vobj
                      (vlax-curve-getendparam vobj)
                    )
          )
          (if (< (distance stpt ptpick) (distance enpt ptpick))
            (setq dist arwsize)
            (setq dist    (- len arwsize)
                  arwsize (- arwsize)
            )
          )

          (setq p1 (vlax-curve-getpointatdist vobj dist))
          (setq ang (* 180.0 (/ (angle p1 ptpick) pi)))
          (command "_.insert" "Arrow90" "S" (abs arwsize) ptpick ang) ; arrow head
          ;;--------------------------------------------------------------
        ); progn
      ) ; endif
    ) ; progn
  ) ; endif

  (*error* "")
  (princ)
) ;  end defun
(prompt "\nArc Leader Loaded, Type  ArcLv  to run")
(princ)

;;;==========  End of Routine  ============
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.