Skip to content

Commit 4ae04d8

Browse files
committedFeb 22, 2024
Merge branch 'developement' of https://github.com/evereux/pycatia into developement
2 parents 8903353 + 8c072a5 commit 4ae04d8

File tree

1 file changed

+30
-10
lines changed

1 file changed

+30
-10
lines changed
 

‎pycatia/in_interfaces/selection.py

+30-10
Original file line numberDiff line numberDiff line change
@@ -599,9 +599,7 @@ def indicate_or_select_element_2d(self,
599599
i_filter_type: tuple,
600600
i_object_selection_before_command_use_possibility: bool,
601601
i_tooltip: bool,
602-
i_triggering_on_mouse_move: bool,
603-
o_object_selected: bool,
604-
o_document_window_location: tuple) -> str:
602+
i_triggering_on_mouse_move: bool) -> str:
605603
"""
606604
.. note::
607605
:class: toggle
@@ -739,13 +737,35 @@ def indicate_or_select_element_2d(self,
739737
:param tuple o_document_window_location:
740738
:rtype: str
741739
"""
742-
return self.selection.IndicateOrSelectElement2D(i_message,
743-
i_filter_type,
744-
i_object_selection_before_command_use_possibility,
745-
i_tooltip,
746-
i_triggering_on_mouse_move,
747-
o_object_selected,
748-
o_document_window_location)
740+
vba_function_name = 'indicate_or_select_element_2d_2'
741+
vba_code = f'''
742+
Public Function {vba_function_name}(selection, i_message, i_filterType, i_object_selection_before_command_use_possibility, i_tooltip, i_triggering_on_mouse_move)
743+
Dim o_object_selected
744+
Dim o_document_window_location (1)
745+
Dim o_output_state (3)
746+
747+
o_output_state (0) = selection.IndicateOrSelectElement2D(i_message, i_filterType, i_object_selection_before_command_use_possibility, i_tooltip, i_triggering_on_mouse_move, o_object_selected, o_document_window_location)
748+
o_output_state (1) = o_object_selected
749+
o_output_state (2) = o_document_window_location
750+
{vba_function_name} = o_output_state
751+
End Function
752+
'''
753+
754+
system_service = self.application.system_service
755+
result = system_service.evaluate(vba_code,
756+
0,
757+
vba_function_name,
758+
[
759+
self.selection,
760+
i_message,
761+
i_filter_type,
762+
i_object_selection_before_command_use_possibility,
763+
i_tooltip,
764+
i_triggering_on_mouse_move
765+
]
766+
)
767+
768+
return result
749769

750770
def indicate_or_select_element_3d(self,
751771
i_planar_geometric_object: AnyObject,

0 commit comments

Comments
 (0)