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.
Access values found in configuration tables
eric_ma454
Member Posts: 14 ✭
Hi all,
After changing the featurescript ID values, how can you access the sub values for each column? For instance on the attached image, if the user selects the parameter of _3_8 (3/8) and it is instantiated,
how would the #socket_depth value be drawn from that particular chosen configuration?
Best,
Eric Ma
AguaClara Cornell
After changing the featurescript ID values, how can you access the sub values for each column? For instance on the attached image, if the user selects the parameter of _3_8 (3/8) and it is instantiated,
how would the #socket_depth value be drawn from that particular chosen configuration?
Best,
Eric Ma
AguaClara Cornell
0
Comments
Since the part studio is also imported at the beginning of the feature code, does the import itself contain data on the configuration table? When the user inputs a configuration, all we would need to do is find this value separate of the instantiation. Would that allow access to the configuration table?
No, it is not possible.
You will have to recreate the data in the FeatureScript.
IR for AS/NZS 1100
Currently, the instantiator code itself does not expose direct access to the other context (i.e. the Part Studio you're bringing it), but it's easy enough to do it yourself. For instance, let's say you already have code like this:
You can also, at any point, get the context of the PART_STUDIO you want, using that same build function, and that same configuration. And from that context you can get your variable values:
Generally we encourage using the instatiator instead of calling the build function directly like this, so it would be good to have some ability for the instantiator itself to return variable values in the context. That would be even easier and run faster than the code above. If you're interested in that, please submit an improvement request!