Diameter

Discussion in 'AutoCAD' started by frank roegiers, Apr 8, 2004.

  1. Hi,


    How can I write the "diameter" symbol in a string. %%c doesn't work.



    greetz


    Frank
     
    frank roegiers, Apr 8, 2004
    #1
  2. %%C works fine, it's probably the font you have chosen doen't support the
    %% characters. Here is the example out of the help file. Run it with the
    default txt.shx:

    Sub Example_AddText()
    ' This example creates a text object in model space.
    Dim textObj As AcadText
    Dim textString As String
    Dim insertionPoint(0 To 2) As Double
    Dim height As Double
    ' Define the text object
    textString = "10%%c"
    insertionPoint(0) = 2: insertionPoint(1) = 2: insertionPoint(2) = 0
    height = 0.5
    ' Create the text object in model space
    Set textObj = ThisDrawing.ModelSpace.AddText(textString,
    insertionPoint, height)
    ZoomAll
    End Sub
     
    Mike Tuersley, Apr 8, 2004
    #2
  3. frank roegiers

    Bill Wright Guest

    I believe chr(176) gives you a diameter symbol like this °. The same as
    (ALT+0176) keystroke
     
    Bill Wright, Apr 8, 2004
    #3
  4. frank roegiers

    Nathan Guill Guest

    If you change your font to AMGDT, then you use n (lower case N). This is
    the font that AutoCAD uses for it's Geometric Tolerances Symbols dialog.
     
    Nathan Guill, Apr 9, 2004
    #4
  5. frank roegiers

    Kevin Terry Guest

    actually, alt+0176 gives you the degree symbol ° - alt+0216 gives you a
    symbol very similar to the diameter symbol, depending on font Ø

    make sure you use the numeric keypad for entry...
    Kevin
     
    Kevin Terry, Apr 9, 2004
    #5
  6. frank roegiers

    Bill Wright Guest

    Oops....That's right. I need to pay a little closer attention.

    --
     
    Bill Wright, Apr 9, 2004
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.