See the top rated post in this thread. Click here

Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Brick Jack Arch Lisp Help

  1. #1
    All AUGI, all the time BCrouse's Avatar
    Join Date
    2003-04
    Location
    Bethlehem, PA
    Posts
    980
    Login to Give a bone
    0

    Thumbs up Brick Jack Arch Lisp Help

    Please look at this lisp and help me out trying to get past the third command. Also, I was wondering if there could be a function that makes the drawing that was created a block and name it pertaining to the type of Brick Jack Arch, length and send it to a file ? See examples for names

    4cK-45.5.dwg

    4c = 4 course high brick
    K = keystone
    45.5 = length

    _________

    3cK-45.5.dwg

    3c = 3 course high brick
    K=keystone
    45.5 = length
    ___________

    4c-45.5.dwg

    4c = 4 course high brick
    45.5 = length

    _________

    3c-45.5.dwg

    3c = 3 course high brick
    45.5 = length



    Thank you,

    Brad
    Attached Files Attached Files

  2. #2
    100 Club lance.81922's Avatar
    Join Date
    2005-01
    Location
    Santa Fe, NM
    Posts
    176
    Login to Give a bone
    0

    Default Re: Brick Jack Arch Lisp Help

    Brad -- You need to learn how to step through your program with the debugger. Your initial error is in your DTR function. AutoLISP knows pi as PI -- not as #p or #P. Fix that and then continue. If you don't know how to step through, go to the VisualLISP window, pick the Debug menu, and click on Stop Once. Then go ahead and load your program and watch what happens.

  3. #3
    All AUGI, all the time BCrouse's Avatar
    Join Date
    2003-04
    Location
    Bethlehem, PA
    Posts
    980
    Login to Give a bone
    0

    Thumbs up Re: Brick Jack Arch Lisp Help

    Quote Originally Posted by lance.81922
    Brad -- You need to learn how to step through your program with the debugger. Your initial error is in your DTR function. AutoLISP knows pi as PI -- not as #p or #P. Fix that and then continue. If you don't know how to step through, go to the VisualLISP window, pick the Debug menu, and click on Stop Once. Then go ahead and load your program and watch what happens.
    Thank you for your help Lance. I really appreciate it.

    Thank you,

    Brad

  4. #4
    All AUGI, all the time BCrouse's Avatar
    Join Date
    2003-04
    Location
    Bethlehem, PA
    Posts
    980
    Login to Give a bone
    0

    Question Re: Brick Jack Arch Lisp Help

    Quote Originally Posted by lance.81922
    Brad -- You need to learn how to step through your program with the debugger. Your initial error is in your DTR function. AutoLISP knows pi as PI -- not as #p or #P. Fix that and then continue. If you don't know how to step through, go to the VisualLISP window, pick the Debug menu, and click on Stop Once. Then go ahead and load your program and watch what happens.
    I changed the #p or P# to be PI the the lisp. When debugging it gets hung up @ the following areas .

    Code:
     
     ;;define DEGREE to RADIAN function
    (defun DTR (X)  (/ (* X PI) 180.0) ;_MULTIPLY THE  DGR ING BY PI  AND DIVIDE IT BY 180
    ) ;_end dtr

    and this area:

    Code:
      
    (defun calculus ()
      (setq ang-arch 24)
      (setq #ang-arch (dtr ang-arch))
      (setq #ang-arch/2 (/ #ang-arch 2))
      (setq left-ang (+ PI90 #ang-arch/2))
      (setq right-ang (- PI90 #ang-arch/2))
    ;;(4C-cal)
    ;;(3c-cal)  
    ) ;_end defun (calculus)


    Why is the PI causing ti hang up?

    Thank you,

    Brad

  5. #5
    All AUGI, all the time CAB2k's Avatar
    Join Date
    2016-01
    Location
    Brandon, Florida
    Posts
    687
    Login to Give a bone
    0

    Default Re: Brick Jack Arch Lisp Help

    you must seperate the / with a space #ang-arch/2 in not the same as #ang-arch / 2

    the DTR function looks ok, what line of code is calling it? is the item passes a number?

  6. #6
    I could stop if I wanted to scwegner's Avatar
    Join Date
    2004-12
    Location
    Minneapolis, MN
    Posts
    449
    Login to Give a bone
    0

    Default Re: Brick Jack Arch Lisp Help

    Quote Originally Posted by ab2draft
    you must seperate the / with a space #ang-arch/2 in not the same as #ang-arch / 2

    the DTR function looks ok, what line of code is calling it? is the item passes a number?
    You're right, they're not the same. But he's not trying for that. #ang-arch/2 is his variable name (albeit a complicated one). #ang-arch / 2 is invalid syntax and would cause an error. DTR is called in the third line of the second defun.

    I didn't see anything wrong with DTR and it worked fine when I tried it. Why are you convinced the pi is still causing the problem. What's PI90? Starting at the beginning with jack-archs it goes to user-data and then to calculus without having defined any variable called PI90. In fact, I didn't see it defined anywhere in the file.

    A few side notes (and these are stylistic so obviously a personal preference):
    There's no need for so many setqs you can clean it up a little like this

    Code:
      (defun calculus    ()
      
        (setq ang-arch 24)
                #ang-arch (dtr ang-arch)
                #ang-arch/2 (/ #ang-arch 2)
                left-ang (+ #p90 #ang-arch/2)
                right-ang (- #p90 #ang-arch/2)
        );setq
      ;;(4C-cal)
      ;;(3c-cal)  
      
      ) ;_end defun (calculus)
    Not a big difference there, but over the course of a huge program like that it helps group things and saves a lot of typing.
    Second, is there a method to the madness as far as the order of your subroutines? I couldn't see one and with so many, it's helpful to have them sorted somehow.
    Last edited by scwegner; 2005-07-21 at 05:19 PM.

  7. #7
    All AUGI, all the time CAB2k's Avatar
    Join Date
    2016-01
    Location
    Brandon, Florida
    Posts
    687
    Login to Give a bone
    0

    Default Re: Brick Jack Arch Lisp Help

    Quote Originally Posted by scwegner
    You're right, they're not the same. But he's not trying for that. #ang-arch/2 is his variable name (albeit a complicated one). #ang-arch / 2 is invalid syntax and would cause an error.
    Ooops, I should pay more attention.

  8. #8
    All AUGI, all the time BCrouse's Avatar
    Join Date
    2003-04
    Location
    Bethlehem, PA
    Posts
    980
    Login to Give a bone
    0

    Question Re: Brick Jack Arch Lisp Help

    Quote Originally Posted by scwegner
    You're right, they're not the same. But he's not trying for that. #ang-arch/2 is his variable name (albeit a complicated one). #ang-arch / 2 is invalid syntax and would cause an error. DTR is called in the third line of the second defun.

    I didn't see anything wrong with DTR and it worked fine when I tried it. Why are you convinced the pi is still causing the problem. What's PI90?
    When I am running the debug function in Vlisp. It runs to the point in this functions and stops.
    Code:
      (defun calculus ()
      (setq ang-arch 24)
      (setq #ang-arch (dtr ang-arch))
      (setq #ang-arch / 2 (/ #ang-arch 2))
      (setq left-ang (+ PI90 #ang-arch / 2))
      (setq right-ang (- PI90 #ang-arch / 2))
    ;;(4C-cal)
    ;;(3c-cal)  
    ) ;_end defun (calculus)
    It stops here:
    Code:
     (setq left-ang (+ PI90 #ang-arch / 2))
    I am just taking a guess at it.

    But when I try the routine out. It goes to the third question (Give the brick length) and it gives me a (bad argument type: numberp: nil) when I input a number.


    Thank you,

    Brad

  9. #9
    I could stop if I wanted to scwegner's Avatar
    Join Date
    2004-12
    Location
    Minneapolis, MN
    Posts
    449
    Login to Give a bone
    0

    Default Re: Brick Jack Arch Lisp Help

    Quote Originally Posted by BCrouse

    It stops here:
    Code:
     (setq left-ang (+ PI90 #ang-arch / 2))
    I am just taking a guess at it.

    But when I try the routine out. It goes to the third question (Give the brick length) and it gives me a (bad argument type: numberp: nil) when I input a number.
    Exactly what I thought. You caught me while I was editing my last post but I'll answer here too. The problem is with PI90. I don't see it being defined anywhere and certainly not before you get to it in the program.

    Oh, and get rid of those spaces you just added to #ang-arch/2

  10. #10
    All AUGI, all the time BCrouse's Avatar
    Join Date
    2003-04
    Location
    Bethlehem, PA
    Posts
    980
    Login to Give a bone
    0

    Unhappy Re: Brick Jack Arch Lisp Help

    Quote Originally Posted by scwegner
    Exactly what I thought. You caught me while I was editing my last post but I'll answer here too. The problem is with PI90. I don't see it being defined anywhere and certainly not before you get to it in the program.

    Oh, and get rid of those spaces you just added to #ang-arch/2
    Second, is there a method to the madness as far as the order of your subroutines? I couldn't see one and with so many, it's helpful to have them sorted somehow.
    I did not write this routine. Someone elso wrote this for bnc_designs. I am trying to see if I can get it to work. What would be the best way to get this routine to work in order? Would it need to be rewritten? If so, this routine is to complicated for me to do.

    Thank you,

    Brad

Page 1 of 2 12 LastLast

Similar Threads

  1. Brick Arch
    By sethridge in forum Revit Architecture - General
    Replies: 2
    Last Post: 2009-12-16, 08:51 PM
  2. Replies: 5
    Last Post: 2008-12-02, 01:00 PM
  3. Stone Arch and Jack Arch Lisp Help!
    By BCrouse in forum AutoLISP
    Replies: 2
    Last Post: 2006-07-14, 01:25 AM
  4. Brick Jack Arches and Arches
    By BCrouse in forum AutoLISP
    Replies: 22
    Last Post: 2005-08-16, 08:27 PM
  5. Brick Arches and Jack Arches
    By BCrouse in forum ACA Wish List
    Replies: 0
    Last Post: 2004-06-03, 09:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •