+ Reply to Thread
Page 1 of 8 1 2 3 ... LastLast
Results 1 to 10 of 71
  1. #1
    Senior Member
    Computer Details
    NH3man!'s Computer Details
    Operating System:
    Windows 7 x64
    Computer:
    Dell Precision M6600
    CPU:
    Intel Core i7-2960XM 2.70 GHz
    RAM:
    16.0 GB
    Graphics:
    NVIDIA Quadro FX 3700M
    Primary Storage:
    500 Gb SSD
    Monitor:
    2-Acer B273HU
    Using
    AutoCAD 2012
    Join Date
    Mar 2006
    Posts
    178

    Default slope lisp needed

    What I am looking for is a lisp that if I use the alias (hc) that then it will prompt me to pick a block on my drawing, then prompt for slope to be used (ie. -1/8" per foot, +1/8 per foot or what ever slope I need per foot) then prompt for number of times to be copied, then prompt for spacing between the copied blocks (in feet and inches) and at last prompt for the direction of the copied blocks.

    This will save me so much time from moving all these blocks manually.

    Thanks in advance!!!

    NH3man!

  2. #2
    Senior Member
    Computer Details
    NH3man!'s Computer Details
    Operating System:
    Windows 7 x64
    Computer:
    Dell Precision M6600
    CPU:
    Intel Core i7-2960XM 2.70 GHz
    RAM:
    16.0 GB
    Graphics:
    NVIDIA Quadro FX 3700M
    Primary Storage:
    500 Gb SSD
    Monitor:
    2-Acer B273HU
    Using
    AutoCAD 2012
    Join Date
    Mar 2006
    Posts
    178

    Default

    Forgot to mention that this is for 3d drawings so the pitch or slope is in the Z axis.

    Thanks again!

  3. #3
    Forum Deity
    Using
    Civil 3D 2008
    Join Date
    Sep 2006
    Location
    Pittsburgh, PA, USA
    Posts
    3,581

    Default

    It would be easier to help you if you were to post the code you already have written.

  4. #4
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,736

    Default

    Quote Originally Posted by lpseifert View Post
    It would be easier to help you if you were to post the code you already have written.
    Crafty...
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  5. #5
    Senior Member
    Computer Details
    NH3man!'s Computer Details
    Operating System:
    Windows 7 x64
    Computer:
    Dell Precision M6600
    CPU:
    Intel Core i7-2960XM 2.70 GHz
    RAM:
    16.0 GB
    Graphics:
    NVIDIA Quadro FX 3700M
    Primary Storage:
    500 Gb SSD
    Monitor:
    2-Acer B273HU
    Using
    AutoCAD 2012
    Join Date
    Mar 2006
    Posts
    178

    Default

    Hmmmm I don't mean to sound silly but if I had written it I wouldn't need to ask for it. I am not at all familiar with writing lisp code. About all I can do is describe what I need it to do.

  6. #6
    Senior Member
    Using
    Map 3D 2008
    Join Date
    Apr 2009
    Location
    The one after 909
    Posts
    402

    Default

    NH3, many of us are more than eager to dash into AutoCAD and cobble together a working script for anyone who comes a'calling.. heck, most people here are doing LISP for fun, and a challenge is always welcome.. but this is a HELP forum, not, as many people have indicated before, a LISP Bazaar. Give it a shot yourself, even if you can read through a few help files and give us a concept.. some idea you might have.. even a conceptual understanding of the raw mechanics of what might yield a plausible solution.. we would be more than happy to fill the gaps in your knowledge and help.
    ~* And, in the end, the love you take *~
    ~* Is equal to the love you make *~
    - The Beatles -


    GrPlayground
    / Text Find/Replace / Batch Engine / Tower Defense

  7. #7
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,736

    Default

    I'll give you a starting point

    Code:
    (defun c:hc (/ cBlk)
      (if (and (setq cBlk (car (entsel "\nSelect Block: ")))
               (eq "INSERT" (cdr (assoc 0 (entget cBlk)))))
        (progn
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  8. #8
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,736

    Default

    Tbh, this is a boring LISP to write - lots of user prompts, and tedious copying...

    But, when you say this is in 3D, is the direction that the blocks are going to be copied in 3D space?

    Or are you saying just to specify either x or y direction to copy?

    Here is a starter for you to work on if you want... just incorporating defaults:

    Code:
    (defun c:hc (/ cBlk tmp1 tmp2 tmp3)
      
      (or hc$slp:def (setq hc$slp:def 1))
      (or hc$cop:def (setq hc$cop:def 1))
      (or hc$spc:def (setq hc$spc:def 1))
      
      (if (and (setq cBlk (car (entsel "\nSelect Block: ")))
               (eq "INSERT" (cdr (assoc 0 (entget cBlk)))))
        (progn
          (initget 6)
          (setq tmp1 (getreal (strcat "\nSpecify Slope <" (rtos hc$slp:def) ">  1:")))
          (or (not tmp1) (setq hc$slp:def tmp1))
          (initget 6)
          (setq tmp2 (getint (strcat "\nSpecify Number of Copies <" (itoa hc$cop:def) "> : ")))
          (or (not tmp2) (setq hc$cop:def tmp2))
          (initget 6)
          (setq tmp3 (getreal (strcat "\nSpecify Spacing <" (rtos hc$spc:def) "> : ")))
          (or (not tmp3) (setq hc$spc:def tmp3))
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  9. #9
    Senior Member
    Computer Details
    NH3man!'s Computer Details
    Operating System:
    Windows 7 x64
    Computer:
    Dell Precision M6600
    CPU:
    Intel Core i7-2960XM 2.70 GHz
    RAM:
    16.0 GB
    Graphics:
    NVIDIA Quadro FX 3700M
    Primary Storage:
    500 Gb SSD
    Monitor:
    2-Acer B273HU
    Using
    AutoCAD 2012
    Join Date
    Mar 2006
    Posts
    178

    Default

    Quote Originally Posted by Lee Mac View Post
    Tbh, this is a boring LISP to write - lots of user prompts, and tedious copying...

    But, when you say this is in 3D, is the direction that the blocks are going to be copied in 3D space?

    Or are you saying just to specify either x or y direction to copy?

    Here is a starter for you to work on if you want... just incorporating defaults:

    Code:
    (defun c:hc (/ cBlk tmp1 tmp2 tmp3)
      
      (or hc$slp:def (setq hc$slp:def 1))
      (or hc$cop:def (setq hc$cop:def 1))
      (or hc$spc:def (setq hc$spc:def 1))
      
      (if (and (setq cBlk (car (entsel "\nSelect Block: ")))
               (eq "INSERT" (cdr (assoc 0 (entget cBlk)))))
        (progn
          (initget 6)
          (setq tmp1 (getreal (strcat "\nSpecify Slope <" (rtos hc$slp:def) ">  1:")))
          (or (not tmp1) (setq hc$slp:def tmp1))
          (initget 6)
          (setq tmp2 (getint (strcat "\nSpecify Number of Copies <" (itoa hc$cop:def) "> : ")))
          (or (not tmp2) (setq hc$cop:def tmp2))
          (initget 6)
          (setq tmp3 (getreal (strcat "\nSpecify Spacing <" (rtos hc$spc:def) "> : ")))
          (or (not tmp3) (setq hc$spc:def tmp3))
    Thanks Lee,

    Yes the blocks that I need to copy will be copied in the direction of the x,y plane and elevation changes will be in the z axis.

    I am trying to play with your starter but for some reason autocad just keeps closing on me at the moment. I am going to setup my laptop and try that way.

    Thanks again.

  10. #10
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    16,736

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by NH3man! View Post
    Thanks Lee,

    Yes the blocks that I need to copy will be copied in the direction of the x,y plane and elevation changes will be in the z axis.

    I am trying to play with your starter but for some reason autocad just keeps closing on me at the moment. I am going to setup my laptop and try that way.

    Thanks again.
    My starter is by no means finished... and won't even load in its current state.. but I thought I'd give you something concrete to start on, I may build on it, if I have time
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

Similar Threads

  1. LISP Needed
    By good_m in forum AutoLISP, Visual LISP & DCL
    Replies: 9
    Last Post: 21st May 2009, 01:40 pm
  2. LISP or SCRIPT needed
    By CadTechJGC184 in forum AutoLISP, Visual LISP & DCL
    Replies: 13
    Last Post: 4th May 2009, 06:02 pm
  3. Legend Lisp help needed
    By russell84 in forum AutoLISP, Visual LISP & DCL
    Replies: 12
    Last Post: 11th Apr 2008, 09:19 am
  4. S.O.S. - LISP &/or VBA Assistance Needed
    By Broman in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 24th Nov 2006, 09:35 pm
  5. Slope help needed urgently
    By craigp in forum AutoCAD 3D Modelling & Rendering
    Replies: 11
    Last Post: 13th Dec 2005, 11:31 am

Bookmarks

Posting Permissions

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