Leaders

Discussion in 'AutoCAD' started by sashk, Jul 23, 2004.

  1. sashk

    sashk Guest

    Hello,

    I have a series of leaders (arc, line, spline) that we use. The arc one uses a arc and then inserts an arrowhead block to the end of the leader (lastpoint). I like how the autocad qleader unifies the our block with line so that when we grip the line, the angle of the arrowhead stays with it. I prefer to use my routines for leaders, but how can I make it so that my arrowhead block attaches itself to the line or arc and can change angles when I grip the line?
     
    sashk, Jul 23, 2004
    #1
  2. sashk

    MP Guest

    reactors

    uses a arc and then inserts an arrowhead block to the end of the leader
    (lastpoint). I like how the autocad qleader unifies the our block with line
    so that when we grip the line, the angle of the arrowhead stays with it. I
    prefer to use my routines for leaders, but how can I make it so that my
    arrowhead block attaches itself to the line or arc and can change angles
    when I grip the line?
     
    MP, Jul 23, 2004
    #2
  3. sashk

    sashk Guest

    now, what are those???
     
    sashk, Jul 23, 2004
    #3
  4. sashk

    cadman009 Guest

    did you know that qleader allows spline leaders? they work pretty well. perhaps you could modify your routines to take advantage of that feature. (just in case you weren't aware of it).
     
    cadman009, Jul 23, 2004
    #4
  5. sashk

    mnash Guest

    try this
     
    mnash, Jul 23, 2004
    #5
  6. sashk

    mnash Guest

    soory, try this

    ( prompt "\nSpecify first leader point..." )
    ( setq GP ( getpoint ) )
    ( prompt "\nSpecify next point:" )
    ( command "SETVAR" "DIMLDRBLK" "your icon" "QLEADER" GP PAUSE PAUSE PAUSE "" "SETVAR" "DIMLDRBLK" "." )
    ( prin1 )
    basically you change the variable in CAD, use your leader with your block, and then reset the variable to the default
     
    mnash, Jul 23, 2004
    #6
  7. sashk

    mnash Guest

    instead of
    "your icon"
    "your block"
     
    mnash, Jul 23, 2004
    #7
  8. sashk

    sashk Guest

    I see what you have done. Makes sense. But, what if I created my own leader routines, which I already have, and they have no association with autocads leaders whatsoever. It uses an arc routine and inserts our arrowhead block at the last point specified. The problem is that it is two enities: an arrowhead and a arc (or a line, depending on what routine I use). How can I make them so that they 1. are attached as one enity 2. when I grip it, the arrowhead will change its angle with how I grip it, just like how autocads is? Any ideas?
     
    sashk, Jul 23, 2004
    #8
  9. Yes. Use real leaders. Wouldn't that be a whole lot easier than creating
    some complicated routine to simulate what they will already do?

    Kent Cooper, AIA


    leader routines, which I already have, and they have no association with
    autocads leaders whatsoever. It uses an arc routine and inserts our
    arrowhead block at the last point specified. The problem is that it is two
    enities: an arrowhead and a arc (or a line, depending on what routine I
    use). How can I make them so that they 1. are attached as one enity 2. when
    I grip it, the arrowhead will change its angle with how I grip it, just like
    how autocads is? Any ideas?
     
    Kent Cooper, AIA, Jul 23, 2004
    #9
  10. sashk

    Tim Guest

    Try This..Dont know if its what you want..But I thought I would throw it out
    there.

    Tim W.


    ; spldr.lsp Tim Wilson
    ; Similar to the Quick Leader but without the text prompts

    (defun c:spldr (/ lpt1 lpt2 lpt3)
    (setq #OSM (getvar "osmode"))
    (setq #OTM (getvar "orthomode"))
    (setq #CLE (getvar "clayer"))
    (setvar "OSMODE" 0)
    (setvar "orthomode" 0)
    ; Un-comment the following if you want to place your leaders on a specific
    layer

    ;(IF (NULL (tblsearch "layer" "EN"))
    ; (command "layer" "m" "EN" "c" "112" "" ""))
    ; (command "layer" "s" "EN" "" "")

    (setq lpt1 (getpoint "\nPick Start Point..: "))
    (setq lpt2 (getpoint lpt1 "\nPick Next Point..: "))
    (setvar "ORTHOMODE" 1)
    (command "leader" lpt1 lpt2 "f" "s" pause "" "" "n")
    (setvar "osmode" #osm)
    (setvar "orthomode" #otm)
    (setvar "clayer" #CLE)
    (princ)
    );end defun
    (PRINC)

    uses a arc and then inserts an arrowhead block to the end of the leader
    (lastpoint). I like how the autocad qleader unifies the our block with line
    so that when we grip the line, the angle of the arrowhead stays with it. I
    prefer to use my routines for leaders, but how can I make it so that my
    arrowhead block attaches itself to the line or arc and can change angles
    when I grip the line?
     
    Tim, Jul 23, 2004
    #10
  11. sashk

    sashk Guest

    Yea, I saw that. We have been using our own routines for years and it has worked well. It would be nice if there was a way to join the two objects. I wish I knew how AutoCAD did it because if I take a autocad qleader and explode it, it reveals a line (or spline) and my arrow block. I just wonder how it joined them and made it so that when the angle of the line or spline is changed, it changes the angle of the block as well.
     
    sashk, Jul 23, 2004
    #11
  12. This is not directly related to the question at hand, but there's an example
    here of something unnecessary that I've seen in a lot of people's code in
    this forum:
    (command "layer" "m" "EN" "c" "112" "" ""))
    (command "layer" "s" "EN" "" "")
    When you make a new layer with the M option in the Layer command, it BECOMES
    the current layer in the process. It is redundant to make a layer and then
    set it.
    [Not to mention that there's an extra double-double-quote at the end of that
    second line; and, even if it WAS necessary to make a layer and then set it,
    it's redundant to do it with two Layer commands. You could combine the
    above two lines into:
    (command "layer" "m" "EN" "c" "112" "" "s" "EN" "")
    but the first of the two lines above is enough by itself.]

    Kent Cooper, AIA


    ...
     
    Kent Cooper, AIA, Jul 23, 2004
    #12
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.