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.
Table (New Custom Feature!)
MichaelPascoe
Member Posts: 2,935 PRO
Table (New Custom Feature!)
https://cad.onshape.com/documents/01485b6de17aef414a25e778/w/926dfaef6b63d239b8d9d739/e/fb5da00aa581ddc9c53c4379?renderMode=0&rightPanel=cutlistPanel&uiState=6398b9684c6d6f30a465a5b1Table allows you to:
- Import CSV data
- Manually input data
- Store data as a custom table
- Store data as a Cutlist table so it can be inserted into a drawing
Special thanks to @NeilCooke for creating the native Cut list feature which allows this feature to get tables to drawings.
If you use Onshape for work, consider saving hours of work by automating your process with custom features and API.
CADSharp specializes in custom features and API.


How to add this custom feature to your toolbar?

RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________
Tagged:
14
Comments
-
Nice!
Michael - do you think we could use Variables or Custom properties in the tables, like so?
I guess you need to allow "use expression" in the Value field...something like that?
Thanks!0 -
Great feedback @romeograham!
Currently it is set to string / text only. Expressions would be excellent to have, I'll include this in the next update.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________1 -
0
-
Or that you allow "11" columns?
1 -
@sebastian_glanzner You got it. Normal table features might only go to 10 columns.. This one goes to 11!
https://www.youtube.com/watch?v=4xgx4k83zzc
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________3 -
Update!
- NEW - Expression based inputs. (Requested by @romeograham)

RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________5 -
This is great incentive for us to add functionality like importing custom tables into drawings. Because if we don't, our users do stuff like this
Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc14 -
Fantastic @MichaelPascoe - love your responsiveness.1
-
Update!
- NEW - Table name.
- NEW - Custom tables panel now supports multiple tables.
- NEW - Check box to simplify part for drawing. This reduces primitive count from over 3000 to 13.
- Moved "Cut list" check box near the top of the UI.
- "Cut list" composite part data is now named.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________2 -
Update!
- NEW - Export to Excel (via JSON)

RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________1 -
Oh very nice! Thank you1
-
Oh that JSON export is cute!
I spent a little time experimenting with how to export significant amounts of data from a custom feature in a Parts Studio. Unfortunately, it looks like Custom Tables and the Variables Table truncate data for display in the UI after a few hundred characters or so and they also return truncated results when using the "Copy to Clipboard" action. So that's no good.
It looks like you're using a parameter in the feature editor. I played with that too and I managed to shove about 100 KB in there (which really surprised me!) but I suspect it'll cause stability issues if I push it too far. It's cute that it works but it doesn't seem scalable.
Unfortunately I can't embed newlines in a way that will survive copy-paste so for my purposes I'm going to try writing a custom app so I can have a more convenient download button and not risk overloading the UI. Creating a custom app has lots of other advantages although the barrier to entry is significantly higher.0 -
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________0 -
Looks like the expression driven approach overwrites the expression with a string? Which makes it so it doesn't update with changes to the variables used.0
-
@SethF, Switch to expression first, then type the expression.
I have it set to try and convert the expression to string and vise versa. I'll take a closer look. Sounds like it isn't working how I intended.
There we go, see if that is better. It will not try to convert the string to expression, so there should be less confusion now. It will try to convert expression to string if you go the other way.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________1 -
There we go. Before it seemed like it was overwriting whether or not I ever hit boolean again after setting the expression. But now it looks like it's maintaining those expressions as long as you don't switch it back and forth. Thanks!2
-
ilya_baran said:This is great incentive for us to add functionality like importing custom tables into drawings. Because if we don't, our users do stuff like this


1 -
MichaelPascoe said:
So I’ve made a lot of progress on my CAM features and I’ve come up with two good solutions for getting substantial amounts of data out of Part Studios.
One solution was to simply use println() to dump the data to the Notices area from which the user can then copy-paste. I have a checkbox to do this in my G-Code post processor.
And the much more convenient solution was to store the data into variables in the context and write an app to get the data out.
So I did that. My G-Code post processor feature stores its generated files in variables along with a file index. My app’s user interface gets embedded into OnShape as a right side element panel for Part Studios and it provides links to download or view the files. Click a link, receive a file, it’s that simple!
Here’s the code for my app. It handles authentication with the OnShape API and presents the panel. If you had a whole ton of JSON or CSV or other data to export from a custom feature then something like this might do the trick!
(Or instead of writing an app, yet another alternative might be to write a shell script to download the data from the OnShape API using ‘curl’.)
Source: https://github.com/j9brown/camel
Aside: I’m planning to make a more formal announcement of my CAM features after I work out some more bugs and limitations and write some documentation. So let’s keep the conversation here focused on Michael’s cool new feature!
2 -
@jeff_brown304 wow, cool! Don't worry about my feature, it is a temporary plug while we wait for the real deal. But hey, have any GIFs? I would love to see this neat app and features in action.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________0 -
I've been looking for ways to automatize property asignation through FeatureScripts and I've always come to the same conclusion: i need a database that is native in OnShape so I can query its information. Could this Table FS be the solution I have been looking for? Could that be a reasonable use case?0
-
@javl0p_2, this is more for viewing the data you already have in a custom table. However, what you are describing is possible. It will all depend on how automated you want your process to be and where you want to store your data.
A very manual workflow might look like this:- Store all of your data in a google sheet.
- Copy and paste that sheet into a Variable studio.
- Now you can access that Variable studio from any Onshape document.
- Use custom features to assign those variables to the corresponding properties of your part.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________1 -
Ok, Variable Studios also seem like a fairly good choice, I'll check them out.
Thanks!1 -
This is fantastic! Great work @MichaelPascoe !1
-
@MichaelPascoe I've been heavily utilizing your FS (thank you!)
With Onshape's recent addition of the Tolerance column in an Inspection Table, I wanted to see if you think it's possible in your code to add the ability to exclude that column (or any other column) after a csv is read and before the cut list is created? I've been combing through your Feature Studio, but can't quite figure out how to make it work (figured it might involve skipping over a specific column number from the csv...)
Thanks again!0 -
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________0 -
This featurescript works pretty well - the main issue I'm having is that when I enter in an expression into a cell sometimes the expression or variable gets erased and replaced with a static value (usually the last value of that specific variable when I edited the table). Is there any way to prevent my formulas or variables from being erased out of the table?0
-
@Sam_Schlageck this is a bug, I'll look into it. In the mean time, you can use Onshapes built in way to do this.
- While keeping the input in (abc) mode, right click the input box > convert to expression.
- Place your variable within a toString() because the expression has to result in a string.

RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________0 -
Update!
Thank you @Sam_Schlageck for providing feedback which triggered this update.
There is currently a bug related to editing logic and arrays that breaks expressions.
To account for this, I have changed the opposite direction button to a check box which avoids using edit logic.
TLDR: With this update, variables will no longer break when adding new rows or clicking buttons.
RENDERCAD
rendercad.ai - Photorealistic product rendering.
▚▞▚▞▚▞▚▞▚
________________________________________________________________________0 -
0










