having trouble with setting configurations for `addInstance()`

kyle_altendorf
kyle_altendorf Member Posts: 75 ✭✭
var instance = addInstance(
    instantiator,
    baseUnitStudio::build,
    {
        "configuration" : { "is_left" : false },
        "transform"     : transform(vector(x * definition.xd, y * definition.yd, 0 * inch))
    }
);

https://cad.onshape.com/documents/31d9f3436d1f6286f056967a/v/cbf25e31bb40ade74e9aa036/e/9cbee39ae72c63645cafbc53

I am attempting to set the is_left etc configuration checkboxes when instantiating a grid of instances of the base_unit part studio.

image.png

The is_left seems to work when I manually set it but I don't seem to be doing the right thing in the featurescript for setting that configuration value.

Thanks for any guidance.

Cheers,

-kyle

Best Answer

  • kyle_altendorf
    kyle_altendorf Member Posts: 75 ✭✭
    Answer ✓

    Turns out I had renamed the parameter but had not changed it's ID. Updating the ID resulted in it working. oops…

Answers

  • kyle_altendorf
    kyle_altendorf Member Posts: 75 ✭✭
    Answer ✓

    Turns out I had renamed the parameter but had not changed it's ID. Updating the ID resulted in it working. oops…