Jump to content
capocad

Modify existing routine to allow arithmetic operations with dimensions.

Recommended Posts

capocad

Hi!

Have an old lisp that allows me to perform arithmetic operations with texts. I would like to be able to incorporate the possibility of select not only texts, but also dimensions. Honestly I do not know anything about programming in lisp. If someone has a similar routine or can modify it, I will be very grateful.

 

Thank you in advance and sorry for my english.

aritmetica con textos.lsp

Share this post


Link to post
Share on other sites
Lee Mac

You could try my Field Arithmetic program.

Share this post


Link to post
Share on other sites
capocad

Your routine is very good. I love the use of fields that are updated automatically. The only problem is that the workflow seems to be faster in the routine that I attach.

 

This is an optimal workflow for me:

1 - Specify operator [Add / Subtract / Multiply / Divide]

2 - Select objects with numerical content (as many as you want and you can use window selection to make the selection of multiple figures faster)

3 - Confirm end of selection with right click

4 - Select existing text or field object to show the result. (This way you do not need to align the fields after using the command)

5 - Remember the operator previously selected to repeat command.

 

In this way it is only necessary to specify the operator once and then use the mouse / press enter to repeat.

 

Thank you very much!

Share this post


Link to post
Share on other sites
Lee Mac

Thank you, I'm glad you like my program.

 

Your proposed workflow would only be suitable for commutative operations, such as addition & multiplication - for subtraction and division, the order of the operands matters and so a window selection could not be used.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×