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.
How is variable type assigned to variables?
EvanReese
Member, Mentor Posts: 2,135 ✭✭✭✭✭
If I set a length variable with the Variable feature and look at it in the variable table, it show's the "variable type" as "length", but if I set the same value with setVariable() in FS, it shows as "Unspecified". How do I make it show "length" etc?
Evan Reese
0
Best Answers
-
_anton Member, Onshape Employees Posts: 410The standard variable feature has some special handling because we know how it's structured and what value field to show for each type (if you look at the source code, you'll see that length/angle/etc. have different fields in the precondition). With custom features, all bets are off about feature structure, so we just show the value with no type instead of trying to be too clever.0
-
_anton Member, Onshape Employees Posts: 410Depends on what you're trying to do, but yeah, I wouldn't anticipate any more interactivity with the table. Normally, custom feature rows are entirely read-only; the only special allowance we give is a name field with UIHint.VARIABLE_NAME, in which case you can rename. But the type is hardwired to only work with the standard feature.0
Answers