f700es Posted August 2, 2007 Posted August 2, 2007 I need a LISP to draw an Xline on a specific layer when I envoke the XL command. I am a total noob on this but is there a way to do this? TIA Sean Quote
f700es Posted August 2, 2007 Author Posted August 2, 2007 Ok, maybe help me write one. I know I will use.. (command "xline") somewhere. I will also set the layer somewhere in the code. Just not sure how or in what order. Quote
f700es Posted August 2, 2007 Author Posted August 2, 2007 ^C^C-la;set;enter layer name;;_xline Sweet! Now can this be envoked from a command or a button? I prefer just typing in a few keys like "XL" and hitting enter. Thanks Quote
lpseifert Posted August 2, 2007 Posted August 2, 2007 Put this in your acaddoc.lsp file (defun c:xl () (command "-layer" "s" "LAYERNAME" "") (command "xline") );defun This will return you to the original layer (xline behaves a little different) (defun c:xl (/ p1 p2) (setq cl (getvar "clayer")) (command "-layer" "s" "LAYERNAME" "") (setq p1 (getpoint "Specify a point: ") p2 (getpoint "Specify through point: " p1)) (command "xline" p1 p2 "") (setvar "clayer" cl) );defun Quote
fart_plume Posted June 11, 2010 Posted June 11, 2010 I know this is an old thread, but I'm wanting some very similar. An addition to the code to specify the layer according by the axis plane in 3d. This way each of my xl lines are a given color in the given plane Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.