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.

Using data from custom table in features?

eric_pestyeric_pesty Member Posts: 2,025 PRO
Is there a way to "use" data from custom tables other than just "looking" at it?

It would be really nice if you could use the values in features or at least set a variable with it (instead of using a "measure" or similar feature). For example I would like to use the length of freeform splines in other features but I think the only way to do this is to create a measure value first, which seems like a waste of time as the length is already computed and shown in the table...

Is there a way to do this right now or should I submit an IR?

Comments

  • NeilCookeNeilCooke Moderator, Onshape Employees Posts: 5,789
    Tables are calculated once the feature list has been fully regenerated so you wouldn’t be able to use the results as a variable to drive features (it would create a circular reference). 
    Senior Director, Technical Services, EMEA
  • S1monS1mon Member Posts: 3,173 PRO
    FeatureScript clearly can read from custom tables, but I don't know of a way to do this directly in Onshape, say the way you would with a variable or variable studio.

    I could see an IR for accessing a variable which happens to be an array, which happens to be in a custom table. The indices could be the text labels. 
  • eric_pestyeric_pesty Member Posts: 2,025 PRO
    Right, I guess that makes sense...
    You can see the table updates to include everything up to the rollback bar so I guess to use the data in a variable, the table would have to computed "up to that point" (as if it was rolled back just before the variable) but I guess it's a slippery slope where at some point the table would have to updated with each feature rather than just at the end to avoid circular references...

    It would be nice if there was a way to do it though but I can see how a "measure" feature is different as it has a specific place in the feature tree regen order.


  • Anthony_KovacAnthony_Kovac Member Posts: 2

    Onshape avoiding a circular reference as a result of using a custom table value to actually drive a geometry feature makes sense to me. However, for what I'm trying to do I don't believe I'd create a circular reference and would be really handy.. The information I wish to use is obviously all there so having to create a FS would be a bit frustrating.

    I'm trying to create a generic assembly document which is has dimensions of a frame driven by a variable studio. The user can type in dimensions of the frame, and the other components will simply refresh (harnesses will change length depending on the frame size thanks to in-context construction).

    Wouldn't it be cool to be able to reference harness lengths as a variable so that I can then plug this into basic logic and select which harnesses (out of a set of lengths which my company carries in stock) would be the correct choice for a frame of that particular size? This way I could correctly populate an entire kit BoM including wiring with only these frame dimensions.

Sign In or Register to comment.