Jump to content

Search the Community

Showing results for tags 'sum'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • CADTutor
    • News, Announcements & FAQ
    • Feedback
  • AutoCAD
    • AutoCAD Beginners' Area
    • AutoCAD 2D Drafting, Object Properties & Interface
    • AutoCAD Drawing Management & Output
    • AutoCAD 3D Modelling & Rendering
    • AutoCAD Vertical Products
    • AutoCAD LT
    • CAD Management
    • AutoCAD Bugs, Error Messages & Quirks
    • AutoCAD General
    • AutoCAD Blogs
  • AutoCAD Customization
    • The CUI, Hatches, Linetypes, Scripts & Macros
    • AutoLISP, Visual LISP & DCL
    • .NET, ObjectARX & VBA
    • Application Beta Testing
    • Application Archive
  • Other Autodesk Products
    • Autodesk 3ds Max
    • Autodesk Revit
    • Autodesk Inventor
    • Autodesk Software General
  • Other CAD Products
    • BricsCAD
    • SketchUp
    • Rhino
    • SolidWorks
    • MicroStation
    • Design Software
    • Catch All
  • Resources
    • Tutorials & Tips'n'Tricks
    • AutoCAD Museum
    • Blocks, Images, Models & Materials
    • Useful Links
  • Community
    • Introduce Yourself
    • Showcase
    • Work In Progress
    • Jobs & Training
    • Chat
    • Competitions

Categories

  • Programs and Scripts
  • 2D AutoCAD Blocks
  • 3D AutoCAD Blocks
  • Images
    • Backgrounds

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 7 results

  1. Hi. I've asked a question like this before. But I couldn't solve it, so I asked for your help again. (Emmanuel Delay's lisp does not add up the numbers...) There are numbers(mtext) assigned to different layers. I'd like to get the total of each of these numbers by layer. ex) Layer / Contents AA / 1.5 AA / 2.5 AA / 1.0 => BB / 2.0 BB / 2.0 And I want to tabulate those values with the layer name and the sum. I am attaching the type of lisp I want. But it's not perfect for me to use. So I want to modify it and use it, but it is a vlx format. Please make the same lisp as above. textcount.lsp SAMPLE.dwg pdtt.VLX
  2. i'm would like to ba able to calculate the sum of linear footage base on the dimlinear text (in linear inch) of multiple line. i already working with a lisp base on the line (i choose the line instead of the dimlinear text) it work good but to keep our work base on all the same technique i need to be able to choose the dimlinear text. thank you
  3. I have a 'while' loop that adds what was entered in the command line to a list each time it loops. Then I would like to get the sum of all the numbers in the list. I am pretty confident that this should work: (setq CLength1 (apply '+ (list lst))) But I get this error on the command line: ; error: bad argument type: numberp: (36 36 36 36) Full 'while' code: (while (progn (initget "U") (setq d (getdist (strcat "\Distance to next Vert Strap (Enter when done; U to Undo)")))) (setq lst (cons (fix d) lst)) (cond ((= d "U") (command "._undo" "._back")) ((/= d 0) (progn (command "._offset" (/ d 12.) s "_non" (polar (cdr (assoc 10 (entget s))) 0. 1.) "" ) (if (not (eq s (setq s (entlast)))) (progn (setq p1 (cdr (assoc 10 (entget s))) p2 (cdr (assoc 11 (entget s))) pt (if (< (cadr p1) (cadr p2)) p1 p2 ) ) (setq dx1 (car p1) ;ent x value dx2 (cadr p1) ;ent y value dx3 (caddr p1) ;ent z value dd1 (+ dx1 (/ d 12)) ;dimension distance sdx (- dx1 (/ d 12)) ;start point x dmx (/ (+ dd1 dx1) 2) ;middle ) (if (>= d 18) (setq doff -1.6) (setq doff -3.2) ) (entmake (list (cons 0 "DIMENSION") (cons 100 "AcDbEntity") (cons 67 0) (cons 8 "DIMBAD") (cons 100 "AcDbDimension") (cons 10 (trans (list dd1 doff 0.) 1 0)) (cons 11 (trans (list dmx doff 0.) 1 0)) (cons 12 (list 0. 0. 0.)) (cons 70 33) (cons 1 "") (cons 71 5) (cons 72 1) (cons 41 1.0) (cons 52 0) (cons 53 0) (cons 54 0) (cons 3 "TEMPLATE_DRAWING") (cons 100 "AcDbAlignedDimension") (cons 13 (trans (list sdx 0. 0.) 1 0)) (cons 14 (trans (list dx1 0. 0.) 1 0)) (cons 15 (list 0. 0. 0.)) (cons 16 (list 0. 0. 0.)) )) ) ) ) ))) (setq CLength1 (apply '+ (list lst))) (princ CLength1)
  4. Hello everybody, This is my first post on CADTutor. I've been reading alot here even before I became a member, but it is time for me to join the community with a question since I cannot find the exact answer to mine. Question: Is it possible to sum numbers in Mtext fields created with lisps? AT.LSP OT.LSP I edited them to suit my needs with prefix and suffix and decimal precision (they are in the core the same, originally made by JTB), one is displaying area of selected polyline (AT.lsp) and the other perimeter/length (OT.lsp). I would like to preserve possibility of field updating so when polyline/area is changed I just enter regenall. I copied Mtext fields maually to "oldstyletable" made from lines and mtext, mtext fields. See attached dwg for example. I've seen this thread: http://www.cadtutor.net/forum/showthread.php?43699-Sum-Text-Strings-to-Text-Field... I tried all the lisps but none are applicable to my problem. I get only #### even after regen (I think it's maybe because of prefix and suffix, but don't know). I've managed to work only with text and then my updating Mtext fields are, for sure, gone. Please advise. TEST1.dwg
  5. Dear all, i have a problem, i want summing the actual dimension. example:dimension shows 22 27/32" but decimal shows 22.83333. not show original 22.84375 its various. how to i find this error.or how rectify this error. and i sum this 5 intermediate is 22 27/32", its comes error 1/32" or 1/16". how to find fractional shows like this 22.8333. any lisp for actual fractional dimension calculation, or any lisp for highlight error fractional dimension in autocad................... kindly help..
  6. Hi, Can some one show me how I can get the below code to work? I cant seem to return a result of formula to an edit box. as you can see from the code snip below, when I type a real number in edit box 1 I would like to get the sum of edit box 1 and 154 to edit box 2. and the same with edit box 2 but then minus 154. (action_tile "eb1" [indent][indent]"(setq eb1 $value) (set_tile \"eb2\" (+ eb1 154)") ;NOT WORKING [/indent] [/indent](action_tile "eb2" [indent][indent]"(setq eb2 $value) (set_tile \"eb1\" (- eb2 154)") ;NOT WORKING [/indent] [/indent] thanks
  7. Having some fun with dbConnect... it appears pretty easy to gather information from a database and apply it to a DWG, however it doesn't seem possible to summarize that data (e.g. "how many of these objects are in drawing"). For example, if the database contained window information and several types of windows were used multiple times, it should be possible to link each window to the database and then query the drawing to determine the number of each, and total cost. Window Count Cost Total TypeA 5 $250 $1250 TypeB 7 $200 $1400 Failing that, if the database could be updated (actually, this would be much better) with a new record for each new object, the database could perform the summary (and many other useful things). However, its appears the "Link..." can only pick an existing record from the database. Both seem unavailable from what I've seen of the application and the documentation. Please tell me I'm wrong! :-) IMHO, its surprising that attribute definitions are capable of so much more. Filling tables, linking to Excel, etc., should be small time for a database connection. Thanks
×
×
  • Create New...