    # Thread: OFFSET WITH 20% OF MEASURED DISTANCE.

#### Hybrid View

1. Login to Give a bone

## OFFSET WITH 20% OF MEASURED DISTANCE.

Dear All,

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,  Reply With Quote

2. Login to Give a bone

## 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)
)```  Reply With Quote

3. Login to Give a bone

## Re: OFFSET WITH 20% OF MEASURED DISTANCE.

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

Thanks. Originally Posted by Tharwat 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)
)```  Reply With Quote

4. Login to Give a bone

## Re: OFFSET WITH 20% OF MEASURED DISTANCE. Originally Posted by aijazahmed Thank you so much Mr. Tharwat,
Exactly i was needed same

Thanks.
You're welcome   Reply With Quote

#### Posting Permissions

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