khoshravan Posted March 16, 2012 Posted March 16, 2012 Is it possible to input an arithmetic expression (like 0.7*24) when a command asks for input value? For example during offset command. I thought it is possible to use calculator command inside a command but there was no success. Quote
CyberAngel Posted March 16, 2012 Posted March 16, 2012 You can use a LISP expression as input for a command. The syntax can be confusing. LISP means LISt Processor. Every "statement" is a list to be evaluated, enclosed in parenthesis. The operator appears first and is applied to the rest of the list. When AutoCAD sees a left parenthesis, it invokes AutoLISP and takes the result of the evaluation as if you had typed it in. Examples: (+ 1 1) means "add 1 and 1" (/ 10 5) means "divide 10 by 5" In both cases AutoCAD will respond as if you had typed 2. Quote
rkent Posted March 16, 2012 Posted March 16, 2012 When dividing be sure you have a decimal point on one of the numbers or it will round off. IE: divide 11 by 2 (/ 11 2.0) Quote
JD Mather Posted March 16, 2012 Posted March 16, 2012 'cal might be what you are looking for. No lisp required. Quote
ScribbleJ Posted March 16, 2012 Posted March 16, 2012 To add another option to the table; the quick calc will Paste value to command line during the command (if you have it open before you invoke your command). The calc can be used at before or during the command. See image below. Quote
SLW210 Posted March 16, 2012 Posted March 16, 2012 You can use QuickCalc while in your command, just right-click and choose QuickCalc and select Apply to send to command line. Quote
ScribbleJ Posted March 16, 2012 Posted March 16, 2012 You can use QuickCalc while in your command, just right-click and choose QuickCalc and select Apply to send to command line. Quick calc is not an option when I right click while in a command. At least not in Civil 3D. Edit: Ahhh it is in Map 3D and vanilla AutoCad. Interesting. I wonder why C3D is excluded? Quote
SLW210 Posted March 16, 2012 Posted March 16, 2012 You could always add it to right-click menu for an active command. Quote
khoshravan Posted March 16, 2012 Author Posted March 16, 2012 You can use a LISP expression as input for a command. The syntax can be confusing. LISP means LISt Processor. Every "statement" is a list to be evaluated, enclosed in parenthesis. The operator appears first and is applied to the rest of the list. When AutoCAD sees a left parenthesis, it invokes AutoLISP and takes the result of the evaluation as if you had typed it in. Examples: (+ 1 1) means "add 1 and 1" (/ 10 5) means "divide 10 by 5" In both cases AutoCAD will respond as if you had typed 2. Thanks. It is very nice. Even it is possible to nest parenthesis to make complex calculations. Quote
khoshravan Posted March 16, 2012 Author Posted March 16, 2012 'cal might be what you are looking for. [ATTACH=CONFIG]33678[/ATTACH] No lisp required. I read about this in forum but it didn't work for me. When I type "cal" in input stage, it gives following message: requires numeric input, two points or option key word specify offset distance or Quote
ScribbleJ Posted March 16, 2012 Posted March 16, 2012 I read about this in forum but it didn't work for me.When I type "cal" in input stage, it gives following message: requires numeric input, two points or option key word specify offset distance or You omitted the apostrophe to make it a transparent command. Type it as you see it below while in your command. 'cal Quote
SLW210 Posted March 16, 2012 Posted March 16, 2012 You need to put an apostrophe in front.....'cal Quote
khoshravan Posted March 16, 2012 Author Posted March 16, 2012 To add another option to the table; the quick calc will Paste value to command line during the command (if you have it open before you invoke your command). The calc can be used at before or during the command. See image below. [ATTACH=CONFIG]33679[/ATTACH] Thanks this works. The only disadvantage is that, calculator should be present before invoking the command. which is not a big problem. Quote
SLW210 Posted March 16, 2012 Posted March 16, 2012 Thanks this works. The only disadvantage is that, calculator should be present before invoking the command. which is not a big problem. Please read my post #6 Quote
khoshravan Posted March 16, 2012 Author Posted March 16, 2012 Thanks for the apostrophe. It works. Quote
khoshravan Posted March 16, 2012 Author Posted March 16, 2012 Dear All Thanks for your help. It seams that Cal is a powerful tool. I have to study it thoroughly. I think there will be topics in this regard in this forum. 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.