View Full Version : Simple Offset Routine Help requested
IowaArchitect
12th Feb 2004, 06:20 pm
Hi, this is probably only a few lines of lisp - but I don't know much about the syntax at all.
I want a routine (had it and lost it actually) that will automatically offset a line a given distance. We set a variety of these that speeded up work, not having to type in a long distance string for the offset (such as 7-5/8") but would assign "8" as a alias to the lisp routing to perform an offset of 7-5/8".
Thanks in advance, :shock:
IowaArchitect
fuccaro
13th Feb 2004, 01:03 pm
Hello!
Are you sure that you need a lisp? I would create a toolbar with buttons containing relevant bitmaps for each often used distance. This macro
^C^Coffset;6
will invoke the command with offset distance set to 6 units. Place a big “6” on that button and you can use it with a simple click.
Return with a new message if you wish a lisp solution.
IowaArchitect
13th Feb 2004, 06:23 pm
Thanks - if you wouldn't mind jotting down the lisp syntax, I would prefer that. I'm a keyboard guy, every command is typed - or a 1-2 key sequece. I really don't use the buttons for much, my personal style is much faster with one hand on the keyboard, and one on the mouse.
THANKS
fuccaro
14th Feb 2004, 07:14 am
(defun c:of1()
(command "._offset" 1))
(defun c:of2()
(command "._offset" 3.5))
This lisp defines 2 new commands, called of1 and of2. You may change those names.
Replace the values after the "._offset" with your own offset distances. Add more functions if you wish.
David Bethel
14th Feb 2004, 04:04 pm
Just make sure you have CMDECHO = ON ( 1 ) or you'll get to see a blank screen <g> -David
Powered by vBulletin™ Version 4.1.2 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.