Skip to main content
Inspiring
July 22, 2019
Answered

• Symbol.remove(); ->   Move the "broken" symbol on most-top-layer, why?

  • July 22, 2019
  • 1 reply
  • 613 views

Hello -

I was wondering why "Symbol.remove();" is moving the freshly "broken" symbol on most-top-layer?

And is there a way to avoid it?

I mean… How can we make sure that the freshly broken symbol remains on its layer?

Thank you.

- Dimitri

This topic has been closed for replies.
Correct answer pixxxelschubser

Like I said in your other thread:

Do you have screenshots before and after?

Show us your code and an example file please.

I never heard about such problems.

Try the following code. The symbol instance stays on the original layer.

var aDoc = app.activeDocument;

var sym = aDoc.symbols["Band"]; // symbol "Band" should alredy exists in your document

var aSymInstance = aDoc.symbolItems.add(sym);

aDoc.layers.add();

aDoc.layers.add();

aDoc.layers.add();

aSymInstance.breakLink();

1 reply

pixxxelschubser
Community Expert
pixxxelschubserCommunity ExpertCorrect answer
Community Expert
July 22, 2019

Like I said in your other thread:

Do you have screenshots before and after?

Show us your code and an example file please.

I never heard about such problems.

Try the following code. The symbol instance stays on the original layer.

var aDoc = app.activeDocument;

var sym = aDoc.symbols["Band"]; // symbol "Band" should alredy exists in your document

var aSymInstance = aDoc.symbolItems.add(sym);

aDoc.layers.add();

aDoc.layers.add();

aDoc.layers.add();

aSymInstance.breakLink();

Inspiring
July 28, 2019

Thank you pixxxel schubser

As usual very helpful.