AnsweredAssumed Answered

"Unable to write read-only property" Problem

Question asked by mjohnson on May 7, 2013
Latest reply on May 8, 2013 by 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?