+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Forum Newbie
    Discipline
    Architectural
    Using
    AutoCAD 2019
    Join Date
    May 2018
    Posts
    4

    Question Modify existing routine to allow arithmetic operations with dimensions.

    Registered forum members do not see this ad.

    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.
    Attached Files

  2. #2
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Win 7 Pro / Win 10 Pro / Linux Mint
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2018
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,531

    Default

    You could try my Field Arithmetic program.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  3. #3
    Forum Newbie
    Discipline
    Architectural
    Using
    AutoCAD 2019
    Join Date
    May 2018
    Posts
    4

    Default

    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!

  4. #4
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Win 7 Pro / Win 10 Pro / Linux Mint
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2018
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,531

    Default

    Registered forum members do not see this ad.

    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.
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

Similar Threads

  1. Newbie question - how to modify existing code
    By Jay Tree in forum AutoCAD LT
    Replies: 7
    Last Post: 11th Jan 2018, 10:18 am
  2. Help to modify existing lisp
    By dnovember99 in forum AutoLISP, Visual LISP & DCL
    Replies: 13
    Last Post: 30th Nov 2017, 01:15 am
  3. Modify Existing Lisp to include Z Values?
    By JQUAILE in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 28th Mar 2014, 02:55 pm
  4. I'm unable to modify an existing drawing
    By bosers83 in forum AutoCAD Beginners' Area
    Replies: 8
    Last Post: 11th Jan 2011, 04:08 pm
  5. Modify Existing LISP - Lee Mac
    By AQucsaiJr in forum AutoLISP, Visual LISP & DCL
    Replies: 13
    Last Post: 26th Oct 2009, 04:20 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts