Create component variant using plugin

I don’t quite understand what problem you are facing.

How to set the properties and value of a variant?
Change the ComponentNode.name property following the pattern: PropertyName=PropertyValue, PropertyName=PropertyValue, …

How to add a component property?
Use addComponentProperty.

How to apply added component property to node in inside ComponentNode?
Store the value (which you got after using addComponentProperty) in a variable and change the componentPropertyReferences property of the desired node.


To be more specific, please share enough information, full code, screenshots/video so that anyone can help you.

1 Like