Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
Updated FeatureScript: PP-CapScrews v 4.0.1 has hex heads, low-profile socket heads, and more!
Comments
-
Hole callouts are created from FS attributes, so yes, it can be done in a custom feature. Theres enough edge cases and complexity that the hole feature implements that I'd recommend reusing that code.
The two easiest ways I see to do it:
1: Call the hole feature directly (rather than making your own holes)
2: Copy in the code for createHoleAttribute (and all of its dependencies) in the hole feature, and give that function a hole feature definition matching the hole you've created. Then call setAttribute() with the result.
1 -
@kevin_o_toole_1
Can you help me learn what attributes to set? Do any arbitrary attributes set on the feature appear on the callouts? Or does the use choose them? Are there any suggestions on which data types are supported for drawing callouts?
I am Familiar with setAttribute, but it accepts any data type, iirc, including maps
I don't recall reading or seeing any docs about how drawings interact with attributes. If you could point me in the right direction that would be really helpful. I think several of my existing features would benefit.
Thanks
0 -
Unfortunately we don't have docs around this specifically. The point around which a stable working interface exists is createHoleAttribute. I think we can get that function documented and exported soon — in the meantime, copying that function seems like the best approach.
Drawings' hole callouts are looking specifically for attributes of type HoleAttribute. Beyond that I honestly don't know the specifics, but I do know you'll be in good shape by reusing code from the hole feature.
0 -
I see, that's kind of what I expected.... The existing functionality does hole callouts. That means that I might be able to have my feature call out a hole by re using the code as you describe, but I couldn't use it to create a thread call-out, which is of course different than a hole call out. Right?0
-
Correct, we have hole callout support, not generic custom callout support.
If and when the hole feature adds other functionality (like cosmetic threads), it will also add new attributes and drawings will support interpreting said attributes at that point.
1 -
Thanks.0
-
@dave_cowdendave_cowden said:Hi @jochen333
This has been requested before-- unfortunately unless it has changed, this is not possible due to limitations with the Onshape API at this time.
Can this be done with the setProperty function0



