Michael, Thanks, you're not a budinski ! ! However, I cannot run your
routine. I snagged our resident VB guy to try to finish out the routine but
he doesn't know AutoCAD objects and was unable to help me. Could you please
add the prefixes and suffixes so all I have to do is cut & paste and F11 &
F8? Your help is most welcome!
Much appreciated..............................Pat
Michael Puckett wrote in message
<16716218E0562E7F8CC0A73BD4EFA83F@in.WebX.maYIadrTaRb>...
|' Why not use something like the following
|' (apologies, have not read entire thread)
|'
|'
|
| ' ...
| ' Other code
| ' ...
| '
| ' Assuming you wish to maintain case ...
|
| Dim AscCode as Integer
| AscCode = Asc(TextObj.TextString)
|
| Select Case AsciiCode
| Case 97 to 121, 65 to 89
| ' a - y, A - Y
| TextObj.TextString = Chr(AsciiCode + 1)
| Case 122, 90
| ' z, Z
| TextObj.TextString = Chr(AsciiCode - 25)
| Case else
| ' not an alpha character, need to
| ' write code for this scenario
| end select
|
| ' ...
| ' Other code
| ' ...
|
|' Would certainly reduce
|' the amount of code
|'
|' sorry I butted in
|'
|'
|
|"Walter" wrote in message
|news:CDFAF8DA1049F526EFAAF2E73A6A6723@in.WebX.maYIadrTaRb...
|> Pat,
|> Here's one way to do it. I know there's an easier way, but give this a
try
|> and tweak it as needed.
|>
|> '--Begin Routine--
|> Sub ad_Add1Alpha()
|> Dim TextObj As AcadObject
|> Dim basePnt As Variant
|> Dim objSelected As Integer
|>
|> objSelected = 1
|> Do While objSelected = 1
|> On Error GoTo exitsub
|> ThisDrawing.Utility.GetEntity TextObj, basePnt, "Select Text to
|> Update>> "
|> If TextObj.ObjectName = "AcDbText" Or TextObj.ObjectName =
|> "AcDbMText" Then
|> Select Case TextObj.TextString
|> Case "A"
|> TextObj.TextString = "B"
|> Case "B"
|
|
|
|> Case "Z"
|> TextObj.TextString = "A"
|> End Select
|> End If
|> TextObj.Update
|> Loop
|> exitsub:
|> End Sub
|> '--End Routine--
|>
|> -- Walter -- http://www.ActiveDwg.com
|>
|