Thursday, September 27, 2012

Simple AutoLISP Code: Modified BREAK

I like to BREAK my line at the exact point I selected without typing much keywords, ie. by automated the "first point" option in the BREAK command, hence I came out with the following code:

(defun errBRF (message)
(command)
(setq *error* localErrorBRF)
(prompt "\nRoutine cancelled. ")
(princ)
)
(defun C:BRF (/ localErrorBRF brkPointBRF)
(setq localErrorBRF *error*)
(setq *error* errBRF)
(setq brkPointBRF (getpoint "\nPick break point: "))
(command "._BREAK" pause "F" brkPointBRF brkPointBRF)
(setq *error* localErrorBRF)
(princ)
)

A note though, this command prompts you to pick the desired break point prior to selecting an object, which is reversing the input sequence of the original BREAK command.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...