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.
Editing drawing annotations
Dmytro_Zaitsev
Member Posts: 9 ✭
in Drawings
Hello,
I’m working with the Drawing API and trying to manage General Tables (Onshape::Table::GeneralTable) programmatically.
I’m able to create a table successfully using onshapeCreateAnnotations, and I receive a valid logicalId (e.g. h:100000F5) from the modification status.
However, I’m running into issues when trying to update or delete the table.
1. Editing table content
I tried updating the table using onshapeEditAnnotations:
- Referencing the table via
logicalId - Sending updated
cells(changingcontent) - Also tried changing
rows/columns
Example
{
"description": "Update table",
"jsonRequests": [
{
"formatVersion": "2021-01-01",
"messageName": "onshapeEditAnnotations",
"annotations": [
{
"logicalId": "h:100000F5",
"table": {
"logicalId": "h:100000F5",
"cells": [
{
"column": 0,
"content": "NEW 123",
"row": 0
}
],
"columns": 1,
"rows": 1,
"position": {
"coordinate": [
4.0,
4.0,
0.0
],
"type": "Onshape::Reference::Point"
}
},
"type": "Onshape::Table::GeneralTable"
}
]
}
]
}
Result:
modify→ 200 OK- status →
DONE,status: OK - but no visible changes in the drawing
Interestingly:
- Updating
positiondoes work - Updating
cells,rows,columns→ no visible effect
2. Deleting the table
I also tried deleting the table using:
{
"description": "Delete table",
"jsonRequests": [
{
"formatVersion": "2021-01-01",
"messageName": "onshapeEditAnnotations",
"annotations": [
{
"logicalId": "h:100000F5",
"table": {
"logicalId": "h:100000F5"
},
"type": "Onshape::Table::GeneralTable"
}
]
}
]
}
Same behavior:
- request succeeds
- status =
DONE - table is not deleted
Questions
- Is it currently supported to edit table cell content (
cells[].content) forOnshape::Table::GeneralTablevia API? - Are
rows/columnseditable after creation? - What is the correct way to delete a table annotation?
- Is the expected pattern to delete + recreate tables instead of editing them?
- Are there additional required fields (e.g. formatting / bounding box / full cell set) when editing tables?
0
Categories
- All Categories
- 10.2K Community Support
- 4.6K General
- 194 Account and subscriptions
- 353 Data management
- 1.6K Product Feedback
- 215 New in Onshape
- 14 Onshape Labs
- 75 CAM Studio
- 35 PCB Studio
- 107 Simulation
- 209 Onshape Mobile
- 315 App Store & Partners Apps
- 8.2K Using Onshape
- 1.8K Drawings
- 2.3K FeatureScript
- 324 Learning Center
- 253 Education Community