+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 26
  1. #1
    Full Member
    Discipline
    Architectural
    Using
    AutoCAD 2014
    Join Date
    Jan 2017
    Posts
    95

    Default draw multiple lines to a central origin location

    Registered forum members do not see this ad.

    Quite often I draw lines from many entities at different location to a central origin point.
    Instead of drawing them 1 bat a time, Is there a lisp that I can click those entities with the last click for the central origin point like the picture below

    Attached Images

  2. #2
    Luminous Being Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draughtsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electricity.
    Using
    AutoCAD 2015
    Join Date
    Oct 2009
    Location
    Great Syria , Living in Abu Dhabi
    Posts
    5,936

    Default

    Hi,

    What are the names of these entities? Points, Blocks, Circles .... etc. So can you list them down here?

  3. #3
    Senior Member
    Using
    AutoCAD 2016
    Join Date
    Jan 2012
    Posts
    145

    Default

    Draw the first line, select line and then the grip point att the end, right click and select copy.

  4. #4
    Full Member
    Discipline
    Architectural
    Using
    AutoCAD 2014
    Join Date
    Jan 2017
    Posts
    95

    Default

    Quote Originally Posted by Tharwat View Post
    Hi,

    What are the names of these entities? Points, Blocks, Circles .... etc. So can you list them down here?
    Tharwat, to be clearer, its not so much the type of entities, rather it is more like a kind of marker or marking for me or my workers to refer to multiple location in the drawing.
    So as an example of how the lisp were to run is (base on the photo in the 1st post)
    1)I will be clicking on multiple location in the drawing (1st click, 2nd click, 3rd click & 4th click)
    2)for the last click I will click a distance away from all the previous clicks then press ENTER
    3)lisp will then draw all the line from all the clicks (1st click to 4th click) to the last click (which will be the central location)

  5. #5
    Full Member
    Discipline
    Architectural
    Using
    AutoCAD 2014
    Join Date
    Jan 2017
    Posts
    95

    Default

    Quote Originally Posted by guran View Post
    Draw the first line, select line and then the grip point att the end, right click and select copy.
    There is no copy option at the grip point.

  6. #6
    Luminous Being Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draughtsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electricity.
    Using
    AutoCAD 2015
    Join Date
    Oct 2009
    Location
    Great Syria , Living in Abu Dhabi
    Posts
    5,936

    Default

    Something like this?

    Code:
    (defun c:Test (/ int inp pt1 lst pt2)
      ;;  Tharwat - Date: 18.4.2017  ;;
      (setq int 0
            inp '("1st" "2nd" "3rd" "4th" "Base")
      )
      (while
        (and (< int 5)
             (setq pt1 (getpoint (strcat "\nSpecify " (nth int inp) " Point :")))
        )
         (setq int (1+ int)
               lst (cons pt1 lst)
         )
      )
      (and (= (length lst) 5)
           (foreach p (cdr lst) (entmake (list '(0 . "LINE") (cons 10 (car lst)) (cons 11 p)))
           )
      )
      (princ)
    )

  7. #7
    Forum Deity rkent's Avatar
    Computer Details
    rkent's Computer Details
    Operating System:
    WIN7 PRO 64bit
    Computer:
    Dell OptiPlex 7020
    CPU:
    i7 4790 3.6GHz
    RAM:
    16GB, 1600MHz, DDR3 non-ECC 2x8GB
    Graphics:
    AMD Radeon 2GB
    Primary Storage:
    Samsung 480Gb SSD
    Monitor:
    Dell 24" FS (2x)
    Discipline
    Mechanical
    rkent's Discipline Details
    Occupation
    Facilities Design - Semi-conductor manufacturing
    Discipline
    Mechanical
    Details
    Designer: Process Piping, P&ID's, Machine Part Design, Planning / General Arrangement. Facilities Management. Drafting: Electrical, Controls, Architectural.
    Using
    Mechanical 2017
    Join Date
    Nov 2007
    Location
    Lat:35, Long:-106, Elev: 5164'
    Posts
    4,560

    Default

    Quote Originally Posted by tive29 View Post
    There is no copy option at the grip point.
    Read the post carefully, select the line and then the grip point at the end, RIGHT CLICK and select copy. Instead of the right click you can type C for copy at that point as seen in the command line options after the grip is selected.
    Sometimes there's a man... I won't say a hero, 'cause, what's a hero? But sometimes, there's a man. And I'm talkin' about the Dude here. Sometimes, there's a man, well, he's the man for his time and place. He fits right in there. And that's the Dude, in Los Angeles. - The Stranger, The Big Lebowski

  8. #8
    Super Member marko_ribar's Avatar
    Computer Details
    marko_ribar's Computer Details
    Operating System:
    Windows 7 Ultimate X64
    Computer:
    Intel quad core CPU 4x2.66GHz, 8GB RAM
    Motherboard:
    INTEL compatibile
    CPU:
    quad core 4x2.66GHz
    RAM:
    8GB
    Graphics:
    NVIDIA GeForce 6600 GT
    Primary Storage:
    250 GB
    Secondary Storage:
    500 GB
    Monitor:
    Samsung 17''
    Discipline
    Architectural
    marko_ribar's Discipline Details
    Occupation
    Architecture, project designer, project visualisation
    Discipline
    Architectural
    Details
    space design - modeling and animations
    Using
    AutoCAD 2014
    Join Date
    Feb 2010
    Location
    Belgrade, Serbia, Europe
    Posts
    1,184

    Default

    Tharwat, I think you understood it literally... I think that OP means input as much points as needed - while loop is needed and when it's terminated, user should pick base point and then routine should connect all points from stored list of points obtained while looping with base one...

    Marko Ribar, d.i.a. (graduated engineer of architecture)
    M.R. on YouTube

  9. #9
    Luminous Being Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draughtsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electricity.
    Using
    AutoCAD 2015
    Join Date
    Oct 2009
    Location
    Great Syria , Living in Abu Dhabi
    Posts
    5,936

    Default

    Quote Originally Posted by marko_ribar View Post
    Tharwat, I think you understood it literally... I think that OP means input as much points as needed - while loop is needed and when it's terminated, user should pick base point and then routine should connect all points from stored list of points obtained while looping with base one...
    That's exactly what I thought when I was readying the 1st post but it seems that they insist on four points than looping with a base point at the conclusion.

    Have a read about post# 4

  10. #10
    Full Member
    Discipline
    Architectural
    Using
    AutoCAD 2014
    Join Date
    Jan 2017
    Posts
    95

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by Tharwat View Post
    That's exactly what I thought when I was readying the 1st post but it seems that they insist on four points than looping with a base point at the conclusion.

    Have a read about post# 4
    Tharwat, apologies, I meant the 4 clicks as an example. it will be many clicks as marko has mention with the last click as the origin after pressing ENTER.

Similar Threads

  1. Help with Hatch Origin Location Program
    By 3dwannab in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 22nd Mar 2017, 01:24 am
  2. Replies: 11
    Last Post: 23rd Jun 2016, 09:42 pm
  3. How to check the origin location of an existing hatch?
    By vernonlee in forum The CUI, Hatches, Linetypes, Scripts & Macros
    Replies: 2
    Last Post: 18th Mar 2015, 04:34 am
  4. drawing a line central to two paralel lines
    By CADsince07 in forum AutoCAD General
    Replies: 5
    Last Post: 14th Dec 2011, 05:58 pm
  5. Controlling toolpalets from a central location
    By raj banerjee in forum Revit General
    Replies: 2
    Last Post: 23rd Nov 2011, 12:39 pm

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