File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,13 @@ class ImportOptions:
5353 import_names : bool = False
5454 import_planes : bool = False
5555 import_points : bool = False
56+ import_named_selections : bool = False
57+ import_named_selections_keys : str = ""
5658
5759 def to_dict (self ):
5860 """Provide the dictionary representation of the ImportOptions class."""
59- return {k : bool (v ) for k , v in asdict (self ).items ()}
61+ import_options_dict = {k : bool (v ) for k , v in asdict (self ).items () if isinstance (v , bool )}
62+ import_options_definitions_dict = {
63+ k : v for k , v in asdict (self ).items () if isinstance (v , str )
64+ }
65+ return import_options_dict , import_options_definitions_dict
Original file line number Diff line number Diff line change @@ -299,12 +299,13 @@ def _upload_file(
299299
300300 c_stub = CommandsStub (self .client .channel )
301301
302+ import_options_dict , import_options_definitions_dict = import_options .to_dict ()
302303 response = c_stub .UploadFile (
303304 UploadFileRequest (
304305 data = data ,
305306 file_name = file_name ,
306307 open = open_file ,
307- import_options = import_options . to_dict () ,
308+ import_options = import_options_dict ,
308309 )
309310 )
310311 return response .file_path
@@ -361,8 +362,9 @@ def open_file(
361362 self ._upload_file (full_path )
362363 self ._upload_file (file_path , True , import_options )
363364 else :
365+ import_options_dict , import_options_definitions_dict = import_options .to_dict ()
364366 DesignsStub (self .client .channel ).Open (
365- OpenRequest (filepath = file_path , import_options = import_options . to_dict () )
367+ OpenRequest (filepath = file_path , import_options = import_options_dict )
366368 )
367369
368370 return self .read_existing_design ()
You can’t perform that action at this time.
0 commit comments