Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to Remove Unwanted Textframe

Community Beginner ,
May 23, 2008 May 23, 2008
I clicked the Type Tool in illustrator CS, but i did not type any Text mater. In this case, if i select the next(any) tool (or) i press the Esc key, an unwanted textframe is formed. Is it possible to remove that unwanted all textframe(contain without text) using script.

Regards,
Prabudass
TOPICS
Scripting
592
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
LEGEND ,
May 23, 2008 May 23, 2008
Yes, but it's also possible with the UI. Object>Path>Cleanup...

JET
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 23, 2008 May 23, 2008
Hi JET,

Thanks for your support. Please kindly help me how to remove the "stray points"(Object>Path>Cleanup) through scripts (or) visual basic.

Thanks,
Prabudass
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 24, 2008 May 24, 2008
Prabudass:
//to remove empty text frames from the active document
var docRef = app.activeDocument;
var textObjects = docRef.textFrames;

for(var i = textObjects.length; i > 0; i--)
{
if(textObjects.contents == "")
textObjects.remove();
}

is that what you wanted to do?
A
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 26, 2008 May 26, 2008
Hi,

Thanks. Its throws following error while running.
Error 1302:No such element
Line: 8
-> if(textObjects.contents == "")

Please help me to solve this error.

Thanks,
Prabudass
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 26, 2008 May 26, 2008
sorry Prabudass there is an off by one error
change: for(var i = textObjects.length; i > 0; i--)
to: for(var i = textObjects.length - 1; i >= 0; i--)
A
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 27, 2008 May 27, 2008
LATEST
Hi Ang$t,

Thanks for your help. Now its working fine.

Thanks,
Prabudass
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines