<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div style="font-family:arial, sans-serif;">I want to use the API to replace the text of a frame with new text, but I can't empty the text out of the frame without reverting many of the frame's attributes. The main attribute that's causing problems at this point is the font size. For example:<br></div><div style="font-family:arial, sans-serif;"><br></div><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;"><span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">dummy = newDocument((5, 3), (0, 0, 0, 0), PORTRAIT, 1, UNIT_INCHES, PAGE_1, 0, 1)</span><span class="font" style="font-family:menlo, consolas, monospace, sans-serif;"><br></span></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;"><span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">frame_1 = createText (1, 1, 1, 1)</span><span class="font" style="font-family:menlo, consolas, monospace, sans-serif;"><br></span></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;"><span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">setFontSize (24, frame_1)</span><span class="font" style="font-family:menlo, consolas, monospace, sans-serif;"><br></span></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;"><span class="font" style="font-family:menlo, consolas, monospace, sans-serif;"><br></span></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;"><span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">deleteText (frame_1)</span><br></p><p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px;"><br></p><div style="font-family:arial, sans-serif;">After executing the first three lines of code above and then loading (or typing) text into the frame all looks fine. In particular, the text is 24 point. Also, I see from the "Text Properties" window that the font size shows as "24 pt." However, after executing the "deleteText (frame_1)" call above I see from the "Text Properties" window that the font size shows as "12 pt," which is the default point size I have set for text frames in the "Document Setup" window. Also, entering text into the frame confirms that it's now 12 pt. (As an aside, it seems that "getFontSize()" always returns "12.0" regardless of the frame's actual font size.)</div><div style="font-family:arial, sans-serif;"><br></div><div style="font-family:arial, sans-serif;">deleteText() is reverting other properties, too, like Paragraph Style and Character Style.<br></div><div style="font-family:arial, sans-serif;"><br></div><div style="font-family:arial, sans-serif;">As a workaround it seems I can first append my new text to the end of the frame, and then select and delete the original text, which is only a few extra steps, but I didn't want to adopt that as a standard without checking first.<br></div><div style="font-family:arial, sans-serif;"><br></div><div style="font-family:arial, sans-serif;">Thanks.<br></div><div id="sig49496385"><div class="signature"><br><br></div><div class="signature">--<br></div><div class="signature"><br></div><div class="signature"> Matt Miller<br></div><div class="signature"> mailto:matt.miller@fastmail.com<br></div><div class="signature"><br></div></div><div style="font-family:arial, sans-serif;"><br></div></body></html>