TheSwamp
CAD Forums => CAD General => Topic started by: ELOQUINTET on September 29, 2004, 04:03:29 PM
-
just out of curiousity, when i use the break at point command it works fine but if i hit enter to do it again it screws up the line like this:
|
line 1 | gap line 2
______| _________
|
|
forgive the crude drawing :oops:
-
ah not what my screen showed basically it doesn't break it clean it puts a gap on one side
-
Not that this is what you're looking for, but here's the Menu Macro I made...I could change it to a LISP for ya if you wanted, so that you could hit "ENTER" to re-initiate it.
[Break @ Selected Point]^C^C^C^P(setq ent(entsel "Select Object to Break...")) \(setq pt(getpoint "Select Break Point...")) \break;!ent;f;!pt;!pt;^P
-
I think that's just how macros work -- you can't re-initiate "break at point" without hitting the button again.
Dommy, a lisp would be cool, though. :-)
-
just out of curiousity, when i use the break at point command it works fine but if i hit enter to do it again it screws up the line like this:
|
line 1 | gap line 2
______| _________
|
|
forgive the crude drawing :oops:
The macro issues the BREAK command and fills in the second point for you. When you hit the enter key it just repeats the BREAK command. You'll need a lisp function for it to repeat ant the enter key.
-
Here's a lisp I wrote to do just that:
(defun c:bk (/ ent)
(command "break"
(setq ent (entsel "\nPick point to break Object: "))
(cadr ent)
)
(princ)
)
Try it you might like it.
-
Dommy, a lisp would be cool, though. :-)
Download BAP.LSP (http://www.theswamp.org/lilly_pond/dommy2hotty/lisp/BAP.LSP?nossi=1)
;;***********************************************
;; BAP.lsp *
;; Break At selected Point *
;; Created by Dominic Cesare *
;; Dommy2Hotty@aol.com *
;; 09.29.2004 *
;;***********************************************
(prompt "\nType BAP to run.....")
;;**********************
;;Start of Routine *
;;**********************
(defun c:BAP (/ oldecho ent pt)
;error trapping
(setq temperr *error*)
(setq *error* trap1)
;current variables
(setq oldecho (getvar "cmdecho"))
;turning off echo
(setvar "cmdecho" 0)
;setting undo beginning
(command "undo" "begin")
;user supplied information
(setq ent (entsel "Select Object to Break....."))
(setq pt (getpoint "Select Break Point....."))
;break command using user information
(command "break" ent "f" pt pt)
;error trapping
(setq *error* temperr)
;setting undo end
(command "undo" "end")
;resetting echo
(setvar "cmdecho" oldecho)
(princ)
)
;defining error trapping
(defun trap1 (errmsg)
(command "u")
(setvar "cmdecho" oldecho)
(setq *error* temperr)
(prompt "Resetting System Variables...")
(princ)
)
;;**********************
;;End of Routine *
;;**********************
-
ah i had forgotten i's posted this question so busy yesterday. works great dommy just what the doctor ordered thanks a bunch that's goin in my nostromo 52 :wink:
-
ah i had forgotten i's posted this question so busy yesterday. works great dommy just what the doctor ordered thanks a bunch that's goin in my nostromo 52 :wink:
No problem...nothing fancy at all, really...
-
K.I.S.S.
keep it simple stoopid :P
-
K.I.S.S.
keep it simple stoopid :P
:lol: Changed the order in the LISP...set the echo back too soon...so all you'll see now (if you re-download it) would be the prompts for the line and the point...
-
Here is another simple one.
(defun C:BRAT(/ user)
;(setvar "CMDECHO" 0)
(setq user (getvar "OSMODE"))
(command "OSNAP" "int")
(command "_.BREAK" pause "F" pause "@")
(setvar "OSMODE" user)
;( setvar "CMDECHO" 1)
)
-
Here is another simple one.
Wasn't mine simple enough????
Here's a lisp I wrote to do just that:
Code:
(defun c:bk (/ ent)
(command "break"
(setq ent (entsel "\nPick point to break Object: "))
(cadr ent)
)
(princ)
)
Try it you might like it.
-
OK CAB, that's SCARY!! Here's the code I use:
(defun C:BRAT()
(setq user (getvar "OSMODE"))
(command "OSNAP" "int")
(command "BREAK" pause "F" pause "@")
(setvar "OSMODE" user)
)
Great minds think alike I reckon..
-
OK CAB, that's SCARY!! Here's the code I use:
(defun C:BRAT()
(setq user (getvar "OSMODE"))
(command "OSNAP" "int")
(command "BREAK" pause "F" pause "@")
(setvar "OSMODE" user)
)
Great minds think alike I reckon..
Paul,
Did we steal it from the same place? :) Or maybe I stole yours. :D
-
Here is another simple one.
Wasn't mine simple enough????
Here's a lisp I wrote to do just that:
Code:
(defun c:bk (/ ent)
(command "break"
(setq ent (entsel "\nPick point to break Object: "))
(cadr ent)
)
(princ)
)
Try it you might like it.
It was fine, I was just sharing my old routine.
Yours works with one click, very nice. But Osnaps will foil it.
I think I would do it this way.
(defun c:bk (/ ent)
(and (setq ent (entsel "\nPick point to break Object: "))
(command ".break" ent "non" (cadr ent)) )
(princ)
)
I like the two pick because it assure the correct line is broken when picking
at an intersection.
-
Here is another one point pick that uses crosshair ILO pick box.
;; Break at pick point with cross hair
;; Pick point is osnaps sensitive, can cause selection
;; of wrong object or point, press F3 if needed
(defun c:bk (/ pt ent)
(and (setq pt (getpoint "\nPick point to break Object: "))
(setq ent (nentselp pt))
(command ".break" ent "non" pt))
(princ)
)
-
It was fine, I was just sharing my old routine.
Yours works with one click, very nice. But Osnaps will foil it.
I think I would do it this way.
Running osnaps don't work while using entsel unless you type it in, at least in A2K.
-
With MID on select a point very close to the mid point on a line.
In ACAD2000 a small gap is removed because the picked point is
not at the mid point and the second point (cadr ent) is affected
by the snap and goes to the mid point of the line.
-
With MID on select a point very close to the mid point on a line.
In ACAD2000 a small gap is removed because the picked point is
not at the mid point and the second point (cadr ent) is affected
by the snap and goes to the mid point of the line.
I was talking my code.
-
With MID on select a point very close to the mid point on a line.
In ACAD2000 a small gap is removed because the picked point is
not at the mid point and the second point (cadr ent) is affected
by the snap and goes to the mid point of the line.
I was talking my code.
So am I :)