understanding oppattern input (invalid input error)

ok.. tried searching for various things but my issue is that I don't understand what inputs are required in what form I think..  my featurescript is here (no laughing!)  silly feature ..  
I think I have everything correct but it says invalid input when I try it.. the entity to copy is a solid body, the transform is basically a do nothing placeholder and the instanceNames is an array of unique string names.  some of the annotation inputs are for later functionality so they shouldn't make a difference.. but I have no idea. 




Best Answers

  • lana
    lana Onshape Employees Posts: 782 image
    Answer ✓
    instanceNames array has to be the same length as transforms array ( in this case 1) . If you want to create `definition.entityCount` copies, you need to provide that number of transformations
  • christopher_mcvey
    christopher_mcvey Member Posts: 4 ✭
    Answer ✓
    lana said:
    instanceNames array has to be the same length as transforms array ( in this case 1) . If you want to create `definition.entityCount` copies, you need to provide that number of transformations
    and bang.. got it.. each instance of the pattern gets its name and a corresponding transform.. otherwise the pattern would just be the same transform on all the instances of the pattern.  thank you, I knew it had to be simple.

Answers

  • lana
    lana Onshape Employees Posts: 782 image
    Answer ✓
    instanceNames array has to be the same length as transforms array ( in this case 1) . If you want to create `definition.entityCount` copies, you need to provide that number of transformations
  • christopher_mcvey
    christopher_mcvey Member Posts: 4 ✭
    Answer ✓
    lana said:
    instanceNames array has to be the same length as transforms array ( in this case 1) . If you want to create `definition.entityCount` copies, you need to provide that number of transformations
    and bang.. got it.. each instance of the pattern gets its name and a corresponding transform.. otherwise the pattern would just be the same transform on all the instances of the pattern.  thank you, I knew it had to be simple.