Results 1 to 4 of 4

Thread: OFFSET WITH 20% OF MEASURED DISTANCE.

  1. #1
    Member
    Join Date
    2015-08
    Posts
    32
    Login to Give a bone
    0

    Post OFFSET WITH 20% OF MEASURED DISTANCE.

    Dear All,

    Please help me on this.
    I am looking for code with following steps

    1) Select object to Offset
    2) pick point P1 & P2 for offset distance
    3) Pick Point on Side to Offset

    and with step 2 I need offset distance 20% of distance between p1 & p2.
    any help will be much appreciate.

    Thanks,

  2. #2
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: OFFSET WITH 20% OF MEASURED DISTANCE.

    Try this .

    Code:
    (defun c:Test (/ 1p 2p o s)
      ;;    Tharwat 05.June.2014        ;;
      (if (and (setq 1p (getpoint "\n Specify first point :"))
               (setq 2p (getpoint "\n Specify second point :" 1p))
               (setq o (/ (distance 1p 2p) 5.))
          )
        (while (setq s (ssget "_+.:S:L" '((0 . "*LINE,CIRCLE,ARC,ELLIPSE"))))
          (command "_.offset" o s pause "")
        )
      )
      (princ)
    )

  3. #3
    Member
    Join Date
    2015-08
    Posts
    32
    Login to Give a bone
    0

    Default Re: OFFSET WITH 20% OF MEASURED DISTANCE.

    Thank you so much Mr. Tharwat,
    Exactly i was needed same

    Thanks.

    Quote Originally Posted by Tharwat View Post
    Try this .

    Code:
    (defun c:Test (/ 1p 2p o s)
      ;;    Tharwat 05.June.2014        ;;
      (if (and (setq 1p (getpoint "\n Specify first point :"))
               (setq 2p (getpoint "\n Specify second point :" 1p))
               (setq o (/ (distance 1p 2p) 5.))
          )
        (while (setq s (ssget "_+.:S:L" '((0 . "*LINE,CIRCLE,ARC,ELLIPSE"))))
          (command "_.offset" o s pause "")
        )
      )
      (princ)
    )

  4. #4
    All AUGI, all the time
    Join Date
    2010-06
    Posts
    962
    Login to Give a bone
    0

    Default Re: OFFSET WITH 20% OF MEASURED DISTANCE.

    Quote Originally Posted by aijazahmed View Post
    Thank you so much Mr. Tharwat,
    Exactly i was needed same

    Thanks.
    You're welcome

Similar Threads

  1. Reset Offset Distance
    By Wish List System in forum AutoCAD Wish List
    Replies: 5
    Last Post: 2020-01-17, 04:50 PM
  2. 2010: Offset Distance
    By lswinea in forum AutoCAD General
    Replies: 2
    Last Post: 2011-10-18, 01:35 AM
  3. Profile band for offset distance
    By civil3d.wishlist1941 in forum Civil 3D Wish List
    Replies: 0
    Last Post: 2010-10-06, 01:25 AM
  4. setting offset distance
    By ray salmon in forum Revit Architecture - General
    Replies: 3
    Last Post: 2008-06-06, 08:17 PM
  5. distance and offset along a polyline
    By ccowgill in forum AutoLISP
    Replies: 15
    Last Post: 2006-05-30, 12:48 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
  •