raj banerjee Posted October 8, 2007 Share Posted October 8, 2007 can any one tell me if its possible to have a command which does a multiple distance? at the moment im drawing a polyline, doing a list on it then deleting it, which is a bit mudane now.lol any help would be great:) Quote Link to comment Share on other sites More sharing options...
GE13579 Posted October 8, 2007 Share Posted October 8, 2007 Not sure if it helps, but I'd just use DIST then pick start and endpoint (assuming all straight lines), then right click and repeat... is it for just noting down the lengths? Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted October 8, 2007 Share Posted October 8, 2007 It would be relatively simple to do in lisp. Come to think of it, it would be handy to have. I'll knock it out at lunch time. GE13579, I think he wants to measure around curves. Quote Link to comment Share on other sites More sharing options...
PS_Port Posted October 8, 2007 Share Posted October 8, 2007 There has to be a more simplified way than this, but my Lisp is basic so this is my solution. This first lisp is a multiple distance routine from the one starting point to multiple second points. (defun c:mdist1 (/ pt1 pt2 dist) (setq pt1 (getpoint "\nSpecify first point (hit Enter to Exit):")) (while (setq pt2 (getpoint "\nSpecify next point:")) (setq dist (strcat "Distance = " (rtos(distance pt1 pt2)))) (print) (prompt dist) ) ) And this one is a multiple distance selecting start and second point each time. (defun c:mdist (/ pt1 pt2 dist) (while (setq pt1 (getpoint "\nSpecify first point (hit Enter to Exit):")) (setq pt2 (getpoint "\nSpecify next point:")) (setq dist (strcat "Distance = " (rtos(distance pt1 pt2)))) (print) (prompt dist) ) ) This all seems to complicated for a simple task, so feel free to simplify. Hope this helps Raj, (couldn't let Alan beat me) Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted October 9, 2007 Share Posted October 9, 2007 Thanks for that code, Paul. I have modified it slightly. raj banerjee, See if this does what you want: (defun c:mdi () (princ "\n Multi-DIST samt Ackumulerad längd - Oktober 2007 - CadTutor.net Forum") (setq ad 0) (setq pt1 (getpoint "\nVälj första punkten <tryck Enter för att avsluta>")) (while (setq pt2 (getpoint pt1 "\nVälj nästa punkt <tryck Enter för att avsluta>")) (setq sd (distance pt1 pt2)) (setq ad (+ ad sd)) (setq pt1 pt2) (prompt (strcat "\n Del längd = "(rtos sd)" Ackumulativ Längd = "(rtos ad) )) ) (princ) ) Paul, I accept that you won. Quote Link to comment Share on other sites More sharing options...
PS_Port Posted October 9, 2007 Share Posted October 9, 2007 Thats a sweet modification alan, thanks just one thing, shouldn't you localize the variables I'm usually not this picky:lol: Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted October 9, 2007 Share Posted October 9, 2007 You can if you wish, but with todays computers, it is not necessary. Quote Link to comment Share on other sites More sharing options...
raj banerjee Posted October 9, 2007 Author Share Posted October 9, 2007 thats the bollox!!! cheers to both of you Quote Link to comment Share on other sites More sharing options...
Tiger Posted October 9, 2007 Share Posted October 9, 2007 *Tiger sneaking in, steals the lisp, and sneaks out, sniggering* Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted October 9, 2007 Share Posted October 9, 2007 Typical sneaky bloody Viking. Quote Link to comment Share on other sites More sharing options...
GE13579 Posted October 9, 2007 Share Posted October 9, 2007 Very nice Alan, but... GE13579, I think he wants to measure around curves. Is it possible to have it work on arcs as well? It would be mighty handy if it could...? Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted October 9, 2007 Share Posted October 9, 2007 I've been thinking about that all afternoon, it would definitely be handy if it could, but I have my doubts. However, I will keep thinking about it. Quote Link to comment Share on other sites More sharing options...
GE13579 Posted October 9, 2007 Share Posted October 9, 2007 ...it would definitely be handy if it could, but I have my doubts. I thought that might be the case Just as a thought as I have no clue as to the capability of these Lisp routines ... would it be possible to select the object, and then get something to take info from the properties box (length/ arc length) and then add subsequent selections to the total? PS I hope you can understand what I'm saying here as I'm struggling myself Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted October 9, 2007 Share Posted October 9, 2007 Thats a damn good idea....and yes it can easily be done. Give me more on the specific situation you are talking about. Quote Link to comment Share on other sites More sharing options...
GE13579 Posted October 9, 2007 Share Posted October 9, 2007 Cool... The instance is where I am doing pre- design on conveyors, it would be a useful way of calculating the full length of a given conveyor which might arc, then run straight, arc, straight.... etc. I'm only drawing in 2D if that helps? Looking forward to your response... Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted October 9, 2007 Share Posted October 9, 2007 So you want the total length of a conveyor belt? You could turn all the components into a polyline and LIST it...is there a reason why you don't want to do that? Quote Link to comment Share on other sites More sharing options...
riga Posted October 9, 2007 Share Posted October 9, 2007 Don't you think it can be made with the well known lisp TLEN? tlen.lsp Quote Link to comment Share on other sites More sharing options...
GE13579 Posted October 9, 2007 Share Posted October 9, 2007 You could turn all the components into a polyline and LIST it This is true, but I prefer to keep lines and arcs separate... keeps them easier to modify... and they are sometimes broken anyway... but... Don't you think it can be made with the well known lisp TLEN? This is exactly what I was after thank you Riga!!! I really need to learn something about programming these Lisp routines! Thanks for your help guys Quote Link to comment Share on other sites More sharing options...
cdgoin Posted January 28, 2009 Share Posted January 28, 2009 TLEN was just what the doctored ordered.. Got to love the net.. Quote Link to comment Share on other sites More sharing options...
medeziner Posted December 25, 2011 Share Posted December 25, 2011 Use the multipoint select command in Total Distance List. Link below http://home.comcast.net/~medeziner/total-distance.html Quote Link to comment Share on other sites More sharing options...
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.