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.

"Tooltip Template" requires "Feature Name Template" to work?

javawizardjavawizard Member Posts: 12
I'm creating an "Import Variables" feature similar to SuperDerive's "Include variables" checkbox but without requiring a part to be imported from a part studio in the same operation.

So far so good: the feature is written and works, but I'm running into an interesting problem while putting some cosmetic touches on the feature: it seems as though the "Tooltip Template" option only works if the "Feature Name Template" option is also specified.

With both options:



The tooltip is rendered as expected:



But with only the "Tooltip Template" and not the "Feature Name Template":



Neither is visible:



My hope is to expose the list of imported variable names as part of the tooltip by using a computed parameter. Is there a way to have a tooltip template without also overriding the feature name?

Example doc: https://cad.onshape.com/documents/ae6f6068533e47c7078c8c28/v/3cf136424fc801660601dc50/e/8f6730aff4d93ffb93e8caec is with both specified (it works), https://cad.onshape.com/documents/ae6f6068533e47c7078c8c28/v/3d183568b176ab2046c66e53/e/8f6730aff4d93ffb93e8caec is with only the tooltip template specified (it doesn't work).

Thanks!

Comments

  • S1monS1mon Member Posts: 2,321 PRO
    Now that we have Variable studios and Global variables, what problems are you solving with this feature?
  • javawizardjavawizard Member Posts: 12
    Great question - I have some dimensions that are an artifact of how a particular sketch is laid out in a shared part studio and I need to import those dimensions into another part studio for the sake of building geometry around the location where that sketch will go before I import and position it with Super Derive. The way I'm doing that is by dropping some measured variables into the first part studio and then importing them from the second.

    As far as I'm aware variable studios don't support measured variables - but I would be thrilled to be proven wrong!

    (Other options I considered: importing the sketch and measuring it in the second part studio before importing it again into its final position - somewhat annoying because I can't later "delete part" on the sketch because delete part doesn't work on sketches; importing the sketch, measuring it, and then translating it into its final position - doesn't work because the "transform" tool doesn't work on sketches.)
  • S1monS1mon Member Posts: 2,321 PRO
    You could import a flat surface (which has the outline of the sketch) and transform it based on measured variables. 
  • javawizardjavawizard Member Posts: 12
    That may well solve my original problem, thanks.

    It still doesn't address my original question: why does the "Tooltip Template" FeatureScript annotation not work unless the "Feature Name Template" annotation option is also specified? Is that expected behavior (and why), a bug, or am I annotating my feature wrong in some other way?
Sign In or Register to comment.