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.

Icons on param groups?

EvanReeseEvanReese Member, Mentor Posts: 2,670 PRO

I don't think this is currently possible, but want to be wrong. Anyone know if we can add icons for collapsable groups? The Hole feature gets close, but the native icon implementation isn't done via FS imports.

Evan Reese
The Onsherpa | Reach peak Onshape productivity
www.theonsherpa.com

Comments

  • _anton_anton Member, Onshape Employees Posts: 501 image
    edited November 26

    Working for me: https://cad.onshape.com/documents/6f2302afa2b4523cc8729522/w/5e1013891277c2ebf88d2930/e/62675c2d3d05f1062f4671fe

    With the caveat that you're not putting an icon on the group but rather on the driving parameter.

  • EvanReeseEvanReese Member, Mentor Posts: 2,670 PRO

    Ah, thanks. I don't need a driving parameter for what I'm doing though. Any workarounds?

    Evan Reese
    The Onsherpa | Reach peak Onshape productivity
    www.theonsherpa.com
  • Derek_Van_Allen_BDDerek_Van_Allen_BD Member Posts: 373 PRO

    Can you drive with an empty static parameter to trick the UI?

  • _anton_anton Member, Onshape Employees Posts: 501 image

    Read-only string parameter?

  • EvanReeseEvanReese Member, Mentor Posts: 2,670 PRO

    I actually tried a read-only string param after your first reply, and it seems they can neither take an icon nor be the driving param.

    image.png image.png
    FeatureScript 2815;
    import(path : "onshape/std/common.fs", version : "2815.0");
    ICON::import(path : "473f913b444c0e44b4206c1a", version : "ea421e8e47ec7c2998ac44e9");
    
    annotation { "Feature Type Name" : "My Feature", "Feature Type Description" : "" }
    export const myFeature = defineFeature(function(context is Context, id is Id, definition is map)
        precondition
        {
            annotation { "Name" : "My String", "Icon" : ICON::BLOB_DATA, "UIHint" : UIHint.READ_ONLY }
            definition.myString is string;
            
            annotation { "Group Name" : "Group", "Driving Parameter" : "myString", "Collapsed By Default" : false }
            {
                annotation { "Name" : "My Boolean" }
                definition.myBoolean is boolean;
                annotation { "Name" : "My String" }
                definition.myString is string;
            }
        }
        {
            // Define the function's action
        });
    
    Evan Reese
    The Onsherpa | Reach peak Onshape productivity
    www.theonsherpa.com
Sign In or Register to comment.