Tharwat Posted July 26, 2010 Posted July 26, 2010 hello Suppose that I have a drawing made in milimeters units, And I want to draw a line 3 units long , But these 3 units must be times in inch units (25.4) and drawn as 76.2 long. Which means I would input 3 units instead of 76.2 . Any suggestions dear reader ? Regards Tharwat Quote
alanjt Posted July 26, 2010 Posted July 26, 2010 Command: l LINE Specify first point: Specify next point or [undo]: 'cal >>>> Expression: 3*25.4 Resuming LINE command. Specify next point or [undo]: 76.2 Quote
Tharwat Posted July 26, 2010 Author Posted July 26, 2010 Command: l LINE Specify first point: Specify next point or [undo]: 'cal >>>> Expression: 3*25.4 Resuming LINE command. Specify next point or [undo]: 76.2 This is exactly what I am trying to avoid which is a matter of wasting time. Thanks Quote
alanjt Posted July 26, 2010 Posted July 26, 2010 Then prompt the user with a starting point, then specify an angle and distance and just multiple the distance by 25.4 Quote
rkmcswain Posted July 26, 2010 Posted July 26, 2010 Are you wanting to do this at the command line for yourself, or are you writing code to do this so the end user doesn't need to know or care? Quote
Tharwat Posted July 26, 2010 Author Posted July 26, 2010 Actually to be added to codes that would be much better than interfering into Autocad self commands. Then it would be included in most of my linear draughting Lisps. Thanks Quote
alanjt Posted July 26, 2010 Posted July 26, 2010 eg. (defun c:Test (/ p1 ang dst) (if (and (setq p1 (getpoint "\nSpecify first point: ")) (setq ang (getangle p1 "\nSpecify angle: ")) (setq dst (getdist "\nSpecify distance: ")) ) (entmake (list '(0 . "LINE") (cons 10 p1) (cons 11 (polar p1 ang (* 25.4 dst))))) ) (princ) ) Quote
Tharwat Posted July 26, 2010 Author Posted July 26, 2010 (edited) OK. Nice I had the idea of your posted lisp but my problem was to create them by using (command "_.line" ........... and which has been disappointing me. Edited July 26, 2010 by Tharwat Quote
alanjt Posted July 26, 2010 Posted July 26, 2010 Can't do it with PAUSE in a command. BTW, isn't that something Lee wrote? Quote
Tharwat Posted July 26, 2010 Author Posted July 26, 2010 Can't do it with PAUSE in a command. BTW, isn't that something Lee wrote? Yes, but not all of it , I mean only the transfering from MLine to PLine was gifted to me by him. what do you mean by BTW ? Quote
alanjt Posted July 26, 2010 Posted July 26, 2010 Yes, but it was gifted to me by him. what do you mean by BTW ? That doesn't mean you remove all credits and change subroutine prefixes. BTW = By The Way. Quote
Tharwat Posted July 26, 2010 Author Posted July 26, 2010 I remembered at the last second to change them because I thought he might comment me, and may not remember that he gave his codes as a partial one a long time a go. and I invested them in one. BTW you gave one also in a thread that talks about MLine. That's all. Quote
alanjt Posted July 26, 2010 Posted July 26, 2010 I remembered at the last second to change them because I thought he might comment me, and may not remember that he gavehis codes as a partial one a long time a go. and I invested them in one. BTW you gave one also in a thread that talks about MLine. That's all. It still doesn't give you the rite to remove any credits. Link to original: http://www.cadtutor.net/forum/showthread.php?49301-Any-function-to-draw-Lines-instead-of-Mline&p=335958&viewfull=1#post335958 If you continue to follow this practice/thievery, I'm through helping you. 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.