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]:

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?

The onshape folks are saying:

You are using our python client… which we dont support any longer and was way out of date. I would. suggest just making direct calls using the onshape.py file in the API Keys repo to the endpoint and hand building the body. Export is a pretty well documented endpoint.

Hello! Thanks for bringing this to our attention. I’ll include support for variable studio features and an updated version of the extension will be issued.
Please be aware that extensions are libraries used inside omniverse apps, and are currently shipped with omniverse app releases, and not as downloadable executables.

Once a new package is released I’ll update this thread with instructions to download.

@shuaulme1 Variable studio is now supported in USD Composer 2023.1.1 with onshape importer v0.6.5. For the time being I am importing in USD Composer, saving the USD and then importing the USD into Isaac Sim.

Thanks for replying to this thread - Yes, the variableStudio support was included in the most recent versions of onshape importer. When Isaac sim gets its next release that version will be available for all. In the meanwhile you can either use USD composer as you said, or you can move the onshape importer folder from the Composer folder into Isaac sim.