+ Reply to Thread
Page 2 of 2 FirstFirst 1 2
Results 11 to 15 of 15

Thread: simple area

  1. #11
    Luminous Being Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draughtsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electricity.
    Using
    AutoCAD 2017
    Join Date
    Oct 2009
    Location
    Great Syria , Living in Abu Dhabi
    Posts
    6,225

    Default

    Registered forum members do not see this ad.

    Code:
    (defun c:sum (/ int tot sel ent int val ins)
      ;; Tharwat -  Date: 09.Jun.2018	;;
      (princ "\nSelect text areas to sum :")
      (and (setq int -1
                 tot 0.0
                 sel (ssget "_:L" '((0 . "TEXT")))
           )
           (progn
             (while (setq ent (ssname sel (setq int (1+ int))))
               (and (numberp (setq val (read (cdr (assoc 1 (entget ent))))))
                    (setq tot (+ tot val))
               )
             )
             (< 0.0 tot)
           )
           (setq ins (getpoint "\n Specify text location :"))
           (entmake (list '(0 . "TEXT")
                          (cons 10 (trans ins 0 1))
                          (cons 11 (trans ins 0 1))
                          (cons 40 (getvar 'TEXTSIZE))
                          (cons 1 (rtos tot 2))
                    )
           )
      )
      (princ)
    )

  2. #12
    Junior Member
    Using
    AutoCAD 2010
    Join Date
    May 2018
    Location
    Quebec, Canada
    Posts
    11

    Default

    works Perfectly !!! WOW thanks you all !!!

  3. #13
    Luminous Being Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draughtsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electricity.
    Using
    AutoCAD 2017
    Join Date
    Oct 2009
    Location
    Great Syria , Living in Abu Dhabi
    Posts
    6,225

    Default

    Quote Originally Posted by bogeymen77 View Post
    works Perfectly !!! WOW thanks you all !!!
    You're welcome.

  4. #14
    Quantum Mechanic BIGAL's Avatar
    Using
    Civil 3D 2016
    Join Date
    Dec 2005
    Location
    GEELONG AUSTRALIA
    Posts
    10,581

    Default

    Nicely done Tharwat. Maybe 1 little suggestion.

    Code:
    (cons 1 (strcat "Area = " (rtos tot 2)))
    A man who never made mistakes never made anything

  5. #15
    Luminous Being Tharwat's Avatar
    Discipline
    Mechanical
    Tharwat's Discipline Details
    Occupation
    MEP AutoCAD Draughtsman
    Discipline
    Mechanical
    Details
    HVAC, Drainage, Water Supply, Fire Fighting and a little about Electricity.
    Using
    AutoCAD 2017
    Join Date
    Oct 2009
    Location
    Great Syria , Living in Abu Dhabi
    Posts
    6,225

    Default

    Registered forum members do not see this ad.

    Quote Originally Posted by BIGAL View Post
    Nicely done Tharwat.
    Thank you BIGAL.

    Quote Originally Posted by BIGAL View Post
    Maybe 1 little suggestion.
    Code:
    (cons 1 (strcat "Area = " (rtos tot 2)))
    Yes indeed it is a very good suggestion and make sense.

Similar Threads

  1. Simple question, so apologies if it's too simple!
    By dueingx4 in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 11
    Last Post: 2nd Jan 2015, 11:58 am
  2. simple simple... connecting to 2006 via interop
    By btraemoore in forum .NET, ObjectARX & VBA
    Replies: 2
    Last Post: 29th Apr 2013, 03:39 pm
  3. simple area macro
    By cproudfoot in forum AutoLISP, Visual LISP & DCL
    Replies: 2
    Last Post: 3rd Apr 2008, 12:22 pm
  4. Quick & simple work area setup tips needed
    By JamFam in forum AutoCAD Beginners' Area
    Replies: 9
    Last Post: 17th Mar 2006, 05:46 am

Tags for this Thread

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