Symbol Instance New Component State Question (w/ Backstory)

New Here ,
Jul 21, 2022 Jul 21, 2022

Copy link to clipboard

Copied

Hi all,

 

I calculated that I have 13 and a quarter weeks to go if I manually sift through making 2087 component states. I have attached screenshots attached at the bottom--they are of the Excel spreadsheet with the total amount of labor, some of the 18 artboards, and then the current state of the components compared to the desired state of the components. Now, this process is highly replicable, and as such, should have a solution through code.

My code thus far has been logging in order to determine the appropriate route to take...it is attached here:

 

function myCommandFunction(selection) {
  let node = selection.items[0];

  node.children.forEach(function(childNode,i) {
    console.log(childNode)
    console.log(childNode.name)
    console.log(childNode.isMaster)
  })
};

module.exports = {
  commands: {
    myCommand: myCommandFunction
  },
};

 


This exports the base level of childNode, the name of the childNode within, and a boolean value of whether the childNode is the main/Master component or not. It works great and logs what I need it to.

But, I cannot determine how to add a new "Component State" (as seen below this paragraph) in code. I found this on the documentation for symbolInstance: It is not currently possible for plugins to create a new component definition or a new SymbolInstance node, aside from using commands.duplicate to clone existing SymbolInstances.

 

Seth24910359586o_5-1658429649192.png


Does this mean that I cannot have code copy an existent vector into a code-created new "Component State" for me? Or am I mistaken?

Thank you!
Seth

Images mentioned earlier below 🙂

 

Seth24910359586o_2-1658428544814.pngSeth24910359586o_0-1658428383341.png

Seth24910359586o_3-1658428971205.png

TOPICS
How to , Plug-ins

Views

76

Likes

Translate

Translate

Report

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
no replies

Have something to add?

Join the conversation