scubastu Posted March 9, 2010 Posted March 9, 2010 OK gave up on intersection.. another way.. but running into basic problem.. what is the format of the "_extend" command so I can write it in my lisp..For some reason I can't seem to get it right.. e.g. (command "_extend" ObjExtend2 "" Obj2extend "F" pt1 pt2)?????? Quote
CALCAD Posted March 9, 2010 Posted March 9, 2010 scubastu, I'm not sure of your intentions, but it looks like the command would normally end after the 'Obj2extend' variable is read. You've defined the target (ObjExtend2) and the object to be extended (Obj2extend) and left nothing to be done. Am I missing something? Quote
Lee Mac Posted March 9, 2010 Posted March 9, 2010 Perhaps this may shed some light. (Method doesn't apply to xLines though - but it can be modified to make the line/object infinite in length). Quote
scubastu Posted March 10, 2010 Author Posted March 10, 2010 scubastu,I'm not sure of your intentions, but it looks like the command would normally end after the 'Obj2extend' variable is read. You've defined the target (ObjExtend2) and the object to be extended (Obj2extend) and left nothing to be done. Am I missing something? Sorry guys, I couldn't change my heading on my post as I decided to not work with intersecting a xline. I have drawn a line between the assoc 10 plus 11 of the xline and figured I could use "extend" to intersect the line in both directions to meet the polyline.. Unfortunately, I can't figure out how to write the basic command to "extend" in lisp .. I tried to copy the steps as you do it manually but keep getting a entity name and a then nothing. Any ideas? Quote
alanjt Posted March 10, 2010 Posted March 10, 2010 Very basic, but it should help with the prompts. The first will extend a selected object and the second will extend objects based on a two point fence. The fence can be more elaborate, this will suffice for demonstration purposes. (defun c:Test (/ e1 e2) (and (setq e1 (entsel "\nSelect object to extend: ")) (setq e2 (entsel "\nSelect object to extend to: ")) (command "_.extend" e1 "" e2 ""))) (defun c:Test2 (/ e p1 p2) (and (setq e (entsel "\nSelect object to extend to: ")) (setq p1 (getpoint "\nSpecify first fence point: ")) (setq p2 (getpoint p1 "\nSpecify next fence point: ")) (command "_.extend" e "" "_f" "_non" p1 "_non" p2 "" ""))) Quote
scubastu Posted March 10, 2010 Author Posted March 10, 2010 Very basic, but it should help with the prompts.The first will extend a selected object and the second will extend objects based on a two point fence. The fence can be more elaborate, this will suffice for demonstration purposes. (defun c:Test (/ e1 e2) (and (setq e1 (entsel "\nSelect object to extend: ")) (setq e2 (entsel "\nSelect object to extend to: ")) (command "_.extend" e1 "" e2 ""))) (defun c:Test2 (/ e p1 p2) (and (setq e (entsel "\nSelect object to extend to: ")) (setq p1 (getpoint "\nSpecify first fence point: ")) (setq p2 (getpoint p1 "\nSpecify next fence point: ")) (command "_.extend" e "" "_f" "_non" p1 "_non" p2 "" ""))) Thanks again Alanjt, I don't know why but I had set all my variables but neither of those command formats you suggested worked for me ??!! I ended up using (command "_.extend" "f" "" pt1 pt2 ""), then it extended both ways (which I wanted) not just the direction of the fence pts (e.g like angle pt1 to pt2 and not angle pt2 to pt1) which I assumed wrongly). More efficient than I thought lol. Anyway all good now Thanks all!! 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.