+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 30
  1. #1
    Super Member Bill Tillman's Avatar
    Using
    AutoCAD 2013
    Join Date
    Oct 2008
    Location
    Miami, FL
    Posts
    870

    Default Center Text in a Circle

    Registered forum members do not see this ad.

    I did a search and didn't seem to find anything on this. I draw architectual floor plans and create column lines with a circle on the end of the line. I then insert text in the circle. usually a single digit or alpha character. The trouble is I often spend too much time trying to get the text to fit nicely in the center of the circle. Can anyone help me with this?
    It's deja vu, all over again.

  2. #2
    Forum Deity
    Using
    Civil 3D 2008
    Join Date
    Sep 2006
    Location
    Pittsburgh, PA, USA
    Posts
    3,581

    Default

    Middle (Middle center) justify the text and use the center osnap of the circle as the insert point for the text.

  3. #3
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2011
    Join Date
    Apr 2008
    Posts
    6,011

    Default

    How about a Dynamic Attributed block with a scale parameter?
    Attached Files
    DropBox | finding the light...
    Seann: ...it went crazy ex-girlfriend on me...
    eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...

  4. #4
    Super Member Tankman's Avatar
    Computer Details
    Tankman's Computer Details
    Operating System:
    XP Pro SP3
    Computer:
    IBM T60 Thinkpad™
    Monitor:
    36" LCD Monitor/TV, 14" Thinkpad™ T60
    Using
    AutoCAD 2007
    Join Date
    Mar 2008
    Location
    Eastern PA, USA
    Posts
    1,794

    Default

    Or, try this lisp?
    Attached Files
    Tankman

    "When the well is dry, we know the worth of water." Ben Franklin ~ 1746

  5. #5
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2011
    Join Date
    Apr 2008
    Posts
    6,011

    Default

    One more, just for fun...

    Code:
    (defun c:TIC (/ label pt dist)
      ;; MText label witin circle
      ;; Alan J. Thompson, 05.22.10
    
      (vl-load-com)
      (if (and (/= "" (setq label (getstring t "\nSpecify label: ")))
               (setq pt (getpoint "\nSpecify center point: "))
               (setq dist (getdist pt "\nSpecify radius of circle: "))
          )
        ((lambda (p)
           (entmakex (list '(0 . "CIRCLE") (cons 10 p) (cons 40 dist)))
           ((lambda (text)
              (vla-put-AttachmentPoint text 5)
              (vla-put-InsertionPoint text (vlax-3d-point p))
            )
             (vla-addMText
               (if (or (eq acmodelspace
                           (vla-get-activespace
                             (cond (*AcadDoc*)
                                   ((setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object))))
                             )
                           )
                       )
                       (eq :vlax-true (vla-get-mspace *AcadDoc*))
                   )
                 (vla-get-modelspace *AcadDoc*)
                 (vla-get-paperspace *AcadDoc*)
               )
               (vlax-3d-point p)
               0.
               label
             )
           )
         )
          (trans pt 0 1)
        )
      )
      (princ)
    )
    DropBox | finding the light...
    Seann: ...it went crazy ex-girlfriend on me...
    eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...

  6. #6
    Luminous Being alanjt's Avatar
    Using
    Civil 3D 2011
    Join Date
    Apr 2008
    Posts
    6,011

    Default

    Code:
    (defun c:TCL (/ obj label)
      ;; Label selected circle with MText
      ;; Alan J. Thompson, 05.22.10
    
      (vl-load-com)
      (if (and (setq obj (car (entsel "\nSelect circle: ")))
               (or (eq "AcDbCircle" (vla-get-objectname (setq obj (vlax-ename->vla-object obj))))
                   (alert "Invalid object!")
               )
               (/= "" (setq label (getstring t "\nSpecify label: ")))
          )
        ((lambda (p)
           ((lambda (text)
              (vla-put-AttachmentPoint text 5)
              (vla-put-InsertionPoint text p)
            )
             (vla-addMText
               (if (or (eq acmodelspace
                           (vla-get-activespace
                             (cond (*AcadDoc*)
                                   ((setq *AcadDoc* (vla-get-activedocument (vlax-get-acad-object))))
                             )
                           )
                       )
                       (eq :vlax-true (vla-get-mspace *AcadDoc*))
                   )
                 (vla-get-modelspace *AcadDoc*)
                 (vla-get-paperspace *AcadDoc*)
               )
               p
               0.
               label
             )
           )
         )
          (vla-get-center obj)
        )
      )
      (princ)
    )
    DropBox | finding the light...
    Seann: ...it went crazy ex-girlfriend on me...
    eric_monceaux...its pretty funny seeing two AutoCAD Gods give each other flak...

  7. #7
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    15,732
    Lee Mac Programming

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

    Just another Swamper

  8. #8
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro 4000, 2GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2013
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    33,090

    Default

    Bill:

    It was right there under your nose the entire time. You just had to look on your Tool Palettes on the Annotation tab. The very first entry at the top called Tag - Imperial is a number within a circle. The number is an attribute.

    Seek and ye shall find.

    I'm running 2010 too.
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

  9. #9
    Super Member
    Using
    AutoCAD LT 2009
    Join Date
    Sep 2008
    Posts
    500

    Default

    Quote Originally Posted by ReMark View Post
    Bill:

    It was right there under your nose the entire time. You just had to look on your Tool Palettes on the Annotation tab. The very first entry at the top called Tag - Imperial is a number within a circle. The number is an attribute.

    Seek and ye shall find.

    I'm running 2010 too.
    ReMark, another good find. Would like to know why the text in the circle doesn't take on the font set in the drawing? Or how can I set it to? It doesn't list out a font, and I don't want to explode it, but just to see what font lists out I did. No font listed, but style lists out as Tohoma.
    Glenn
    2009LT

  10. #10
    Quantum Mechanic ReMark's Avatar
    Computer Details
    ReMark's Computer Details
    Operating System:
    Windows 7 Pro 64-bit
    Computer:
    Thinkmate
    Motherboard:
    Intel DX58SO2 LGA1366 X58
    CPU:
    Intel i7-960 Quad-core 3.20GHz 8MB cache
    RAM:
    12GB (3x4GB) PC3-106000 DDR3
    Graphics:
    nVidia Quadro 4000, 2GB GDDR5
    Primary Storage:
    150GB Velocipraptor 10,000 rpm
    Secondary Storage:
    none
    Monitor:
    Dell P24LLH - 24" wide screen LCD
    Discipline
    See details...
    ReMark's Discipline Details
    Occupation
    CAD Draftsman/Designer...chemical manufacturing.
    Discipline
    See details below.
    Details
    I work for a specialty chemical manufacturer. I do a little bit of everything from P&IDs to civil to architectural and structural.
    Using
    AutoCAD 2013
    Join Date
    Nov 2005
    Location
    Norwalk, CT USofA
    Posts
    33,090

    Default

    Registered forum members do not see this ad.

    It's an attribute. The font can be reset.
    "I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police

    Eat brains...gain more knowledge!

Similar Threads

  1. Replies: 1
    Last Post: 11th Mar 2009, 11:26 pm
  2. Circle center cross automation
    By mdbdesign in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 28th May 2007, 09:42 am
  3. cross at the center of a circle
    By opelit in forum AutoLISP, Visual LISP & DCL
    Replies: 0
    Last Post: 28th Nov 2006, 02:50 pm
  4. Circle Text
    By Perto in forum AutoCAD Drawing Management & Output
    Replies: 4
    Last Post: 26th Oct 2006, 05:14 pm
  5. autocad vba-offset a circle continously towards the center?
    By clarence_cad in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 20th Feb 2006, 03:36 pm

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