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.
Coordinate/Vector input parameter
imants_smidchens
Member Posts: 63 EDU
Hi! Novice featurescripter here, what's the best way to have a UI that lets you input points in comma-separated coordinate form (for now cartesian is enough)?
A [bad] approach I think might work is asking for a string input, then parsing that string and converting to a vector, but that makes typechecking much harder.
Ideally would function in an array parameter or something similar so you can place as many points as you want
Cheers!
- Imants
A [bad] approach I think might work is asking for a string input, then parsing that string and converting to a vector, but that makes typechecking much harder.
Ideally would function in an array parameter or something similar so you can place as many points as you want
Cheers!
- Imants
Tagged:
0
Comments
https://cad.onshape.com/documents/576d1e60c6cb90985345ac37/v/6bdd1ac65b1e423b1a692568/e/0ea78f371cbafb95ea304449
You could also use an array for inputting multiple ones, either an array of strings as above.
Or if you don't mind the input requiring a bit more work, an array with each requiring 3inputs for x,y,z (more "tabing" between input cells would be required), this way you don't have to worry about units:
Learn more about the Gospel of Christ ( Here )
CADSharp - We make custom features and integrated Onshape apps! Learn How to FeatureScript Here 🔴
Can't seem to find the orginal document but here is one I did
https://cad.onshape.com/documents/f044ddc8d35e56ddf664cf5b/w/38d7f9552f87669c5214103a/e/5657845114584e71500268cb
collapse, active or inactive, reorder, delete, delta x,y,z, rotate, x,y,z