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.

FS enums in a common shared script

graham_lockgraham_lock Member Posts: 162 PRO
Hi all,

I have an enum which is used to define a UI parameter type, which I also want to use within another script.

If I define the enum outside of the script where it is used to define a parameter type I get an error telling me it must be exported.

Is there a way around this? Do I need to define it in the script where it is used as a parameter type and then import that script into the other scripts rather than use a common file?

Test document here:
https://cad.onshape.com/documents/69bc4ff93f0403841e6c9441/w/c2315c99b371ce207df18903/e/8d32865f14c600cf8061293e

Thank you.

Best Answer

Answers

Sign In or Register to comment.