Results 1 to 1 of 1

Thread: Change color of Text in Table

  1. #1
    100 Club
    Join Date
    2003-06
    Posts
    121
    Login to Give a bone
    0

    Question Change color of Text in Table

    So I am reading a value from a text file and checking the first column of a table for the value and if the value exist in the cell then I want to change the color of the text to cyan. Not sure why this isn't working... any help would be appreciated.

    I dimension the color and set it...

    Code:
    GetInterfaceObject ("AutoCAD.AcCmColor.22")
    Dim mycolor As New AcadAcCmColor
    mycolor.SetRGB 0, 255, 255
    then get the table with a selection set. In this particular drawing there is always only one table so I could do it other ways but this was quick.

    Code:
    Open selfile For Input As mIntFilenumber
    If Not objss.Count = 0 Then Set objtable = objss(0)
    Do While Not EOF(mIntFilenumber)
        Input #mIntFilenumber, textline
        cnti = objtable.Rows
    
        For RowCnt = 0 To objtable.Rows
    
            If InStr(textline, objtable.GetCellValue(RowCnt, 0)) > 0 Then
    
                objtable.SetCellContentColor RowCnt, 0, mycolor
    
            End If
    
                    
        Next RowCnt
    
    
    Loop
    then absolutely nothing about the table changes. I watch it iterate and it finds the match but does not change the color. What am I not doing.
    Last edited by Ed Jobe; 2017-05-25 at 10:25 PM. Reason: Added CODE tags

Similar Threads

  1. 2010: AutoCAD Table Linked to Excel, Text Does Not Plot by Color, is too light
    By SwizzleStick in forum AutoCAD Tables
    Replies: 5
    Last Post: 2015-06-12, 04:27 PM
  2. change a text in table 1 and automated modifi in table 2
    By bbogc694889 in forum AutoCAD Fields
    Replies: 0
    Last Post: 2015-04-20, 02:35 PM
  3. How to change text color
    By some buddy in forum Revit - API
    Replies: 16
    Last Post: 2009-10-20, 05:14 PM
  4. How to change color of TextNote element's Text
    By shifali.a in forum Revit - API
    Replies: 0
    Last Post: 2009-05-06, 11:43 AM
  5. Globally change Text Style in a Table
    By Rico in forum AutoCAD Tables
    Replies: 5
    Last Post: 2005-10-27, 10:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •