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.

Custom Table: Length Dimension of Sketch

philipp_wehrphilipp_wehr Member Posts: 8 EDU
Hey, 

I wanted to ask if someone could help me with creating a Custom Table for the Length and angle dimensions in a Sketch 
I looked at a few different custom tables, but couldn't figure out, how I get the dimensions of a sketch into a Custom Table. 
This would be my sketch the name of the Dimensions could be predefined and the Custom Table should only show the Name of the Dimension and then the Value. 

Thanks for the help, 
Philipp

Tagged:

Comments

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,310
    Hi Philipp, it's not possible to extract dimension values directly from a sketch. The only way to get the values in a table is to use variables or a feature like Measure Value. Here is an example:



    https://cad.onshape.com/documents/147ee8b29ea07b7d5aef89cc/w/596cf455c16a2aa5f240cf95/e/e7867b4fc6677a33a10b02d4
    Senior Director, Technical Services, EMEAI
  • philipp_wehrphilipp_wehr Member Posts: 8 EDU
    Thank you so much that would work.
    Could you maybe show me how to write the Feature Script only that Variables with a specific Name or  a specific Selection of Variables gets added to the Table and not all Variables. In some cases I have more Variables that dont need to be in the Table

  • philipp_wehrphilipp_wehr Member Posts: 8 EDU
    I tried to find a solution for picking the Variables to add to the custom Table and not all Variables, but the query parameter function can not add Variables. Is there another way to pick the variables and not have all Variables selected ? I also wanted to ask if there is a good way to learn to code FeatureScript. I did all the Tutorials available for Onshape, but still can't figure out how I can Pick Variables and add them to Variable in Feature Script. There is also not that much to find on the Forum about Picking Variables in Onshape. 
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,310
    Picking variables is not possible. I would suggest prefixing each variable that you want to use so you can collect by name, e.g. #table_xxxx
    Senior Director, Technical Services, EMEAI
  • philipp_wehrphilipp_wehr Member Posts: 8 EDU
    Hey Neil, 

    Can you show me an example on how to collect them by name. For example #angle and #length1 in your document, because i couldn't find an example for picking each variable in featurescipts custom table. 

    Thanks for all the help. 
  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,310
    Hey Neil, 

    Can you show me an example on how to collect them by name. For example #angle and #length1 in your document, because i couldn't find an example for picking each variable in featurescipts custom table. 

    Thanks for all the help. 
    I just renamed the variables to start with "t_" and used a regex expression to filter the results in the table:
    https://cad.onshape.com/documents/147ee8b29ea07b7d5aef89cc/w/e9641a1c8d28169866c273f4/e/e7867b4fc6677a33a10b02d4
    Senior Director, Technical Services, EMEAI
  • Eric_FossellEric_Fossell Member Posts: 6 PRO
    Is it possible to modify this table to add columns for different configurations? I have 4 configurations and I would like to see the measured values of each configuration side by side.
  • Eric_FossellEric_Fossell Member Posts: 6 PRO
    Thanks for all the help above. I have a measured value table setup that is returning just the values I want. Is it possible to modify the feature script to add columns for configurations that are in the part studio? 
Sign In or Register to comment.