Lisp for Ordinate Dims

Discussion in 'AutoCAD' started by gregtapper, Oct 8, 2004.

  1. gregtapper

    gregtapper Guest

    is there a way to make a lisp so that when you are using ordinate dimensions that when you pick the hole that it pulls the X and Y value at the same time? instead of having to do the X and then Repeat for Y?
     
    gregtapper, Oct 8, 2004
    #1
  2. gregtapper

    Doug Broad Guest

    Yes.


    value at the same time? instead of having to do the X and then Repeat for Y?
     
    Doug Broad, Oct 8, 2004
    #2
  3. gregtapper

    gregtapper Guest

    lol mind on telling me how? thx in advance
     
    gregtapper, Oct 11, 2004
    #3
  4. gregtapper

    Doug Broad Guest

    1) Have your program ask for the extension line origin (P1).
    2) Pass that point (P1) to the getcorner function, asking for the second point (P2).
    That gives the drafter a visual reference to approximately how the ordinates will
    get placed while they are entering P2.
    3) Make the dimension layer current, the osnaps are off, and that
    color, linetype, and lineweight are bylayer.
    4) Run the dimordinate command twice.
    a. First time pass P1 and (list (car p1)(cadr p2) for the y ordinate.
    b. Second time pass p1 and (list (car p2)(cadr p1) for the x ordinate.
    5) Restore layer, color, linetype, lineweight and osnap settings.

    An alternative to 3-5 is to use activeX functions to add the ordinate
    dimension. Command methods are probably an easier introduction to
    programming however, since you program similarly to how you actually
    draw the work.

    Its not a particularly difficult process, if you give it a try.
     
    Doug Broad, Oct 11, 2004
    #4
  5. ok, you finish off the layer settings part.
    I did this because I could not figure out what he was saying, it was easier to write the lisp and see it work than think
    about it...

    (defun C:EASY ( / P1 P2)
    (SETQ P1 (GETPOINT "\nPick first point:")
    P2 (GETCORNER P1 "\nPick next point:")
    )
    (command "dimordinate" P1 (list (car p1)(cadr p2)))
    (command "dimordinate" P1 (list (car p2)(cadr p1)))
    (PRINC)
    )

    gregtapper <>
    |>is there a way to make a lisp so that when you are using ordinate dimensions that when you pick the hole that it pulls the X and Y value at the same time? instead of having to do the X and then Repeat for Y?

    James Maeding
    jmaeding at hunsaker dot com
    Civil Engineer/Programmer
     
    James Maeding, Oct 12, 2004
    #5
  6. gregtapper

    gregtapper Guest

    thats close to what i want james, but instead of when you pick the hole and your select box comes out is there a way to set it to just drag them both out at the same time like you do normally with 1 point?
     
    gregtapper, Oct 14, 2004
    #6
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.