Message 1 of 7
Help with Offset in AutoLISP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am working on several different AutoLISP scripts and all of them have an offset in them but it keeps hanging up on the offset command and cancelling the command. Here is the command line output where it fails
Select polyline to offset:
Offset distance: 3.5
_.OFFSET
Current settings: Erase source=No Layer=Source OFFSETGAPTYPE=0
Specify offset distance or [Through/Erase/Layer] <Through>:
Requires numeric distance, two points, or option keyword.
; error: Function cancelled
This is the code that I am working with
(defun c:offset_polyline (/ pline offset)
(setq pline (car (entsel "\nSelect polyline to offset: ")))
(setq offset (getreal "\nOffset distance: "))
(command "_.OFFSET" pline "" offset "L" "")
(command "_.OFFSET" pline "" offset "R" "")
)
Where am I going wrong?