I'm looking for some help in dynamically creating symbol masters and then resulting symbol instances. The biggest gap in documentation that I'm hitting is how to create a master symbol, add the associated artboard/layers, and then create instances of that symbol all within code. All examples I've been able to find utilize selected layers from the document and create a symbol from that. When I try to do it all with code, the closest I get is a red outlined box where the symbol should be that says, "Missing Symbol".
The general approach I've attempted thus far is:
- Create artboard with layers in code and don't assign a parent.
- Create. symbol master from the artboard with
- Create an instance of that symbol master with
- Add that instance to the document using
instance.parent = my_layer.
I feel like I might be going about the master/instance relationship all wrong or maybe I need to add the master to the document somehow.. not sure. Any info or references would be greatly appreciated!