Annotation Array is not displayed correctly at PartStudioData


The values are displayed correctly, but not the part. Ideally, the configured part name would be displayed here.
Does anyone have an idea or solution?

here is my code:

  annotation { "Name" : "Bohrung setzten", "Item name" : "Bohrer", "Item label template" : "X #xri: Y #yri: #bohrer"}
  definition.myBohrer is array;
        for (var Bohrung in definition.myBohrer)
        {
            // Nested parameters defined here, as e.g. widget.myParameter
            annotation { "Name" : "X-Richtung" }
            isLength(Bohrung.xri, LENGTH_BOUNDS);
            annotation { "Name" : "Y-Richtung" }
            isLength(Bohrung.yri, LENGTH_BOUNDS);
            annotation { "Name" : "Bohrer auswaehlen" }
            Bohrung.bohrer is PartStudioData;
        }
  
Many thanks and merry christmas
George
Tagged:

Comments

  • kevin_o_toole_1
    kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565 image
    PartStudioData parameters without the dialog is opened display the name of the Part Studio, not the Part. If you would like it to behave differently, I would suggest raising an improvement request!
  • georg_von_vietinghoff
    georg_von_vietinghoff Member Posts: 9 ✭✭
    it works  B)

    and that's it, why it works:

    var configname = Bohrung.bohrer.configuration.Konfig_Bohrungen
    var bennenung = l_x_pos/meter*1000 ~ "/" ~ l_y_pos/meter*1000 ~ "/" ~ l_z_pos/meter*1000 ~ "/" ~ configname;
    setFeatureComputedParameter(context, id, { "name" : "bn", "value" : bennenung });



    it accesses the Featurescript ID and reads it out. Since this is all in a "map", you can also get to it.