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.
Comments
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.
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
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.
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.
Can this be done with the setProperty function
IR for AS/NZS 1100