Icons on param groups?
EvanReese
Member, Mentor Posts: 3,099 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.
0
Comments
-
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.
1 -
Ah, thanks. I don't need a driving parameter for what I'm doing though. Any workarounds?
0 -
Can you drive with an empty static parameter to trick the UI?
0 -
Read-only string parameter?
0 -
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.
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 });0




