Onshape importer doesn't support VARIABLESTUDIO element_type

Hi,

it looks like the latest onshape importer does not support this somewhat recent feature, and therefore fails to parse files.

is there a fix coming?

the error looks like this:
2023-05-22 20:17:03 [54,699ms] [Error] [omni.kit.app._impl] [py stderr]: Exception in thread Thread-188:
Traceback (most recent call last):
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\kit\python\lib\threading.py”, line 926, in _bootstrap_inner
self.run()
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\kit\python\lib\threading.py”, line 870, in run
self._target(*self._args, **self._kwargs)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\widgets\documents_widget.py”, line 92, in get_doc_type
self.document_id, self.get_wdid(), self.get_workspace()
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\api\documents_api.py”, line 2583, in call
return self.callable(self, *args, **kwargs)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\api\documents_api.py”, line 1354, in __get_elements_in_document
return self.call_with_http_info(**kwargs)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\api\documents_api.py”, line 2644, in call_with_http_info
collection_formats=params[“collection_format”],
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\api_client.py”, line 358, in call_api
_check_type,
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\api_client.py”, line 190, in __call_api
return_data = self.deserialize(response_data, response_type, _check_type)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\api_client.py”, line 270, in deserialize
received_data, response_type, [“received_data”], True, _check_type, configuration=self.configuration
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 975, in validate_and_convert_types
inner_value, inner_required_types, inner_path, from_server, _check_type, configuration=configuration
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 937, in validate_and_convert_types
input_value, valid_classes, path_to_item, configuration, from_server, key_type=False, must_convert=True
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 880, in attempt_convert_item
raise conversion_exc
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 874, in attempt_convert_item
return deserialize_model(input_value, valid_class, path_to_item, check_type, configuration, from_server)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 748, in deserialize_model
instance = used_model_class(**kw_args)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\models\bt_document_element_info.py”, line 189, in init
setattr(self, var_name, var_value)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 174, in setattr
self.set_attribute(name, value)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 82, in set_attribute
check_allowed_values(self.allowed_values, (name,), value)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 432, in check_allowed_values
% (input_variable_path[0], input_values, these_allowed_values)
omni.isaac.onshape.onshape_client.oas.exceptions.ApiValueError: Invalid value for element_type (VARIABLESTUDIO), must be one of [‘PARTSTUDIO’, ‘ASSEMBLY’, ‘DRAWING’, ‘FEATURESTUDIO’, ‘BLOB’, ‘APPLICATION’, ‘TABLE’, ‘BILLOFMATERIALS’, ‘UNKNOWN’]

Exception in thread Thread-188:
Traceback (most recent call last):
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\kit\python\lib\threading.py”, line 926, in _bootstrap_inner
self.run()
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\kit\python\lib\threading.py”, line 870, in run
self._target(*self._args, **self._kwargs)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\widgets\documents_widget.py”, line 92, in get_doc_type
self.document_id, self.get_wdid(), self.get_workspace()
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\api\documents_api.py”, line 2583, in call
return self.callable(self, *args, **kwargs)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\api\documents_api.py”, line 1354, in __get_elements_in_document
return self.call_with_http_info(**kwargs)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\api\documents_api.py”, line 2644, in call_with_http_info
collection_formats=params[“collection_format”],
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\api_client.py”, line 358, in call_api
_check_type,
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\api_client.py”, line 190, in __call_api
return_data = self.deserialize(response_data, response_type, _check_type)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\api_client.py”, line 270, in deserialize
received_data, response_type, [“received_data”], True, _check_type, configuration=self.configuration
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 975, in validate_and_convert_types
inner_value, inner_required_types, inner_path, from_server, _check_type, configuration=configuration
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 937, in validate_and_convert_types
input_value, valid_classes, path_to_item, configuration, from_server, key_type=False, must_convert=True
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 880, in attempt_convert_item
raise conversion_exc
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 874, in attempt_convert_item
return deserialize_model(input_value, valid_class, path_to_item, check_type, configuration, from_server)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 748, in deserialize_model
instance = used_model_class(**kw_args)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\models\bt_document_element_info.py”, line 189, in init
setattr(self, var_name, var_value)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 174, in setattr
self.set_attribute(name, value)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 82, in set_attribute
check_allowed_values(self.allowed_values, (name,), value)
File “c:\users\shuau\appdata\local\ov\pkg\isaac_sim-2022.2.1\exts\omni.isaac.onshape\omni\isaac\onshape\onshape_client\oas\model_utils.py”, line 432, in check_allowed_values
% (input_variable_path[0], input_values, these_allowed_values)
omni.isaac.onshape.onshape_client.oas.exceptions.ApiValueError: Invalid value for element_type (VARIABLESTUDIO), must be one of [‘PARTSTUDIO’, ‘ASSEMBLY’, ‘DRAWING’, ‘FEATURESTUDIO’, ‘BLOB’, ‘APPLICATION’, ‘TABLE’, ‘BILLOFMATERIALS’, ‘UNKNOWN’]
2023-05-22 20:17:03 [54,700ms] [Error] [omni.kit.app._impl] [py stderr]:

Hi,

Thanks for reaching out.

I’ve looked into the error you’re getting and it looks like the latest Onshape importer doesn’t support the VARIABLESTUDIO element type. This is a relatively new element type that was added to Onshape in 2023.

I’ve checked with the Onshape team and they’re aware of the issue and are working on a fix. They don’t have an ETA for the fix yet, but they’ll let me know as soon as they have more information.

In the meantime, you can use the older version of the Onshape importer. To do this, go to the Onshape website and download the OnshapeImporter-2022.2.1.zip file.

Once you’ve downloaded the file, unzip it and run the OnshapeImporter.exe file.

This will open the Onshape importer and you’ll be able to import your Onshape files.

I hope this helps!

Let me know if you have any other questions.

the link where to look for the importer on the onshape website seems incorrect, and i can’t seem to be able to find.

i tried contacting onshape but they seem very confused by all of it.

can you provide the link to the older importer i should try?