Component that can not be made unique

Component that can not be made unique

Postby sdmitch » Tue Apr 04, 2017 2:27 am

Is there any reason that a component created by a plugin can not be made unique?

I've tried using a group and .to_component as well as creating the definition.entites. In both cases, when the component is added to the model, the 'Make Unique' option is grayed out. If I copy the instance, the copy can be made unique while the original still can not be.

I guess the answer is to hide an instance in the model so additional copies can be placed made unique and modified
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: Component that can not be made unique

Postby Box » Tue Apr 04, 2017 3:03 am

Check when you have made a copy, can you make the original unique if you haven't made the copy unique.
I think you may be simply running into the logic problem of there needs to be something to make your component unique from, if there is only one it already is unique.
1
User avatar
Box 
 

Re: Component that can not be made unique

Postby sdmitch » Tue Apr 04, 2017 3:09 pm

It makes perfect sense I guess that, if you only have one instance of a component in the model it is already 'unique'. What I was trying to do is create a basic component in the model then place and modify copies of that component without effecting the original. Placing and hiding a copy solves the 'logic problem'.
0
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch 
PluginStore Author
PluginStore Author
 

Re: Component that can not be made unique

Postby slbaumgartner » Tue Apr 04, 2017 3:39 pm

If you want each copy to be unique, why not use Groups? The Group#copy method automatically clones the associated ComponentDefinition and hooks the new copy to the new clone. That is, each copy is "unique" right from the start.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to Developers' Forum

Who is online

Users browsing this forum: No registered users and 4 guests

Visit our sponsors: