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: 1,173
    That's not yet exposed to FeatureScript -- will come a bit later (probably with custom icons for your own features).
    Ilya Baran \ VP, 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, Channel partner Posts: 858 ✭✭✭✭✭
    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:


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

    Eduardo Magdalena                         C2i Change 2 improve                         ☑ ¿Por qué no organizamos una reunión online?  
                                                                         Partner de PTC - Onshape                                     Averigua a quién conocemos en común
  • emagdalenaC2iemagdalenaC2i Member, Developers, Channel partner Posts: 858 ✭✭✭✭✭
    @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?  
                                                                         Partner de PTC - Onshape                                     Averigua a quién conocemos en común
  • emagdalenaC2iemagdalenaC2i Member, Developers, Channel partner Posts: 858 ✭✭✭✭✭
    I have just found 3 more

    <span>        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);</span><br>
    Un saludo,

    Eduardo Magdalena                         C2i Change 2 improve                         ☑ ¿Por qué no organizamos una reunión online?  
                                                                         Partner de PTC - Onshape                                     Averigua a quién conocemos en común
  • MBartlett21MBartlett21 Member, OS Professional, Developers Posts: 2,034 EDU
    Does offsetX offsetY and offsetZ work?
    mb - draftsman - also FS author: View FeatureScripts
    IR for AS/NZS 1100
  • emagdalenaC2iemagdalenaC2i Member, Developers, Channel partner Posts: 858 ✭✭✭✭✭
    No
    Un saludo,

    Eduardo Magdalena                         C2i Change 2 improve                         ☑ ¿Por qué no organizamos una reunión online?  
                                                                         Partner de PTC - Onshape                                     Averigua a quién conocemos en común
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,173
    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 \ VP, Architecture and FeatureScript \ Onshape Inc
Sign In or Register to comment.