Jump to content

Combinevalues.LSP [Add/Divide/Multiply/Subtract object values]


Recommended Posts

Posted

I have been using your code for a week now and noticed that it splits the numbers with a comma is that one of the bugs that got worked out in the new code? Where can I get the reposted code... I really works excellent for quantities... Except for when they hit the thousands.

Posted
I have been using your code for a week now and noticed that it splits the numbers with a comma is that one of the bugs that got worked out in the new code? Where can I get the reposted code... I really works excellent for quantities... Except for when they hit the thousands.
Unrealized bug - never deal with commas in numbers, so didn't think of it. If I find some time, I'll work an update.
Posted

Awesome, I'm doing 7 subdivisions of concrete and paving improvements.

Also would it be possible to have the selected items stay selected or to change color? We have a .lisp routine that adds acres from shapes/polygons/rectangles an when you select one shape it changes the color so that you know you have selected that one.

I can send you the code it you need it.

  • 1 year later...
  • 8 months later...
Posted
I have a really old routine that will add & subtract object values, but I was inspired by this thread to write a new one.

 

Allows user to combine [Add, Divide, Multiply, Subtract] values of selected objects. User can also change mode (Add, Divide, Multiply, Subtract) at any time. When finished, user is prompted for placement point of MText with final value.

 

If only Add option used, user has option to average values.

 

Accepted: Attribute, Civil 3D Point, Land Desktop Point, MText, MultiLeader, Text or typed value.

 

Call with CombineValues or AV.

 

Your comments/criticism are greatly appreciated. Enjoy. :)

 

;;; ------------------------------------------------------------------------
;;;    CombineValues.lsp v1.2
;;;
;;;    Copyright© 04.09.10
;;;    Alan J. Thompson (alanjt)
;;;
;;;    Contact: alanjt @ TheSwamp.org, CADTutor.net
;;;
;;;    Permission to use, copy, modify, and distribute this software
;;;    for any purpose and without fee is hereby granted, provided
;;;    that the above copyright notice appears in all copies and
;;;    that both that copyright notice and the limited warranty and
;;;    restricted rights notice below appear in all supporting
;;;    documentation.
;;;
;;;    The following program(s) are provided "as is" and with all faults.
;;;    Alan J. Thompson DOES NOT warrant that the operation of the program(s)
;;;    will be uninterrupted and/or error free.
;;;
;;;    Allows user to combine extracted numerical values of selected Attribute,
;;;    Civil 3D Point, Land Desktop Point, MText, MultiLeader, Text or typed value.
;;;
;;;    Combine options include: Add, Divide, Multiply, Subtract (can be changed at any time).
;;;    If user only adds values, an option to average is available.
;;;    Upon completion, user is prompted to specify placement point MText with final value.
;;;
;;;    Revision History:
;;;
;;;    v1.1 (04.11.10) 1. Updated subroutine: AT:ExtractNumbers
;;;
;;;    v1.2 (04.13.10) 1. Reworked AT:ExtractNumbers subroutine.
;;;            2. Added subroutine AT:ListSelect to select numbers when multiple exist in string.
;;;            3. If multiple numbers exist in string, user is prompted with list box
;;;               to select each desired number. If multiple numbers are selected, they are
;;;               combined and added to display.
;;;            4. Added CV:StripFormat subroutine, as taken from StripMText 5.0b,
;;;               Copyright© Steve Doman and Joe Burke 2010 (with permission), to avoid any
;;;               issues with extracting numbers out text formatting. (Thank you Joe & Steve)
;;;
;;; ------------------------------------------------------------------------

[ATTACH]18822[/ATTACH]

Thanks for share but I can't see the dialog as your gif

  • 1 year later...
Posted

First off all, congrats for the lisp, its great!

 

I was wondering if its possible to define a specific value to the second number. Like, if i have group of topographic elevations of 1000.000m and i need to subtract 12m of all topographic points (text strings), how could i put this value (12m) automatic on the lisp.

 

And if I already have the text string on the screen, if its possible to not put a new text, but just substitute the text string of the elevation.

  • 1 month later...
Posted

Thanks for the Lisp, its awesome for adding and subtracting

One issue I can't seem to specify point with decimals without averaging value, Command shows true value.

Is this an easy fix?

 

Also can't multiple or divide decimal numbers.

Cheers

Posted
Thanks for the Lisp, its awesome for adding and subtracting

One issue I can't seem to specify point with decimals without averaging value, Command shows true value.

Is this an easy fix?

 

Also can't multiple or divide decimal numbers.

Cheers

I'm not sure I follow you. Could you give me an example?

  • 2 years later...
Posted (edited)

ALANJT thanks for the lisp :)

 

Edited by mousho
  • 3 years later...
Posted

ALANJT thanks for the lisp :)

its work like a dream

 

there is away to change the selection by window and not one by one?

Edited just now by mousho

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...