2 Replies Latest reply on May 8, 2013 8:54 AM by mjohnson

    "Unable to write read-only property" Problem

    mjohnson

      I have written a script to put titles on pages by way of labeling borders. Currently, I get an error when trying to add the label (if it doesn't exist).Even though I get the error, the label is added.

       

      The code in question:

       

      1    If Not objCompBorder.Label is Nothing Then

      2      objCompBorder.Label.TextString = strSheet

      3    Else

      4      Set objCompBorder.Label = objCompBorder.AddLabel(strSheet,longBorderLabelXLoc,longBorderLabelYLoc)

      5    End If

      6    objCompBorder.Label.Font = VDFONT_ROMAN

      7    objCompBorder.Label.Origin = VDALIGN_MC

      8    objCompBorder.Label.Size = 75


      The code at line 4 is what seems to trigger the error. The label is added, but the font, alignment, and size are not changed. On schematic sheets where the border is already labeled, the code proceeds without a problem.

       

      Any thoughts on what the problem might be?