Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.


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


  • Options
    kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    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!
  • Options
    georg_von_vietinghoffgeorg_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.
Sign In or Register to comment.