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 like in hole feature?

adamohernadamohern Member, OS Professional Posts: 216 PRO
How are the icons added on the left of the hole feature length parameters? I don't see any mention of them in the std FS code.

Comments

  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 927
    That's not yet exposed to FeatureScript -- will come a bit later (probably with custom icons for your own features).
    Ilya Baran \ Director, Architecture and FeatureScript \ Onshape Inc
  • emerson_botteroemerson_bottero Member, Developers Posts: 37 ✭✭
    +1 @adamohern. I need it to.
    Hope we can use only the icon with no text either, only mouse tip  whem hover.
  • emagdalenaC2iemagdalenaC2i Member, Developers Posts: 548 ✭✭✭✭✭
    Actually you can use exactly the icons of the Hole feature if your annotations are named exactly as in the Hole FS of the std document

    Like in this example:


    FeatureScript 961;import(path : "onshape/std/geometry.fs", version : "961.0");
    annotation { "Feature Type Name" : "My Feature" }export const myFeature = defineFeature(function(context is Context, id is Id, definition is map)    precondition    {        annotation { "Name" : "My Length" }        isLength(definition.holeDiameter, LENGTH_BOUNDS);
            annotation { "Name" : "My Length" }        isLength(definition.cBoreDiameter, LENGTH_BOUNDS);
            annotation { "Name" : "My Length" }        isLength(definition.cBoreDepth, LENGTH_BOUNDS);
            annotation { "Name" : "My Length" }        isLength(definition.cSinkDiameter, LENGTH_BOUNDS);
            annotation { "Name" : "My Length" }        isLength(definition.cSinkAngle, LENGTH_BOUNDS);
            annotation { "Name" : "My Length" }        isLength(definition.tapDrillDiameter, LENGTH_BOUNDS);
            annotation { "Name" : "My Length" }        isLength(definition.holeDepth, LENGTH_BOUNDS);
            annotation { "Name" : "My Length" }        isLength(definition.tappedDepth, LENGTH_BOUNDS);
            annotation { "Name" : "My Length" }        isLength(definition.tapClearance, LENGTH_BOUNDS);           }    {        // Define the function's action    });
    Un saludo,

    Eduardo Magdalena                           C2i Change 2 improve                           ☑ ¿Por qué no organizamos una reunión online?   
                                                                 Consulting Partner de Onshape                                      Averigua a quién conocemos en común
  • emagdalenaC2iemagdalenaC2i Member, Developers Posts: 548 ✭✭✭✭✭
    @ilya_baran Are there other icons we can use?
    Un saludo,

    Eduardo Magdalena                           C2i Change 2 improve                           ☑ ¿Por qué no organizamos una reunión online?   
                                                                 Consulting Partner de Onshape                                      Averigua a quién conocemos en común
  • emagdalenaC2iemagdalenaC2i Member, Developers Posts: 548 ✭✭✭✭✭
    I have just found 3 more

            annotation { "Name" : "My Length" }
            isLength(definition.dx, LENGTH_BOUNDS);
    
            annotation { "Name" : "My Length" }
            isLength(definition.dy, LENGTH_BOUNDS);
    
            annotation { "Name" : "My Length" }
            isLength(definition.dz, LENGTH_BOUNDS);
    Un saludo,

    Eduardo Magdalena                           C2i Change 2 improve                           ☑ ¿Por qué no organizamos una reunión online?   
                                                                 Consulting Partner de Onshape                                      Averigua a quién conocemos en común
  • MBartlett21MBartlett21 Member Posts: 1,581 EDU
    Does offsetX offsetY and offsetZ work?
    MB - I make FeatureScripts: view FS (My FS's have "Official" beside them)
  • emagdalenaC2iemagdalenaC2i Member, Developers Posts: 548 ✭✭✭✭✭
    No
    Un saludo,

    Eduardo Magdalena                           C2i Change 2 improve                           ☑ ¿Por qué no organizamos una reunión online?   
                                                                 Consulting Partner de Onshape                                      Averigua a quién conocemos en común
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 927
    I think you guys got all of them...  We plan on more customization in this area, but it's not the highest priority.
    Ilya Baran \ Director, Architecture and FeatureScript \ Onshape Inc
Sign In or Register to comment.