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

Removing content from Rectangle without untagging

Explorer ,
Oct 19, 2018 Oct 19, 2018

How can i remove graphics from Rectangle without untagging this Rectangle?

This command:

myRectangle.graphics.everyItem().remove()

leads to remove tag from Rectangle.

How can I remove graphic and preserve tags?

TOPICS
Scripting
332
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
People's Champ ,
Oct 19, 2018 Oct 19, 2018
LATEST

var xElt = rect.associatedXMLElement;

if ( xElt ) {

var xAttr = xElt.xmlAttributes.itemByName("href");

xAttr.isValid && xAttr.remove();

xElt.xmlContent.remove();

rect.markup( xElt );

}

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