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.

How do I change configuration value type from "Integer" to "Real"?

MannyFMannyF Member Posts: 18 ✭✭

When I create a configuration variable, I get the following type options:

image.png

I created a variable named "RackUnits" which I had originally configured as Integer. Later I learnt that there exists rack gear that is 0.5U tall so I wanted to change the type to Real to allow me to enter decimal values. However, when I click Edit definition… the type options are not shown:

image.png

I imagine this is how it works to prevent breaking dependencies. What would be the best way to do what I'm trying to do?

Comments

  • MichaelPascoeMichaelPascoe Member Posts: 2,329 PRO
    edited June 6

    .

    The best way will be to delete that configured variable and create another one with the same name.
    This doesn't sound amazing, but it is very quick and gets the job done.

    .


    Learn more about the Gospel of Christ  ( Here )

    CADSharp  -  We make custom features and integrated Onshape apps!   Learn How to FeatureScript Here 🔴
  • ilya_baranilya_baran Onshape Employees, Developers, HDM Posts: 1,234

    Delete and recreate the configuration input variable. If the variable name is the same, references and uses won't be broken (note that this is not true for list configuration inputs).

    Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc
  • MannyFMannyF Member Posts: 18 ✭✭
    edited June 6

    Thank you that @ilya_baran and @MichaelPascoe, your workaround worked perfectly. I have to say, as a new Onshape user who recently ditched Fusion 360, Onshape doesn't cease to impress me. Fusion does not allow deleting variables that are being referenced elsewhere, which is why I hadn't tried the obvious: deleting the variable.

    But then I'm confused, if I can delete the Integer variable and recreate it as a Real variable, why wouldn't Onshape just allow "hot-swapping" the variable type?

Sign In or Register to comment.