CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
Over 1.094.000 registered users (EN+CZ). AutoCAD tips, Inventor tips, Revit tips. Try the new precise Engineering calculator. New AutoCAD 2026 commands and variables.
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

?
CAD discussions, advices, exchange of experience

CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.
This is a peer-to-peer forum. The forum doesn't replace the official direct technical support provided by ARKANCE for its customers.
How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic Closedneed lisp code to sum only number in texts/mtext

 Post Reply Post Reply
Author
SAYSINA View Drop Down
Newbie
Newbie


Joined: 04.Apr.2013
Location: Cambodia
Using: AUTOCAD2013
Status: Offline
Points: 2
Direct Link To This Post Topic: need lisp code to sum only number in texts/mtext
    Posted: 04.Apr.2013 at 05:55
hi everyone
i want to sum only number in text or mtext
for example
-> EBA 12 (21) NDBR(25.56)....=0.2 IT'S MTEXT
-> FD 12 (102) IT'S MTEXT
-> NDBR 21 (2 PIPE DUCT) IT'S MTEXT
-> (X1=25.32) IT'S TEXT (X2=54.21) IT'S TEXT TOO

AND I WANT TO GET RESULT
->12+21+25.56+0.2=...
->12+102=...
->21+2=...
->SUM TEXT AND TEXT 1+25.32+2+54.21=...
->SUM MTEXT AND TEXT
->SUM MTEXT AND MTEXT
I WANT MAKE IT SELECT BY OBJECT. AND CAN APPLY TO EVERY DRAWING.

ANYONE CAN HELP ME?

SEE MY DWG FILE BELOW
uploads/360147/NEED_LISP_TO_SUM_THIS_FILE.dwg
12345679
Back to Top
Vladimir Michl View Drop Down
Moderator Group
Moderator Group

Arkance Systems CZ

Joined: 26.Jul.2007
Location: Czech Republic
Using: Autodesk software
Status: Offline
Points: 2111
Direct Link To This Post Posted: 04.Apr.2013 at 07:54
This can be programmed using regular expressions. As this is a very specific task (not a general utility - we usually offer them for free), please contact info@cadstudio.cz for a quote.
Vladimir Michl (moderator)
ARKANCE - https://arkance.world - Autodesk Platinum Partner
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 04.Apr.2013 at 11:45
There are free lisp routines that can sum numbers in text.  Try an Internet search or visit The Swamp and/or Cadalyst magazine on line (look in the CAD Tips area).

When you visit The Swamp look for alanjt's thread called Combinevalues.  It contains a lisp routine that will Add, Divide, Multiple or Subtract object values.  CombineValues.lsp v1.2  Copyright 04-09-10 Alan J. Thompson




Edited by John Connor - 04.Apr.2013 at 12:31
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,447 seconds.