[Search tip detail and code files using keywords, tip number, author name, etc ]
 
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Better Offset Command
Tip# 1864 By Gopal Ramesh On 01-Apr-2003
5
Rated By 1 users Downloaded : 468
Categories : 2D Operations
Software type : AutoCAD
Rename File To : Tip1864: OFS.LSP
ofs.lsp lets you switch between offset options while the command is running.

BETTER OFFSET COMMAND
Tip #1864 [OFS.LSP]
AutoCAD s native Offset command lets you select either a discrete offset distance or a Through option. To change from one option to the other, you must restart the Offset command. On the other hand, OFS.LSP lets you switch back and forth between options while the command is running by specifying the Options Command line choice. OFS.LSP also provides an Undo command (such as in Line and other commands). This is an
excellent example of how to use AutoLISP to improve an AutoCAD command. After you load the routine, type OFS to run.

 

 

Average Rating:
5


User comments
Comment by Cooper,Kent
Posted on 2012-03-02 10:05:51
It's a very good concept, but I find one problem [which is easily fixed]. If you use Architectural or Engineering or Fractional Units, at the very least you MUST change (rtos opt) to (rtos opt 2) to force it to use decimal units. If you don't, offset distance values that involve fractions or feet will be truncated to integer values. This gets worse with values of 12 or more under Architectural or Engineering units, where if you give a distance of (for example) 19, whether picked by two points on-screen or typed in as 19 or 19" or 1'-7", (rtos) will make it 1'-7" and (read) will turn that into just 1, so the resulting value will be 1". Likewise, any value of at least 24 but less than 36 will become 2, etc. A lesser shortcoming: it would be better if, like the regular Offset command, it didn't quit if you miss in picking something.
Comment by Cooper,Kent
Posted on 2012-10-16 12:18:43
See Tip #3897, "Offset Command with Running Options".