diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b7f4c87..087d2d22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,122 @@ # Changelog +## 0.8.0 + +* New Classes, methods, properties and enums added. + +### Introduced in V5-6R2021 + +* added the following new classes introduced in V5-6R2021. + * ManufacturingComputePMAParameters + * ManufacturingFeatureFactory + * ManufacturingMachinableAreaMngt + * ManufacturingParameter + * PartServices + +* added the following new methods / properties introduced in V5-6R2021. + * DrawingTable.orientation_reference + * DrawingTable.text_properties + * DrawingText.orientation_reference + +### Introduced in V5-6R2020 + +* added the following new classes introduced in V5-6R2020. + * CompositesServices + * CompositesMaterial + * CDMASettingAtt + * ManufacturingProgram2 + +* added the following new methods / properties introduced in V5-6R2020. + * HybridShapeUnfold.target_direction + * HybridShapeUnfold.target_origin + * StepSettingAtt.att_annotation_export + * StepSettingAtt.get_att_annotation_export_info() + * StepSettingAtt.set_att_annotation_export_lock() + * Wrappings.compute_wrapping_with_convex_hull() + +* added the following enumeration types introduced in V5-6R2020: + * cat_composites_type + +### Introduced in V5-6R2019 + +* added the following new classes introduced in V5-6R2019. + * MedianFeature + * NumericalDisplayFormat + * SemanticGDTCommonZone + * SemanticGDTFrameExtension + * SemanticGDTNxDisplay + * ManufacturingActivityToolPath +* added the following new methods / properties introduced in V5-6R2019. + * DxfSettingAtt.export_view_as_viewport + * DxfSettingAtt.get_export_view_as_viewport_info() + * DxfSettingAtt.set_export_view_as_viewport_lock() + * DxfSettingAtt.set_export_view_as_viewport() + * Ig2SettingAtt.export_view_as_viewport + * Ig2SettingAtt.get_export_view_as_viewport_info() + * Ig2SettingAtt.set_export_view_as_viewport_lock() + * Ig2SettingAtt.set_export_view_as_viewport() + * HybridShapeAssemble.get_healing_mode() + * HybridShapeAssemble.set_healing_mode() + * HybridShapeRevol.begin_angle_offset + * HybridShapeRevol.end_angle_offset + * Annotation.has_a_numerical_display_format() + * Annotation.numerical_display_format + * Annotation2.is_a_consumable_annotation + * AnnotationSet.annotation_set_purpose + * AnnotationSet.apply_result_with_link_when_copy_set_to + * AnnotationSet.read_iso_default_properties + * TPSView.annotation_plane + * TPSView.annotation_sketch + * TPSView.annotations + * TPSView.display_ratio + * TPSView.view_type + * Dimension3D.is_a_continuous_feature_applied() + * SemanticGDT.frame_extensions() + * SemanticGDT.has_a_centered_element() + * SemanticGDT.has_a_frame_extension() + * SemanticGDT.is_applied_on_multiple_entities() + * SemanticGDT.median_feature() + * SemanticGDT.nx_display() + * Application.begin_ur_concatenation() + * Application.stop_ur_concatenation() + +### Introduced in V5-6R2018 + +* added the following new classes introduced in V5-6R2018. + * CoordDim + * DrawingCoordDim + * DrawingCoordDims + * DrawingGDT + * DrawingGDTs + +* added the following new methods / properties introduced in V5-6R2018. + * Annotation2.coordinate_dimension() + * AnnotationFactory2.create_coord_dimension() + * AnnotationFactory2.create_gdt() + * NonSemanticGDT.get_2d_annot() + * Layout2DView.coord_dims + * Layout2DView.gdts + * DrawingLeader.anchor_symbol + * DrawingView.coord_dims + * DrawingView.gdts + * DrawingText.nb_link + * DrawingText.get_parameter_link() + * DrawingArrow.scale_on_extremities() #230 + * VisualizationSettingAtt.pre_sel_navigator_started_by_arrow_keys + * VisualizationSettingAtt.set_pre_sel_navigator_started_by_arrow_keys_lock + * VisualizationSettingAtt.get_pre_sel_navigator_started_by_arrow_keys_info() + * Hole.counter_drilled_mode + * VarRadEdgeFillet.sharp_edge_removal_mode + * VarRadEdgeFillet.switch_to_const_fillet_type() + * ConstRadEdgeFillet.switch_to_var_fillet_type() + * Measurable.get_angle_between_in_context() + * Measurable.get_minimum_distance_in_context() + * Measurable.get_minimum_distance_points_in_context() + * SPAWorkbench.get_measurable_in_context() + +* added the following enumeration types introduced in V5-6R2018: + * cat_cd_hole_mode + ## 0.7.4 * fixed DrawingDimensions.add(). @@ -310,14 +427,19 @@ ProductDocument and DrawingDocument. Example: ```python +from pathlib import Path + from pycatia import catia +from pycatia.mec_mod_interfaces.part_document import PartDocument + +source_document = Path(r'tests/cat_files/part_measurable.CATPart') caa = catia() documents = caa.documents -documents.open(r'tests/cat_files/part_measurable.CATPart') +documents.open(source_document) # get the active document -document = caa.active_document +document: PartDocument = caa.active_document # get the Part() object. NOTE THIS IS NOW A PROPERTY, NOT A METHOD. part = document.part ``` @@ -544,4 +666,4 @@ Breaking changes. * Added ability to parse csv and create points in a CATIA part. * Added methods to open, save, save as and close CATIA files. -* Test coverage now covers \ No newline at end of file +* Test coverage now cover \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 3680a987..a25bfcd2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -36,7 +36,7 @@ def __getattr__(cls, name): author = 'Paul Bourne' # The short X.Y version -version = '0.7.4' +version = '0.8.0' # The full version, including alpha/beta/rc tags release = version diff --git a/pycatia/base_interfaces/pycatia.py b/pycatia/base_interfaces/pycatia.py index 1f116878..78ec1143 100644 --- a/pycatia/base_interfaces/pycatia.py +++ b/pycatia/base_interfaces/pycatia.py @@ -20,5 +20,17 @@ def logger(self) -> logging.Logger: """ return create_logger() + def release_check(self, current: int, required: int, name: str): + """ + + Used to notify user if the CATIA V5 version is lower than that required. + + :param int current: + :param int required: + :param str name: + """ + if current < required: + self.logger.info(f'"{name}" was introduced in R{required}. You are running R{current}.') + def __repr__(self): return 'PyCATIA()' diff --git a/pycatia/caa_composites_interfaces/__init__.py b/pycatia/caa_composites_interfaces/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pycatia/caa_composites_interfaces/composites_material.py b/pycatia/caa_composites_interfaces/composites_material.py new file mode 100644 index 00000000..34529d00 --- /dev/null +++ b/pycatia/caa_composites_interfaces/composites_material.py @@ -0,0 +1,346 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.system_interfaces.any_object import AnyObject + + +class CompositesMaterial(AnyObject): + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | CompositesMaterial + | + | Represents a Composites Material object. + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.composites_material = com_object + + @property + def cured_thickness(self) -> float: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property CuredThickness() As double + | returns or set the cured thicknes defined in Composites tab in mm. + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.composites_material.CuredThickness + + @cured_thickness.setter + def cured_thickness(self, value: float): + """ + :param float value: + """ + + self.composites_material.CuredThickness = value + + @property + def fabric_width(self) -> float: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property FabricWidth() As double + | returns or set the fabric width defined in Composites tab in mm. + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.composites_material.FabricWidth + + @fabric_width.setter + def fabric_width(self, value: float): + """ + :param float value: + """ + + self.composites_material.FabricWidth = value + + @property + def limit_deformation(self) -> float: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property LimitDeformation() As double + | returns or set the limit deformation defined in Composites tab in radian. + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.composites_material.LimitDeformation + + @limit_deformation.setter + def limit_deformation(self, value: float): + """ + :param float value: + """ + + self.composites_material.LimitDeformation = value + + @property + def mass_cost(self) -> float: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property MassCost() As double + | returns or set the cost per mess defined in Composites tab in $ per kg. + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.composites_material.MassCost + + @mass_cost.setter + def mass_cost(self, value: float): + """ + :param float value: + """ + + self.composites_material.MassCost = value + + @property + def material_type(self) -> int: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property MaterialType() As short + | returns or set the material type defined in Composites tab. the input or + | output value is the following: 1 for Undefiened 2 for Unidirectional 3 for Bi + | Directional 4 for NCF (Non Crimp Fabric) 5 for Non Structural + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.composites_material.MaterialType + + @material_type.setter + def material_type(self, value: int): + """ + :param int value: + """ + + self.composites_material.MaterialType = value + + @property + def max_deformation(self) -> float: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property MaxDeformation() As double + | returns or set the maximum deformation defined in Composites tab in radian. + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.composites_material.MaxDeformation + + @max_deformation.setter + def max_deformation(self, value: float): + """ + :param float value: + """ + + self.composites_material.MaxDeformation = value + + @property + def surfacic_weigth(self) -> float: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property SurfacicWeigth() As double + | returns or set the surfacic weigth defined in Composites tab in kg per m2. + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.composites_material.SurfacicWeigth + + @surfacic_weigth.setter + def surfacic_weigth(self, value: float): + """ + :param float value: + """ + + self.composites_material.SurfacicWeigth = value + + @property + def uncured_thickness(self) -> float: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property UncuredThickness() As double + | returns or set the uncured thicknes defined in Composites tab in mm. + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.composites_material.UncuredThickness + + @uncured_thickness.setter + def uncured_thickness(self, value: float): + """ + :param float value: + """ + + self.composites_material.UncuredThickness = value + + def create_composites_data(self) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub CreateCompositesData() + | Create a default composites properties on the current material. + + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.composites_material.CreateCompositesData() + + def exist_composites_data(self) -> int: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func ExistCompositesData() As short + | Returns true if a composites properties exists on the current material. + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.composites_material.ExistCompositesData() + + def __repr__(self): + return f'CompositesMaterial(name="{self.name}")' diff --git a/pycatia/caa_composites_interfaces/composites_services.py b/pycatia/caa_composites_interfaces/composites_services.py new file mode 100644 index 00000000..071e5b4d --- /dev/null +++ b/pycatia/caa_composites_interfaces/composites_services.py @@ -0,0 +1,128 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.system_interfaces.any_object import AnyObject +from pycatia.types.general import cat_variant + + +class CompositesServices(AnyObject): + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | CompositesServices + | + | Represents CATIACompositesServices that allow to query composites + | entity. + | Role: On any object recovers is it his a composites object or not and provides + | its type if yes. + | + | Example: + | This VBScript example illustrates how to GetCompositesType if any , on + | objects in CATIA Part. + | + | + | VBScript example to identify composites object type + | + | Sub CATMain() + | Const UNKNOWN = 0 + | Const STACKING = 1 + | Const PLYGROUP = 2 + | Const SEQUENCE = 3 + | Const CUTPIECEGROUP = 4 + | Const PLY = 5 + | Const CORE = 6 + | Const CUTPIECE = 7 + | ' Part + | Set myPart = CATIA.ActiveDocument.Part + | + | ' Get Service Object by querying on part - extension of CATIA Base + | + | Set myCompServObj = myPart.GetItem("CATCompositesServices") + | + | ' Hybrid Bodies + | Set myHBodies = myPart.HybridBodies + | + | ' Get Part Hybrid Bodies Count + | HBCount = myHBodies.Count + | + | StckCnt = 0 + | For N = 1 To PartHBCount + | ' Iterate through all Hybrid Bodies in Part one by one and retrieve + | its type + | Set myObject = myHBodies.Item(N) + | myCompServObj.GetCompositesType myObject, myType + | If myType = STACKING Then + | ' ==> Stacking Composites feature type is recovered among + | hybridshapes under part + | ObjCompositesStacking = myObject + | ' .... + | Exit For + | End if + | Next + | Mggbox "Stacking="& ObjCompositesStacking.Name + | End Sub + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.composites_services = com_object + + def get_composites_type(self, i_object: cat_variant, i_composites_type: int) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub GetCompositesType(CATVariant iObject,CATCompositesTypeEnum + | oCompositesType) + | Retrieves "Composites Type" of an 3D object. + | + | Parameters: + | + | iObject + | Object whose type is to be retrieved. + | oCompositesType + | Composites Type of input object. + | + | See also: + | CATCompositesTypeEnum + + :param cat_variant i_object: + :param int i_composites_type: see enumeration type cat_composites_type + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.composites_services.GetCompositesType(i_object.com_object, i_composites_type) + + def __repr__(self): + return f'CompositesServices(name="{self.name}")' diff --git a/pycatia/cat_dde_settings_interfaces/dxf_setting_att.py b/pycatia/cat_dde_settings_interfaces/dxf_setting_att.py index 8a3c0710..91f77884 100644 --- a/pycatia/cat_dde_settings_interfaces/dxf_setting_att.py +++ b/pycatia/cat_dde_settings_interfaces/dxf_setting_att.py @@ -8,6 +8,7 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.system_interfaces.setting_controller import SettingController @@ -215,6 +216,44 @@ def export_version(self) -> int: return self.dxf_setting_att.ExportVersion + @property + def export_view_as_viewport(self) -> bool: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property ExportViewAsViewport() As boolean (Read Only) + | Get the value of the Export Views as Viewports option. That value is only + | taken into account when the export mode is set to + | Semantic. + | + | Parameters: + | + | oViewsAsViewports + | Legal values: + | TRUE : Export Views as Viewports enable. + | FALSE : Export Views as Viewports disable. + | + | Returns: + | Legal values: + | S_OK : on Success + | E_FAIL: on failure + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.dxf_setting_att.ExportViewAsViewport + @property def export_views_as_viewports(self) -> bool: """ @@ -754,6 +793,53 @@ def get_export_version_info(self, io_admin_level: str, io_locked: str) -> bool: """ return self.dxf_setting_att.GetExportVersionInfo(io_admin_level, io_locked) + def get_export_view_as_viewport_info(self, io_admin_level: str, io_locked: str) -> bool: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetExportViewAsViewportInfo(CATBSTR ioAdminLevel,CATBSTR ioLocked) As + | boolean + | Retrieves environment informations for the Export Views as Viewports + | option. + | + | Parameters: + | + | ioAdminLevel + | + | If the option is locked, AdminLevel gives the administration level + | that imposes the value of the option. + | If the option is not locked, AdminLevel gives the administration + | level that will give the value of the option after a reset. + | + | ioLocked + | Indicates if the option has been locked. + | oModified + | Indicates if the option has been explicitly modified or remain to + | the administrated value. + | + | Returns: + | Legal values: + | S_OK : on Success + | E_FAIL: on failure + + :param str io_admin_level: + :param str io_locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.dxf_setting_att.GetExportViewAsViewportInfo(io_admin_level, io_locked) + def get_export_views_as_viewports_info(self, io_admin_level: str, io_locked: str) -> bool: """ .. note:: @@ -1443,6 +1529,45 @@ def set_export_version_lock(self, i_locked: bool) -> None: # # system_service = SystemService(self.application.SystemService) # # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object]) + def set_export_view_as_viewport_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetExportViewAsViewportLock(boolean iLocked) + | Locks or unlocks the Export Views as Viewports option if the operation is + | allowed in the current administrated environment. In user mode this method will + | always return E_FAIL. + | + | Parameters: + | + | iLocked + | the locking operation to be performed Legal + | values: + | TRUE: to lock the option. + | FALSE: to unlock the option. + | + | Returns: + | Legal values: + | S_OK : on Success + | E_FAIL: on failure + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.dxf_setting_att.SetExportViewAsViewportLock(i_locked) + def set_export_views_as_viewports_lock(self, i_locked: bool) -> None: """ .. note:: @@ -2131,6 +2256,44 @@ def set_export_version(self, i_version: int) -> None: """ return self.dxf_setting_att.set_ExportVersion(i_version) + def set_export_view_as_viewport(self, i_views_as_viewports: bool) -> None: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub set_ExportViewAsViewport(boolean iViewsAsViewports) + | Set the value of the Export Views as Viewports option. That value is only + | taken into account when the export mode is set to + | Semantic. + | + | Parameters: + | + | iViewsAsViewports + | Legal values: + | TRUE : Enable the export of views as Viewports. + | FALSE : Disable the export of views as Viewports. + | + | Returns: + | Legal values: + | S_OK : on Success + | E_FAIL: on failure + + :param bool i_views_as_viewports: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.dxf_setting_att.set_ExportViewAsViewport(i_views_as_viewports) + def set_export_views_as_viewports(self, i_views_as_viewports: bool) -> None: """ .. note:: diff --git a/pycatia/cat_dde_settings_interfaces/ig2_setting_att.py b/pycatia/cat_dde_settings_interfaces/ig2_setting_att.py index 887a6383..efaf05f4 100644 --- a/pycatia/cat_dde_settings_interfaces/ig2_setting_att.py +++ b/pycatia/cat_dde_settings_interfaces/ig2_setting_att.py @@ -8,6 +8,7 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.system_interfaces.setting_controller import SettingController @@ -95,6 +96,44 @@ def export_sheets(self) -> int: return self.ig2_setting_att.ExportSheets + @property + def export_view_as_viewport(self) -> bool: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property ExportViewAsViewport() As boolean (Read Only) + | Get the value of the Export Views as Viewports option. That value is only + | taken into account when the export mode is set to + | Semantic. + | + | Parameters: + | + | oViewsAsViewports + | Legal values: + | TRUE : Export Views as Viewports enable. + | FALSE : Export Views as Viewports disable. + | + | Returns: + | Legal values: + | S_OK : on Success + | E_FAIL: on failure + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.ig2_setting_att.ExportViewAsViewport + @property def import_destination_view(self) -> int: """ @@ -314,6 +353,53 @@ def get_export_sheets_info(self, io_admin_level: str, io_locked: str) -> bool: """ return self.ig2_setting_att.GetExportSheetsInfo(io_admin_level, io_locked) + def get_export_view_as_viewport_info(self, io_admin_level: str, io_locked: str) -> bool: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetExportViewAsViewportInfo(CATBSTR ioAdminLevel,CATBSTR ioLocked) As + | boolean + | Retrieves environment informations for the Export Views as Viewports + | option. + | + | Parameters: + | + | ioAdminLevel + | + | If the option is locked, AdminLevel gives the administration level + | that imposes the value of the option. + | If the option is not locked, AdminLevel gives the administration + | level that will give the value of the option after a reset. + | + | ioLocked + | Indicates if the option has been locked. + | oModified + | Indicates if the option has been explicitly modified or remain to + | the administrated value. + | + | Returns: + | Legal values: + | S_OK : on Success + | E_FAIL: on failure + + :param str io_admin_level: + :param str io_locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.ig2_setting_att.GetExportViewAsViewportInfo(io_admin_level, io_locked) + def get_import_destination_view_info(self, io_admin_level: str, io_locked: str) -> bool: """ .. note:: @@ -594,6 +680,45 @@ def set_export_sheets_lock(self, i_locked: bool) -> None: # # system_service = SystemService(self.application.SystemService) # # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object]) + def set_export_view_as_viewport_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetExportViewAsViewportLock(boolean iLocked) + | Locks or unlocks the Export Views as Viewports option if the operation is + | allowed in the current administrated environment. In user mode this method will + | always return E_FAIL. + | + | Parameters: + | + | iLocked + | the locking operation to be performed Legal + | values: + | TRUE: to lock the option. + | FALSE: to unlock the option. + | + | Returns: + | Legal values: + | S_OK : on Success + | E_FAIL: on failure + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.ig2_setting_att.SetExportViewAsViewportLock(i_locked) + def set_import_destination_view_lock(self, i_locked: bool) -> None: """ .. note:: @@ -871,6 +996,44 @@ def set_export_sheets(self, i_sheets: int) -> None: """ return self.ig2_setting_att.set_ExportSheets(i_sheets) + def set_export_view_as_viewport(self, i_views_as_viewports: bool) -> None: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub set_ExportViewAsViewport(boolean iViewsAsViewports) + | Set the value of the Export Views as Viewports option. That value is only + | taken into account when the export mode is set to + | Semantic. + | + | Parameters: + | + | iViewsAsViewports + | Legal values: + | TRUE : Enable the export of views as Viewports. + | FALSE : Disable the export of views as Viewports. + | + | Returns: + | Legal values: + | S_OK : on Success + | E_FAIL: on failure + + :param bool i_views_as_viewports: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.ig2_setting_att.set_ExportViewAsViewport(i_views_as_viewports) + def set_import_destination_view(self, i_destination_view: int) -> None: """ .. note:: diff --git a/pycatia/cat_sde_setting_interfaces/step_setting_att.py b/pycatia/cat_sde_setting_interfaces/step_setting_att.py index 5d0ed803..b44d468f 100644 --- a/pycatia/cat_sde_setting_interfaces/step_setting_att.py +++ b/pycatia/cat_sde_setting_interfaces/step_setting_att.py @@ -8,6 +8,7 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.system_interfaces.setting_controller import SettingController @@ -165,6 +166,40 @@ def att_annotation(self, value: int): self.step_setting_att.AttAnnotation = value + @property + def att_annotation_export(self) -> int: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property AttAnnotationExport() As short + | Returns or sets the AttAnnotationExport parameter. + | + | Ensure consistency with the C++ interface to which the work is delegated. + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.step_setting_att.AttAnnotationExport + + @att_annotation_export.setter + def att_annotation_export(self, value: int): + """ + :param int value: + """ + + self.step_setting_att.AttAnnotationExport = value + @property def att_composites(self) -> int: """ @@ -959,6 +994,51 @@ def get_att_angle_def_fiting_info(self, io_admin_level: str, io_locked: str) -> """ return self.step_setting_att.GetAttAngleDefFitingInfo(io_admin_level, io_locked) + def get_att_annotation_export_info(self, io_admin_level: str, io_locked: str) -> bool: + """ + .. note:: + + Introduced in V5-6R2020. + + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetAttAnnotationExportInfo(CATBSTR ioAdminLevel,CATBSTR ioLocked) As + | boolean + | Retrieves environment informations for the AttAnnotationExport + | parameter. + | Role:Retrieves the state of the AttAnnotationExport parameter in the + | current environment. + | + | Parameters: + | + | ioAdminLevel + | + | If the parameter is locked, AdminLevel gives the administration + | level that imposes the value of the parameter. + | If the parameter is not locked, AdminLevel gives the administration + | level that will give the value of the parameter after a reset. + | + | ioLocked + | Indicates if the parameter has been locked. + | + | Returns: + | Indicates if the parameter has been explicitly modified or remain to + | the administrated value. + + :param str io_admin_level: + :param str io_locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.step_setting_att.GetAttAnnotationExportInfo(io_admin_level, io_locked) + def get_att_annotation_info(self, io_admin_level: str, io_locked: str) -> bool: """ .. note:: @@ -2059,6 +2139,41 @@ def set_att_angle_def_fiting_lock(self, i_locked: bool) -> None: # # system_service = SystemService(self.application.SystemService) # # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object]) + def set_att_annotation_export_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetAttAnnotationExportLock(boolean iLocked) + | Locks or unlocks the AttAnnotationExport parameter. + | Role:Locks or unlocks the AttAnnotationExport parameter if it is possible + | in the current administrative context. In user mode this method will always + | return E_FAIL. + | + | Parameters: + | + | iLocked + | the locking operation to be performed Legal + | values: + | TRUE : to lock the parameter. + | FALSE: to unlock the parameter. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.step_setting_att.SetAttAnnotationExportLock(i_locked) + def set_att_annotation_lock(self, i_locked: bool) -> None: """ .. note:: diff --git a/pycatia/cat_tps_interfaces/annotation.py b/pycatia/cat_tps_interfaces/annotation.py index 2206b9ff..d9975374 100644 --- a/pycatia/cat_tps_interfaces/annotation.py +++ b/pycatia/cat_tps_interfaces/annotation.py @@ -8,7 +8,10 @@ and thus help debugging in pycatia. """ +import inspect +from typing import TYPE_CHECKING +from pycatia.cat_tps_interfaces.numerical_display_format import NumericalDisplayFormat from pycatia.system_interfaces.any_object import AnyObject from pycatia.cat_tps_interfaces.associated_ref_frame import AssociatedRefFrame from pycatia.cat_tps_interfaces.composite_tolerance import CompositeTolerance @@ -34,7 +37,9 @@ from pycatia.cat_tps_interfaces.tolerance_per_unit_basis_restrictive_value import TolerancePerUnitBasisRestrictiveValue from pycatia.cat_tps_interfaces.tolerance_unit_basis_value import ToleranceUnitBasisValue from pycatia.cat_tps_interfaces.tolerance_zone import ToleranceZone -from pycatia.cat_tps_interfaces.tps_view import TPSView + +if TYPE_CHECKING: + from pycatia.cat_tps_interfaces.tps_view import TPSView class Annotation(AnyObject): @@ -120,7 +125,48 @@ def type(self) -> str: | Parameters: | | oType - | The Type. List of types available ordered by SuperType: SuperType = "FTA_NonSemantic" Type = "FTA_Text" Type = "FTA_FlagNote" Type = "FTA_Roughness" Type = "FTA_Weld" Type = "FTA_Noa" Type = "FTA_NonSemanticDatum" Type = "FTA_NonSemanticTarget" Type = "FTA_NonSemanticGDT" Type = "FTA_NonSemanticDimension" SuperType = "FTA_Form" Type = "FTA_Flatness" Type = "FTA_Straightness" Type = "FTA_Circularity" Type = "FTA_Cylindricity" Type = "FTA_ProfileOfAnyLine" Type = "FTA_ProfileOfASurface" Type = "FTA_PatternTruePos" SuperType = "FTA_Dimension" Type = "FTA_LinearDimension" Type = "FTA_AngularDimension" Type = "FTA_SecondLinearDimension" Type = "FTA_ChamferDimension" Type = "FTA_BasicDimension" SuperType = "FTA_Position" Type = "FTA_TruePosition" Type = "FTA_Concentricity" Type = "FTA_Symmetry" Type = "FTA_PositionOfAnyLine" Type = "FTA_PositionOfASurface" SuperType = "FTA_Datum" Type = "FTA_DatumSimple" Type = "FTA_DatumTarget" Type = "FTA_DatumSystem" Type = "FTA_ReferenceFrame" SuperType = "FTA_Orientation" Type = "FTA_Parallelism" Type = "FTA_Perpendicularity" Type = "FTA_Angularity" SuperType = "FTA_RunOut" Type = "FTA_TotalRunOut" Type = "FTA_CircularRunOut" + | The Type. List of types available ordered by SuperType: + | SuperType = "FTA_NonSemantic" + | Type = "FTA_Text" + | Type = "FTA_FlagNote" + | Type = "FTA_Roughness" + | Type = "FTA_Weld" Type = "FTA_Noa" + | Type = "FTA_NonSemanticDatum" + | Type = "FTA_NonSemanticTarget" + | Type = "FTA_NonSemanticGDT" + | Type = "FTA_NonSemanticDimension" + | SuperType = "FTA_Form" + | Type = "FTA_Flatness" + | Type = "FTA_Straightness" + | Type = "FTA_Circularity" + | Type = "FTA_Cylindricity" + | Type = "FTA_ProfileOfAnyLine" + | Type = "FTA_ProfileOfASurface" + | Type = "FTA_PatternTruePos" + | SuperType = "FTA_Dimension" + | Type = "FTA_LinearDimension" + | Type = "FTA_AngularDimension" + | Type = "FTA_SecondLinearDimension" + | Type = "FTA_ChamferDimension" + | Type = "FTA_BasicDimension" + | SuperType = "FTA_Position" + | Type = "FTA_TruePosition" + | Type = "FTA_Concentricity" + | Type = "FTA_Symmetry" + | Type = "FTA_PositionOfAnyLine" + | Type = "FTA_PositionOfASurface" + | SuperType = "FTA_Datum" + | Type = "FTA_DatumSimple" + | Type = "FTA_DatumTarget" + | Type = "FTA_DatumSystem" + | Type = "FTA_ReferenceFrame" + | SuperType = "FTA_Orientation" + | Type = "FTA_Parallelism" + | Type = "FTA_Perpendicularity" + | Type = "FTA_Angularity" + | SuperType = "FTA_RunOut" + | Type = "FTA_TotalRunOut" + | Type = "FTA_CircularRunOut" :rtype: str """ @@ -480,6 +526,29 @@ def has_a_material_condition(self) -> bool: """ return self.annotation.HasAMaterialCondition() + def has_a_numerical_display_format(self) -> bool: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func HasANumericalDisplayFormat() As boolean + | Checks if the Annotation has a Numerical Display Format. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.annotation.HasANumericalDisplayFormat() + def has_a_particular_tol_elem(self) -> bool: """ .. note:: @@ -706,6 +775,29 @@ def noa(self) -> Noa: return Noa(self.annotation.Noa()) + def numerical_display_format(self) -> NumericalDisplayFormat: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func NumericalDisplayFormat() As NumericalDisplayFormat + | Gets the annotation on the NumericalDisplayFormat interface. + + :rtype: NumericalDisplayFormat + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return NumericalDisplayFormat(self.annotation.NumericalDisplayFormat()) + def particular_tol_elem(self) -> ParticularTolElem: """ .. note:: @@ -884,7 +976,7 @@ def tolerance_zone(self) -> ToleranceZone: return ToleranceZone(self.annotation.ToleranceZone()) - def transfert_to_view(self, i_view: TPSView) -> None: + def transfert_to_view(self, i_view: 'TPSView') -> None: """ .. note:: :class: toggle diff --git a/pycatia/cat_tps_interfaces/annotation_2.py b/pycatia/cat_tps_interfaces/annotation_2.py index d71ff1dc..df4cc0ac 100644 --- a/pycatia/cat_tps_interfaces/annotation_2.py +++ b/pycatia/cat_tps_interfaces/annotation_2.py @@ -9,8 +9,10 @@ """ +import inspect from typing import TYPE_CHECKING +from pycatia.cat_tps_interfaces.coord_dim import CoordDim from pycatia.system_interfaces.any_object import AnyObject from pycatia.cat_tps_interfaces.datum_simple import DatumSimple from pycatia.cat_tps_interfaces.datum_target import DatumTarget @@ -166,6 +168,28 @@ def add_leader(self) -> None: """ return self.annotation_2.AddLeader() + def coordinate_dimension(self) -> CoordDim: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func Coordinatedimension() As CoordDim + | Retrieves the FTA co coordinate dimension. + + :rtype: CoordDim + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + return CoordDim(self.annotation_2.Coordinatedimension()) + def datum_simple(self) -> DatumSimple: """ .. note:: @@ -309,6 +333,29 @@ def has_a_visualization_dimension(self) -> bool: """ return self.annotation_2.HasAVisualizationDimension() + def is_a_consumable_annotation(self) -> bool: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func IsAConsumableAnnotation() As boolean + | Checks if the Annotation is a Consumable Annotation. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.annotation_2.IsAConsumableAnnotation() + def is_a_default_annotation(self) -> bool: """ .. note:: diff --git a/pycatia/cat_tps_interfaces/annotation_factory_2.py b/pycatia/cat_tps_interfaces/annotation_factory_2.py index fc7871a0..da697e0d 100644 --- a/pycatia/cat_tps_interfaces/annotation_factory_2.py +++ b/pycatia/cat_tps_interfaces/annotation_factory_2.py @@ -8,6 +8,7 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.mec_mod_interfaces.factory import Factory from pycatia.cat_tps_interfaces.annotation_2 import Annotation2 @@ -41,6 +42,37 @@ def __init__(self, com_object): super().__init__(com_object) self.annotation_factory_2 = com_object + def create_coord_dimension(self, i_surf: UserSurface) -> Annotation2: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func CreateCoordDimension(UserSurface iSurf) As Annotation2 + | Create a Coordinate Dimension + | + | Parameters: + | + | iSurf + | The user surface on which you apply the new Coordinate Dimension. + | + | oCoorddimension + | The new created Coordinate dimension Feature. + + :param UserSurface i_surf: + :rtype: Annotation2 + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + return Annotation2(self.annotation_factory_2.CreateCoordDimension(i_surf.com_object)) + def create_datum(self, i_surf: UserSurface) -> Annotation2: """ .. note:: @@ -106,8 +138,13 @@ def create_datum_target(self, i_surf: UserSurface, i_datum: Annotation2) -> Anno """ return Annotation2(self.annotation_factory_2.CreateDatumTarget(i_surf.com_object, i_datum.com_object)) - def create_ditto_noa(self, i_surf: UserSurface, i_noa_type: str, i_ditto: DrawingComponent, - i_stick_to_geometry_option: bool) -> Annotation2: + def create_ditto_noa( + self, + i_surf: UserSurface, + i_noa_type: str, + i_ditto: DrawingComponent, + i_stick_to_geometry_option: bool + ) -> Annotation2: """ .. note:: :class: toggle @@ -147,11 +184,23 @@ def create_ditto_noa(self, i_surf: UserSurface, i_noa_type: str, i_ditto: Drawin :param bool i_stick_to_geometry_option: :rtype: Annotation2 """ - return Annotation2(self.annotation_factory_2.CreateDittoNOA(i_surf.com_object, i_noa_type, i_ditto.com_object, - i_stick_to_geometry_option)) - - def create_evaluate_datum(self, i_surf: 'UserSurface', i_x: float, i_y: float, i_z: float, - i_with_leader: bool) -> Annotation2: + return Annotation2( + self.annotation_factory_2.CreateDittoNOA( + i_surf.com_object, + i_noa_type, + i_ditto.com_object, + i_stick_to_geometry_option + ) + ) + + def create_evaluate_datum( + self, + i_surf: 'UserSurface', + i_x: float, + i_y: float, + i_z: float, + i_with_leader: bool + ) -> Annotation2: """ .. note:: :class: toggle @@ -194,10 +243,23 @@ def create_evaluate_datum(self, i_surf: 'UserSurface', i_x: float, i_y: float, i :rtype: Annotation2 """ return Annotation2( - self.annotation_factory_2.CreateEvoluateDatum(i_surf.com_object, i_x, i_y, i_z, i_with_leader)) - - def create_evaluate_text(self, i_surf: 'UserSurface', i_x: float, i_y: float, i_z: float, - i_with_leader: bool) -> Annotation2: + self.annotation_factory_2.CreateEvoluateDatum( + i_surf.com_object, + i_x, + i_y, + i_z, + i_with_leader + ) + ) + + def create_evaluate_text( + self, + i_surf: 'UserSurface', + i_x: float, + i_y: float, + i_z: float, + i_with_leader: bool + ) -> Annotation2: """ .. note:: :class: toggle @@ -239,7 +301,14 @@ def create_evaluate_text(self, i_surf: 'UserSurface', i_x: float, i_y: float, i_ :rtype: Annotation2 """ return Annotation2( - self.annotation_factory_2.CreateEvoluateText(i_surf.com_object, i_x, i_y, i_z, i_with_leader)) + self.annotation_factory_2.CreateEvoluateText( + i_surf.com_object, + i_x, + i_y, + i_z, + i_with_leader + ) + ) def create_flag_note(self, i_surf: 'UserSurface') -> Annotation2: """ @@ -261,10 +330,48 @@ def create_flag_note(self, i_surf: 'UserSurface') -> Annotation2: :param UserSurface i_surf: :rtype: Annotation2 """ - return Annotation2(self.annotation_factory_2.CreateFlagNote(i_surf.com_object)) + return Annotation2( + self.annotation_factory_2.CreateFlagNote( + i_surf.com_object + ) + ) - def create_non_semantic_dimension(self, i_surf: 'UserSurface', i_type: cat_variant, - i_sub_type: cat_variant) -> Annotation2: + def create_gdt(self, i_surf: UserSurface) -> Annotation2: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func CreateGDT(UserSurface iSurf) As Annotation2 + | Create a GDT + | + | Parameters: + | + | iSurf + | The user surface on which you apply the new GDT. + | oGDT + | The new created GDT Feature. + + :param UserSurface i_surf: + :rtype: Annotation2 + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + return Annotation2(self.annotation_factory_2.CreateGDT(i_surf.com_object)) + + def create_non_semantic_dimension( + self, + i_surf: 'UserSurface', + i_type: cat_variant, + i_sub_type: cat_variant + ) -> Annotation2: """ .. note:: :class: toggle @@ -292,10 +399,13 @@ def create_non_semantic_dimension(self, i_surf: 'UserSurface', i_type: cat_varia :param cat_variant i_sub_type: :rtype: Annotation2 """ - return Annotation2(self.annotation_factory_2.CreateNonSemanticDimension( - i_surf.com_object, - i_type, - i_sub_type)) + return Annotation2( + self.annotation_factory_2.CreateNonSemanticDimension( + i_surf.com_object, + i_type, + i_sub_type + ) + ) def create_roughness(self, i_surf: UserSurface) -> Annotation2: """ @@ -319,8 +429,12 @@ def create_roughness(self, i_surf: UserSurface) -> Annotation2: """ return Annotation2(self.annotation_factory_2.CreateRoughness(i_surf.com_object)) - def create_semantic_dimension(self, i_surf: UserSurface, i_type: cat_variant, - i_sub_type: cat_variant) -> Annotation2: + def create_semantic_dimension( + self, + i_surf: UserSurface, + i_type: cat_variant, + i_sub_type: cat_variant + ) -> Annotation2: """ .. note:: :class: toggle @@ -342,8 +456,13 @@ def create_semantic_dimension(self, i_surf: UserSurface, i_type: cat_variant, :param cat_variant i_sub_type: :rtype: Annotation2 """ - return Annotation2(self.annotation_factory_2.CreateSemanticDimension(i_surf.com_object, i_type, - i_sub_type)) + return Annotation2( + self.annotation_factory_2.CreateSemanticDimension( + i_surf.com_object, + i_type, + i_sub_type + ) + ) def create_text(self, i_surf: UserSurface) -> Annotation2: """ @@ -462,7 +581,12 @@ def create_tolerance_with_drf(self, i_index: cat_variant, i_surf: UserSurface, i :rtype: Annotation2 """ return Annotation2( - self.annotation_factory_2.CreateToleranceWithDRF(i_index, i_surf.com_object, i_drf.com_object)) + self.annotation_factory_2.CreateToleranceWithDRF( + i_index, + i_surf.com_object, + i_drf.com_object + ) + ) def create_tolerance_without_drf(self, i_index: cat_variant, i_surf: UserSurface) -> Annotation2: """ diff --git a/pycatia/cat_tps_interfaces/annotation_set.py b/pycatia/cat_tps_interfaces/annotation_set.py index 50412a3e..c902e3d4 100644 --- a/pycatia/cat_tps_interfaces/annotation_set.py +++ b/pycatia/cat_tps_interfaces/annotation_set.py @@ -8,7 +8,7 @@ and thus help debugging in pycatia. """ - +import inspect from typing import TYPE_CHECKING from pycatia.system_interfaces.any_object import AnyObject @@ -141,6 +141,40 @@ def annotation_factory_2(self) -> AnnotationFactory2: """ return AnnotationFactory2(self.annotation_set.AnnotationFactory2) + @property + def annotation_set_purpose(self) -> str: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property AnnotationSetPupose() As CATBSTR (Read Only) + | Gets the annotation Set specifications purpose. + | Any existing set is implicitly an Engineering Annotation + | Set. + | + | Parameters: + | + | oAnnotationSetSpecification + | Value indicating purpose of the Annotation Set. + | List of legal values: + | oAnnotationSetSpecification = "FTA_EngineeringSet", + | oAnnotationSetSpecification = "FTA_ManufacturingSet". + + :rtype: str + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.annotation_set.AnnotationSetPupose + @property def annotation_set_type(self) -> int: """ @@ -341,6 +375,54 @@ def tps_views(self) -> TPSViews: return TPSViews(self.annotation_set.TPSViews) + def apply_result_with_link_when_copy_set_to(self) -> None: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub ApplyResultWithLinkWhenCopySetTo() + | Register for next call to either GlobalCopySetTo and like + | methods. + | + | See also: + | CATIAAnnotationSet#GlobalCopySetTo or CATIAAnnotationSet, this option + | is reset at the end of import. When activated, the annotations are copied as + | result with link annotations. + | Example: + | + | This example illustrates activation of the 'as result with link' + | option for the next import (GlobalCopySetTo) run. + | + | Dim myPart As Part + | Set myPart = CATIA.ActiveEditor.ActiveObject + | Dim mySelection As Selection + | Set mySelection = CATIA.ActiveEditor.Selection + | Dim SelectionFilter(0) + | SelectionFilter(0)="AnnotationSet" + | Dim Status As String + | Status = mySelection.SelectElement2(SelectionFilter, "Select an Annotation Set to copy: ", False) + | Dim SelectedEntity As SelectedElement + | Set SelectedEntity = mySelection.Item( 1 ) + | Dim SetToReplicate As AnnotationSet + | Set SetToReplicate = SelectedEntity.Value + | SetToReplicate.ApplyResultWithLinkWhenCopySetTo + | SetToReplicate.GlobalCopySetTo(myPart) + + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.annotation_set.ApplyResultWithLinkWhenCopySetTo() + def apply_view_re_use_when_copy_set_to(self) -> None: """ .. note:: @@ -424,5 +506,51 @@ def global_copy_set_to_with_transformation(self, i_destination_part: 'Part', i_t """ return self.annotation_set.GlobalCopySetToWithTransformation(i_destination_part.com_object, i_transfo) + def read_iso_default_properties(self, o_iso_defaults: tuple) -> int: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func ReadISODefaultProperties(CATSafeArrayVariant oISODefaults) As + | long + | Retrieves the ISO 14405 and ISO 1101 default specifications. This method is + | not relevant in case of ASME Standard. + | + | Parameters: + | + | oISODefaults + | Array of ISO default defined onto the annotation set. Composition + | of the array may looks like the following schema + | [ Linear size ISO 14405 property + | Angular size ISO 14405 property + | Default specification elements for form association + | property + | Default specification elements for toleranced feature filtering + | property ] + | When oCount is not null, minimal size of oISODefaults "vector" of + | string is 3 (the 3 first strings are always existing); depending on GDT + | toleranced feature filtering options activated on the annotation set, oCount + | may reach the limit of 7 (4 more texts). + | oCount + | Number of lines in returned array of strings. When this procedure + | is not applicable (either due to wrong Standard, old annotation set), oCount + | equals 0. + + :param tuple o_iso_defaults: + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.annotation_set.ReadISODefaultProperties(o_iso_defaults) + def __repr__(self): return f'AnnotationSet(name="{self.name}")' diff --git a/pycatia/cat_tps_interfaces/coord_dim.py b/pycatia/cat_tps_interfaces/coord_dim.py new file mode 100644 index 00000000..a735659f --- /dev/null +++ b/pycatia/cat_tps_interfaces/coord_dim.py @@ -0,0 +1,64 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.drafting_interfaces.drawing_coord_dim import DrawingCoordDim +from pycatia.system_interfaces.any_object import AnyObject + + +class CoordDim(AnyObject): + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | CoordDim + + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.coord_dim = com_object + + def get_2d_annot(self) -> DrawingCoordDim: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func Get2dAnnot() As DrawingCoordDim + | Retrieves Drafting Coordinate dimension. + + :rtype: DrawingCoordDim + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + return DrawingCoordDim(self.coord_dim.Get2dAnnot()) + + def __repr__(self): + return f'CoordDim(name="{self.name}")' diff --git a/pycatia/cat_tps_interfaces/dimension_3d.py b/pycatia/cat_tps_interfaces/dimension_3d.py index 49bebd90..bc0ef680 100644 --- a/pycatia/cat_tps_interfaces/dimension_3d.py +++ b/pycatia/cat_tps_interfaces/dimension_3d.py @@ -8,6 +8,7 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.drafting_interfaces.drawing_dimension import DrawingDimension from pycatia.system_interfaces.any_object import AnyObject @@ -199,6 +200,39 @@ def has_dimension_limit(self) -> bool: """ return self.dimension_3d.HasDimensionLimit() + def is_a_continuous_feature_applied(self) -> bool: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func IsAContinuousFeatureApplied() As boolean + | Checks if the Semantic Dimension is a applied on a Continuous Feature. CF + | suffix size modifier is only valid for ASME Standard. + | + | Parameters: + | + | oIsACFDim + | + | TRUE: The dimension is a applied onto a Continuous + | Feature + | FALSE: The dimension is not applied onto a Continuous + | Feature + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.dimension3_d.IsAContinuousFeatureApplied() + def is_a_dimension_pattern(self) -> bool: """ .. note:: diff --git a/pycatia/cat_tps_interfaces/median_feature.py b/pycatia/cat_tps_interfaces/median_feature.py new file mode 100644 index 00000000..c2600e9e --- /dev/null +++ b/pycatia/cat_tps_interfaces/median_feature.py @@ -0,0 +1,73 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.system_interfaces.any_object import AnyObject + + +class MedianFeature(AnyObject): + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | MedianFeature + | + | Interface for accessing Median Feature modifier on a Semantic GDT (ISO Standard + | only). + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.median_feature = com_object + + @property + def modifier(self) -> str: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property Modifier() As CATBSTR (Read Only) + | Retrieves Median Feature modifier display. + | Empty string is returned if modifier not applied; this could suggest that + | either: + | _ Median Feature modifier display has been formally switched + | off, + | _ Median Feature is not displayed if Dimension of Visualization is existing + | for given GDT. + + :rtype: str + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.median_feature.Modifier + + def __repr__(self): + return f'MedianFeature(name="{self.name}")' diff --git a/pycatia/cat_tps_interfaces/non_semantic_gdt.py b/pycatia/cat_tps_interfaces/non_semantic_gdt.py index 000389fc..878d81c0 100644 --- a/pycatia/cat_tps_interfaces/non_semantic_gdt.py +++ b/pycatia/cat_tps_interfaces/non_semantic_gdt.py @@ -8,7 +8,9 @@ and thus help debugging in pycatia. """ +import inspect +from pycatia.drafting_interfaces.drawing_gdt import DrawingGDT from pycatia.system_interfaces.any_object import AnyObject from pycatia.cat_tps_interfaces.tps_parallel_on_screen import TPSParallelOnScreen @@ -34,6 +36,27 @@ def __init__(self, com_object): super().__init__(com_object) self.non_semantic_gdt = com_object + def get_2d_annot(self) -> DrawingGDT: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func Get2dAnnot() As DrawingGDT + | Retrieves Drafting GDT. + + :rtype: DrawingGDT + """ + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + return DrawingGDT(self.non_semantic_gdt.Get2dAnnot()) + def tps_parallel_on_screen(self) -> TPSParallelOnScreen: """ .. note:: diff --git a/pycatia/cat_tps_interfaces/numerical_display_format.py b/pycatia/cat_tps_interfaces/numerical_display_format.py new file mode 100644 index 00000000..acd8681c --- /dev/null +++ b/pycatia/cat_tps_interfaces/numerical_display_format.py @@ -0,0 +1,299 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.system_interfaces.any_object import AnyObject + + +class NumericalDisplayFormat(AnyObject): + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | NumericalDisplayFormat + | + | Interface to manage numerical format properties of GST, DRF and Datum + | Target. + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.numerical_display_format = com_object + + @property + def available_display_factor(self) -> int: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property AvilableDisplayFactor() As long (Read Only) + | Retrieves or sets the maximun level of factor available to be + | displayed. + | It may vary according to the name of the format. + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.numerical_display_format.AvilableDisplayFactor + + @property + def display_factor(self) -> int: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property DisplayFactor() As long + | Retrieves or sets the level of factor to be displayed. + | The numerical values associated to the annotation will be displayed as per + | this Display Factor. + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.numerical_display_format.DisplayFactor + + @display_factor.setter + def display_factor(self, value: int): + """ + :param int value: + """ + + self.numerical_display_format.DisplayFactor = value + + @property + def display_leading_zero(self) -> int: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property DisplayLeadingZero() As long + | Retrieves or sets the annotation DisplayLeadingZero. + | The numerical values associated to the annotation will be displayed as per + | this DisplayLeadingZero. + | The integer value of onValue/inValue corresponding to: + | 0 : no display of LeadingZero. + | 1 : display the LeadingZero. + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.numerical_display_format.DisplayLeadingZero + + @display_leading_zero.setter + def display_leading_zero(self, value: int): + """ + :param int value: + """ + + self.numerical_display_format.DisplayLeadingZero = value + + @property + def display_trailing_zero(self) -> int: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property DisplayTrailingZero() As long + | Retrieves or sets the annotation DisplayTrailingZero. + | The numerical values associated to the annotation will be displayed as per + | this DisplayTrailingZero. + | The integer value of onValue/inValue corresponding to: + | 0 : no display of TrailingZero. + | 1 : display the TrailingZero. + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.numerical_display_format.DisplayTrailingZero + + @display_trailing_zero.setter + def display_trailing_zero(self, value: int): + """ + :param int value: + """ + + self.numerical_display_format.DisplayTrailingZero = value + + @property + def format_name(self) -> str: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property FormatName() As CATBSTR + | Retrieves or sets the format name. + | The numerical values associated to the annotation will be displayed as per + | this format. + + :rtype: str + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.numerical_display_format.FormatName + + @format_name.setter + def format_name(self, value: str): + """ + :param str value: + """ + + self.numerical_display_format.FormatName = value + + @property + def precision(self) -> int: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property Precision() As long + | Retrieves or sets the precision of annotation. + | The numerical values associated to the annotation will be displayed as per + | this precision. + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.numerical_display_format.Precision + + @precision.setter + def precision(self, value: int): + """ + :param int value: + """ + + self.numerical_display_format.Precision = value + + @property + def separator(self) -> int: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property Separator() As long + | Retrieves or sets the annotation separator. + | The numerical values associated to the annotation will be displayed with + | this seperator. + | The integer value of onValue/inValue corresponding to: + | 0 "" + | 1 "/" + | 2 ":" + | 3 "(" + | 4 ")" + | 5 "\\" + | 6 "," + | 7 "<" + | 8 ">" + | 9 "X" + | 10 "*" + | 11 "." + | 12 ";" + | 13 "+" + | 14 "[" + | 15 "]" + | 16 "-" + | 17 "_" + | 18 " " + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.numerical_display_format.Separator + + @separator.setter + def separator(self, value: int): + """ + :param int value: + """ + + self.numerical_display_format.Separator = value + + def __repr__(self): + return f'NumericalDisplayFormat(name="{self.name}")' diff --git a/pycatia/cat_tps_interfaces/semantic_gdt.py b/pycatia/cat_tps_interfaces/semantic_gdt.py index d72888ac..0e5db526 100644 --- a/pycatia/cat_tps_interfaces/semantic_gdt.py +++ b/pycatia/cat_tps_interfaces/semantic_gdt.py @@ -8,7 +8,11 @@ and thus help debugging in pycatia. """ +import inspect +from pycatia.cat_tps_interfaces.median_feature import MedianFeature +from pycatia.cat_tps_interfaces.semantic_gdt_frame_extension import SemanticGDTFrameExtension +from pycatia.cat_tps_interfaces.semantic_gdt_nx_display import SemanticGDTNxDisplay from pycatia.system_interfaces.any_object import AnyObject from pycatia.cat_tps_interfaces.associated_ref_frame import AssociatedRefFrame from pycatia.cat_tps_interfaces.composite_tolerance import CompositeTolerance @@ -85,6 +89,41 @@ def composite_tolerance(self) -> CompositeTolerance: """ return CompositeTolerance(self.semantic_gdt.CompositeTolerance()) + def frame_extensions(self, i_frame_extent_index: int) -> SemanticGDTFrameExtension: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func FrameExtensions(long iFrameExtentIndex) As + | SemanticGDTFrameExtension + | + | Role: Gets the Auxiliary Features at given Index applied on + | GDT. + | + | Parameters: + | + | iFrameExtentIndex + | Index of the Frame Extension to retrieve. + | oAuxiliaryFeatures + | The list of Auxiliary Features specified on GDT (implies ISO + | Standard applied). + + :param int i_frame_extent_index: + :rtype: SemanticGDTFrameExtension + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return SemanticGDTFrameExtension(self.semantic_gdt.FrameExtensions(i_frame_extent_index)) + def free_state(self) -> FreeState: """ .. note:: @@ -104,6 +143,77 @@ def free_state(self) -> FreeState: """ return FreeState(self.semantic_gdt.FreeState()) + def has_a_centered_element(self) -> bool: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func HasACenteredElement() As boolean + | + | Role: Checks if the geometrical specification has a centered + | element. + | Precondition: Median Feature characteristics is valid only for ISO + | standard + | + | Parameters: + | + | oHasCenterElt + | + | TRUE: The GDT has a center element + | FALSE: The GDT has not a center element or standard different + | from ISO. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.semantic_gdt.HasACenteredElement() + + def has_a_frame_extension(self) -> int: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func HasAFrameExtension() As long + | + | Role: Checks if the geometrical specification wears a frame extension + | specification. + | Precondition: Intersection Plane, Orientation Plane, Collection Plane or + | Direction Feature are only meaningful in ISO Standard. + | + | Parameters: + | + | oFrameExtentNumber + | + | Greater than 0: The GDT has oFrameExtentNumber frame + | extensions + | Equal or less than 0: The GDT has not a frame extension or + | standard different from ISO (value is -1). + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.semantic_gdt.HasAFrameExtension() + def has_a_free_state(self) -> bool: """ .. note:: @@ -338,6 +448,38 @@ def is_an_associated_ref_frame(self) -> bool: """ return self.semantic_gdt.IsAnAssociatedRefFrame() + def is_applied_on_multiple_entities(self) -> bool: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func IsAppliedOnMultipleEntities() As boolean + | + | Role: Checks if the geometrical specification is applied onto multiple + | geometries. + | + | Parameters: + | + | oIsAPattern + | + | TRUE: The GDT is applied on Nx elements + | FALSE: The GDT is applied on a unique surface. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.semantic_gdt.IsAppliedOnMultipleEntities() + def material_condition(self) -> MaterialCondition: """ .. note:: @@ -357,6 +499,65 @@ def material_condition(self) -> MaterialCondition: """ return MaterialCondition(self.semantic_gdt.MaterialCondition()) + def median_feature(self) -> MedianFeature: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func MedianFeature() As MedianFeature + | + | Role: Gets the GDT on the Median Feature interface. + | + | Parameters: + | + | oMedianFeat + | The Median Feature. + + :rtype: MedianFeature + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return MedianFeature(self.semantic_gdt.MedianFeature()) + + def nx_display(self) -> SemanticGDTNxDisplay: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func NxDisplay() As SemanticGDTNxDisplay + | + | Role: Gets the GDT on the handle to read Nx instance count, Collection or + | Separate type of the geometrical specification. + | + | Parameters: + | + | oNxDisplay + | Behavior to qualify Nx application context of this GDT. + + :rtype: SemanticGDTNxDisplay + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return SemanticGDTNxDisplay(self.semantic_gdt.NxDisplay()) + def particular_tol_elem(self) -> ParticularTolElem: """ .. note:: diff --git a/pycatia/cat_tps_interfaces/semantic_gdt_common_zone.py b/pycatia/cat_tps_interfaces/semantic_gdt_common_zone.py new file mode 100644 index 00000000..9d80ea9c --- /dev/null +++ b/pycatia/cat_tps_interfaces/semantic_gdt_common_zone.py @@ -0,0 +1,68 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.system_interfaces.any_object import AnyObject + + +class SemanticGDTCommonZone(AnyObject): + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | SemanticGDTCommonZone + | + | Interface for accessing Common Zone, CZ, modifier on a Semantic GDT (ISO + | Standard only). + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.semantic_gdt_common_zone = com_object + + @property + def modifier(self) -> str: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property Modifier() As CATBSTR (Read Only) + | Retrieves CZ modifier display. + | Empty string is returned if modifier not applied. + + :rtype: str + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.semantic_gdt_common_zone.Modifier + + def __repr__(self): + return f'SemanticGdtCommonZone(name="{self.name}")' diff --git a/pycatia/cat_tps_interfaces/semantic_gdt_frame_extension.py b/pycatia/cat_tps_interfaces/semantic_gdt_frame_extension.py new file mode 100644 index 00000000..3f2b881b --- /dev/null +++ b/pycatia/cat_tps_interfaces/semantic_gdt_frame_extension.py @@ -0,0 +1,175 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.cat_tps_interfaces.datum_simple import DatumSimple +from pycatia.system_interfaces.any_object import AnyObject + + +class SemanticGDTFrameExtension(AnyObject): + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | SemanticGDTFrameExtension + | + | Interface to parse Semantic GDT auxiliary feature. + | + | Its allows getting information of Intersection Plane, Orientation Plane, + | Collection Plane or Direction Feature. (ISO Standard only). + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.semantic_gdt_frame_extension = com_object + + @property + def direction_specification(self) -> str: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property DirectionSpecification() As CATBSTR (Read Only) + | Gets the direction specification. + | + | Parameters: + | + | oDirSpec + | The Direction of Specification. + | List of legal values are the same as the ones obtained using + | SuperType property (equals to "FTA_Orientation") from Annotation2 augmented by + | specific type "FTA_Symmetry": + | oDirSpec = "FTA_Parallelism" + | oDirSpec = "FTA_Perpendicularity" + | oDirSpec = "FTA_Angularity" + | oDirSpec = "FTA_Symmetry" + + :rtype: str + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.semantic_gdt_frame_extension.DirectionSpecification + + @property + def type(self) -> str: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property Type() As CATBSTR (Read Only) + | Gets the Type. + | + | Parameters: + | + | oType + | The Type. + | List of types available: + | Type = "FTA_IntersectionPlane" + | Type = "FTA_OrientationPlane" + | Type = "FTA_CollectionPlane" + | Type = "FTA_DirectionFeature" + + :rtype: str + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.semantic_gdt_frame_extension.Type + + def direction_reference(self) -> DatumSimple: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func DirectionReference() As DatumSimple + | Returns the Datum Feature used as reference to specify auxiliary + | feature. + | + | Parameters: + | + | oDatumFeature + | The Datum Feature. + + :rtype: DatumSimple + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return DatumSimple(self.semantic_gdt_frame_extension.DirectionReference()) + + def orientation(self) -> float: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func Orientation() As double + | Retrieves orientation angle when DirectionSpecification is + | "FTA_Angularity". + | These values are expressed in degrees. + | + | Parameters: + | + | oOrientation + | The orientation value with respect to Datum Feature reference. + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.semantic_gdt_frame_extension.Orientation() + + def __repr__(self): + return f'SemanticGdtFrameExtension(name="{self.name}")' diff --git a/pycatia/cat_tps_interfaces/semantic_gdt_nx_display.py b/pycatia/cat_tps_interfaces/semantic_gdt_nx_display.py new file mode 100644 index 00000000..43f5d6e3 --- /dev/null +++ b/pycatia/cat_tps_interfaces/semantic_gdt_nx_display.py @@ -0,0 +1,164 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.cat_tps_interfaces.semantic_gdt_common_zone import SemanticGDTCommonZone +from pycatia.system_interfaces.any_object import AnyObject + + +class SemanticGDTNxDisplay(AnyObject): + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | SemanticGDTNxDisplay + | + | Interface to distinguish Collection of features from Separate features + | GDT. + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.semantic_gdt_nx_display = com_object + + @property + def instance_count(self) -> int: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property InstanceCount() As long (Read Only) + | Gets count of instances. + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.semantic_gdt_nx_display.InstanceCount + + def common_zone(self) -> SemanticGDTCommonZone: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func CommonZone() As SemanticGDTCommonZone + | Gets the GDT on the Common Zone interface to access CZ modifier + | information. Method is only returning a valid object if ISO Standard is + | applied. + | + | Parameters: + | + | oCommonZone + | Common Zone related information. + + :rtype: SemanticGDTCommonZone + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return SemanticGDTCommonZone(self.semantic_gdt_nx_display.CommonZone()) + + def is_a_collection(self) -> bool: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func IsACollection() As boolean + | Checks if GDT is Collection of Features. In ISO Standard, GDT may have a CZ + | modifier on tolerance value. + | + | Parameters: + | + | oIsColl + | + | TRUE: The GDT is applied on several elements considered as a + | collection + | FALSE: The GDT is not applied with a collection consideration. + | It must be a separate. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.semantic_gdt_nx_display.IsACollection() + + def is_a_separate(self) -> bool: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func IsASeparate() As boolean + | Checks if GDT is Separate Features. In ASME Standard this is indicated with + | the "INDIVIDUALLY" text linked to the GDT. + | + | Parameters: + | + | oIsSeparate + | + | TRUE: The GDT is applied on several elements as many separate + | specifications. + | FALSE: The GDT is not applied with a separate consideration. It + | must be a collection. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.semantic_gdt_nx_display.IsASeparate() + + def __repr__(self): + return f'SemanticGdtNxDisplay(name="{self.name}")' diff --git a/pycatia/cat_tps_interfaces/tps_view.py b/pycatia/cat_tps_interfaces/tps_view.py index 58e3f37b..74a25146 100644 --- a/pycatia/cat_tps_interfaces/tps_view.py +++ b/pycatia/cat_tps_interfaces/tps_view.py @@ -1,24 +1,25 @@ #! usr/bin/python3.9 """ - Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357 + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 .. warning:: The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia. - + """ +import inspect +from pycatia.cat_tps_interfaces.annotations import Annotations from pycatia.system_interfaces.any_object import AnyObject class TPSView(AnyObject): - """ .. note:: :class: toggle - CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357) + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) | System.IUnknown | System.IDispatch @@ -26,15 +27,180 @@ class TPSView(AnyObject): | System.CATBaseDispatch | System.AnyObject | TPSView - | - | - | Copyright © 1999-2011, Dassault Systèmes. All rights reserved. - + + """ def __init__(self, com_object): super().__init__(com_object) self.tps_view = com_object + @property + def annotation_plane(self) -> tuple: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property AnnotationPlane() As CATSafeArrayVariant (Read Only) + | Reads view annoation plane. + | + | Parameters: + | + | oMathPlane + | Mathematical plane definition of the View. + + :rtype: tuple + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.tps_view.AnnotationPlane + + @property + def annotation_sketch(self) -> False: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property AnnotationSketch(AnyObject Layout2DLView) + | Gets / Sets the annotation Sketch associated under the current + | View. + | + | Parameters: + | + | Layout2DLView + | 2D Layout View used by current View as annotation sketch + + :rtype: False + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return None + + @annotation_sketch.setter + def annotation_sketch(self, value: False): + """ + :param False value: + """ + + self.tps_view.AnnotationSketch = value + + @property + def annotations(self) -> Annotations: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property Annotations() As Annotations (Read Only) + | Retrieves the TPS components of the View. + | + | Parameters: + | + | oAnnots + | Collection of returned component. + + :rtype: Annotations + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return Annotations(self.tps_view.Annotations) + + @property + def display_ratio(self) -> False: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property DisplayRatio(double RatioValue) + | Sets / Gets the ratio of current View. + | + | Parameters: + | + | RatioValue + | Ratio applied to the View. + + :rtype: False + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return None + + @display_ratio.setter + def display_ratio(self, value: False): + """ + :param False value: + """ + + self.tps_view.DisplayRatio = value + + @property + def view_type(self) -> int: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property ViewType() As long (Read Only) + | Gets view type. + | + | Parameters: + | + | oViewType + | The view type + | Legal values: + | + | 1: Front View + | 2: Section View + | 3: Cut View + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.tps_view.ViewType + def __repr__(self): - return f'TPSView(name="{ self.name }")' + return f'TpsView(name="{self.name}")' diff --git a/pycatia/cdma_interoperability/__init__.py b/pycatia/cdma_interoperability/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pycatia/cdma_interoperability/cdma_setting_att.py b/pycatia/cdma_interoperability/cdma_setting_att.py new file mode 100644 index 00000000..ce910e3b --- /dev/null +++ b/pycatia/cdma_interoperability/cdma_setting_att.py @@ -0,0 +1,1875 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.system_interfaces.setting_controller import SettingController + + +class CDMASettingAtt(SettingController): + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | System.SettingController + | CDMASettingAtt + | + | Represents the base object to handle the parameters of the + | cache. + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.cdma_setting_att = com_object + + @property + def allow_replace_struct_exposed_during_extract_save(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property AllowReplaceStructExposedDuringExtractSave() As + | boolean + | Retrieves or sets the enabling of replacing the structure exposed assembly + | with the blackbox resulting of extract/save. + | Role: Sets the enabling of replacing the structure exposed assembly with + | the blackbox resulting of extract/save. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.AllowReplaceStructExposedDuringExtractSave + + @allow_replace_struct_exposed_during_extract_save.setter + def allow_replace_struct_exposed_during_extract_save(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.AllowReplaceStructExposedDuringExtractSave = value + + @property + def ask_before_overwrite_existing_parts(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property AskBeforeOverwriteExistingParts() As boolean + | Retrieves or sets the enabling of asking before overwriting existing + | part. + | Role: Sets the enabling of asking before overwriting existing part. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.AskBeforeOverwriteExistingParts + + @ask_before_overwrite_existing_parts.setter + def ask_before_overwrite_existing_parts(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.AskBeforeOverwriteExistingParts = value + + @property + def auto_high(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property AutoHigh() As boolean + | Retrieves or sets the automatic highlight in PSN status. + | Role: Sets the automatic highlight in PSN status. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.AutoHigh + + @auto_high.setter + def auto_high(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.AutoHigh = value + + @property + def check_exist_in_vpm_before_fbdi(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property CheckExistInVPMBeforeFBDI() As boolean + | Retrieves or sets the check of existence in VPM before + | FBDI. + | Role: Sets the check of existence in VPM before FBDI. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.CheckExistInVPMBeforeFBDI + + @check_exist_in_vpm_before_fbdi.setter + def check_exist_in_vpm_before_fbdi(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.CheckExistInVPMBeforeFBDI = value + + @property + def disable_app_obj_mgt(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property DisableAppObjMgt() As boolean + | Retrieves or sets the disabling of applicative object + | management. + | Role: Retrieves or sets the value of the disabling of applicative object + | management. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.DisableAppObjMgt + + @disable_app_obj_mgt.setter + def disable_app_obj_mgt(self, value: bool): + """ + :param bool value: + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + self.cdma_setting_att.DisableAppObjMgt = value + + @property + def disable_overwrite_reload_warn_msg(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property DisableOverwriteReloadWarnMsg() As boolean + | Retrieves or sets the desabling of the overwrite/reload + | message. + | Role: Sets the desabling of the overwrite/reload message. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.DisableOverwriteReloadWarnMsg + + @disable_overwrite_reload_warn_msg.setter + def disable_overwrite_reload_warn_msg(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.DisableOverwriteReloadWarnMsg = value + + @property + def disable_vpm_save_commit_panel(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property DisableVPMSaveCommitPanel() As boolean + | Retrieves or sets the disabling of VPM Save Commit Panel. + | Role: Sets the disabling of VPM Save Commit Panel. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.DisableVPMSaveCommitPanel + + @disable_vpm_save_commit_panel.setter + def disable_vpm_save_commit_panel(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.DisableVPMSaveCommitPanel = value + + @property + def disable_vpm_save_report_panel(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property DisableVPMSaveReportPanel() As boolean + | Retrieves or sets the disabling of VPM Save Report Panel. + | Role: Sets the disabling of VPM Save Report Panel. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.DisableVPMSaveReportPanel + + @disable_vpm_save_report_panel.setter + def disable_vpm_save_report_panel(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.DisableVPMSaveReportPanel = value + + @property + def enable_direct_v5_vault_save(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property EnableDirectV5VaultSave() As boolean + | Retrieves or sets the enabling of the direct V5 Vault + | save. + | Role: Sets the enabling of the direct V5 Vault save. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.EnableDirectV5VaultSave + + @enable_direct_v5_vault_save.setter + def enable_direct_v5_vault_save(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.EnableDirectV5VaultSave = value + + @property + def forbid_inconsistent_save(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property ForbidInconsistentSave() As boolean + | Retrieves or sets the enabling of forbidding inconsistent + | save. + | Role: Sets the enabling of forbidding inconsistent save. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.ForbidInconsistentSave + + @forbid_inconsistent_save.setter + def forbid_inconsistent_save(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.ForbidInconsistentSave = value + + @property + def gfbdi(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property GFBDI() As boolean + | Retrieves or sets the enabling of generic FBDI. + | Role: Sets the enabling of generic FBDI. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GFBDI + + @gfbdi.setter + def gfbdi(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.GFBDI = value + + @property + def load_all_vpm_properties(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property LoadAllVPMProperties() As boolean + | Retrieves or sets the Load Of All VPM Properties status. + | Role: Sets the Load Of All VPM Properties status. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.LoadAllVPMProperties + + @load_all_vpm_properties.setter + def load_all_vpm_properties(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.LoadAllVPMProperties = value + + @property + def manual_cache_cleaning(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property ManualCacheCleaning() As boolean + | Retrieves or sets the manual cache cleaning activation. + | Role: Sets the manual cache cleaning activation. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.ManualCacheCleaning + + @manual_cache_cleaning.setter + def manual_cache_cleaning(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.ManualCacheCleaning = value + + @property + def mapping_file(self) -> str: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property MappingFile() As CATBSTR + | Retrieves or sets the mapping file. + | Role: Sets the mapping file. + + :rtype: str + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.MappingFile + + @mapping_file.setter + def mapping_file(self, value: str): + """ + :param str value: + """ + + self.cdma_setting_att.MappingFile = value + + @property + def max_percent_cache_size(self) -> int: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property MaxPercentCacheSize() As long + | Retrieves or sets the maximum percentage cache size before automatic cache + | cleaning. + | Role: Sets the maximum percentage cache size before automatic cache + | cleaning. + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.MaxPercentCacheSize + + @max_percent_cache_size.setter + def max_percent_cache_size(self, value: int): + """ + :param int value: + """ + + self.cdma_setting_att.MaxPercentCacheSize = value + + @property + def nb_files_for_deletion(self) -> int: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property NbFilesForDeletion() As long + | Retrieves or sets the number of files to delete in VPM cache during + | automatic cache cleaning. + | Role: Sets the number of files to delete in VPM cache during automatic + | cache cleaning. + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.NbFilesForDeletion + + @nb_files_for_deletion.setter + def nb_files_for_deletion(self, value: int): + """ + :param int value: + """ + + self.cdma_setting_att.NbFilesForDeletion = value + + @property + def nb_files_max(self) -> int: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property NbFilesMax() As long + | Retrieves or sets the maximum number of files in VPM cache before automatic + | cache cleaning. + | Role: Sets the maximum number of files in VPM cache before automatic cache + | cleaning. + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.NbFilesMax + + @nb_files_max.setter + def nb_files_max(self, value: int): + """ + :param int value: + """ + + self.cdma_setting_att.NbFilesMax = value + + @property + def never_overwrite_existing_parts(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property NeverOverwriteExistingParts() As boolean + | Retrieves or sets the enabling of forbidding overwriting existing + | part. + | Role: Sets the enabling of forbidding overwriting existing part. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.NeverOverwriteExistingParts + + @never_overwrite_existing_parts.setter + def never_overwrite_existing_parts(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.NeverOverwriteExistingParts = value + + @property + def no_db_connection(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property NoDBConnection() As boolean + | Retrieves or sets the database connection desabling. + | Role: Sets the database connection desabling. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.NoDBConnection + + @no_db_connection.setter + def no_db_connection(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.NoDBConnection = value + + @property + def vpm_cache_path(self) -> str: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property VPMCachePath() As CATBSTR + | Retrieves or sets the VPM cache path. + | Role: Sets the VPM cache path. + + :rtype: str + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.VPMCachePath + + @vpm_cache_path.setter + def vpm_cache_path(self, value: str): + """ + :param str value: + """ + + self.cdma_setting_att.VPMCachePath = value + + @property + def work_with_vpm_cache(self) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property WorkWithVPMCache() As boolean + | Returns or sets the activation of the work with VPM Cache. + | Role: Returns or sets the value of VPM cache activation. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.WorkWithVPMCache + + @work_with_vpm_cache.setter + def work_with_vpm_cache(self, value: bool): + """ + :param bool value: + """ + + self.cdma_setting_att.WorkWithVPMCache = value + + def get_allow_replace_struct_exposed_during_extract_save_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetAllowReplaceStructExposedDuringExtractSaveInfo(CATBSTR + | AdminLevel,CATBSTR Locked) As boolean + | Retrieves environment informations for the enabling of forbidding + | overwriting existing part. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetAllowReplaceStructExposedDuringExtractSaveInfo(admin_level, locked) + + def get_ask_before_overwrite_existing_parts_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetAskBeforeOverwriteExistingPartsInfo(CATBSTR AdminLevel,CATBSTR Locked) + | As boolean + | Retrieves environment informations for the enabling of asking before + | overwriting existing part. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetAskBeforeOverwriteExistingPartsInfo(admin_level, locked) + + def get_auto_high_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetAutoHighInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the automatic highlight in PSN + | status. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetAutoHighInfo(admin_level, locked) + + def get_check_exist_in_vpm_before_fbdi_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetCheckExistInVPMBeforeFBDIInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the check of existence in VPM before + | FBDI. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetCheckExistInVPMBeforeFBDIInfo(admin_level, locked) + + def get_disable_app_obj_mgt_info(self, admin_level: str, o_locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetDisableAppObjMgtInfo(CATBSTR AdminLevel,CATBSTR oLocked) As + | boolean + | Retrieves informations about the disabling of applicative object + | management. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str o_locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetDisableAppObjMgtInfo(admin_level, o_locked) + + def get_disable_overwrite_reload_warn_msg_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetDisableOverwriteReloadWarnMsgInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the the desabling of the + | overwrite/reload message. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetDisableOverwriteReloadWarnMsgInfo(admin_level, locked) + + def get_disable_vpm_save_commit_panel_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetDisableVPMSaveCommitPanelInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the disabling of VPM Save Commit + | Panel. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetDisableVPMSaveCommitPanelInfo(admin_level, locked) + + def get_disable_vpm_save_report_panel_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetDisableVPMSaveReportPanelInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the disabling of VPM Save Report + | Panel. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetDisableVPMSaveReportPanelInfo(admin_level, locked) + + def get_enable_direct_v5_vault_save_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetEnableDirectV5VaultSaveInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the enabling of the direct V5 Vault + | save. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetEnableDirectV5VaultSaveInfo(admin_level, locked) + + def get_forbid_inconsistent_save_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetForbidInconsistentSaveInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the enabling of forbidding + | inconsistent save. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetForbidInconsistentSaveInfo(admin_level, locked) + + def get_gfbdi_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetGFBDIInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the enabling of generic + | FBDI. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetGFBDIInfo(admin_level, locked) + + def get_load_all_vpm_properties_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetLoadAllVPMPropertiesInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the Load Of All VPM Properties + | status. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetLoadAllVPMPropertiesInfo(admin_level, locked) + + def get_manual_cache_cleaning_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetManualCacheCleaningInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the manual cache cleaning + | activation. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetManualCacheCleaningInfo(admin_level, locked) + + def get_mapping_file_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetMappingFileInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the mapping file. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetMappingFileInfo(admin_level, locked) + + def get_max_percent_cache_size_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetMaxPercentCacheSizeInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the number of files to delete in VPM + | cache during automatic cache cleaning. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetMaxPercentCacheSizeInfo(admin_level, locked) + + def get_nb_files_for_deletion_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetNbFilesForDeletionInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the number of files to delete in VPM + | cache during automatic cache cleaning. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetNbFilesForDeletionInfo(admin_level, locked) + + def get_nb_files_max_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetNbFilesMaxInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the maximum number of files in VPM + | cache before automatic cache cleaning. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetNbFilesMaxInfo(admin_level, locked) + + def get_never_overwrite_existing_parts_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetNeverOverwriteExistingPartsInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the enabling of forbidding + | overwriting existing part. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetNeverOverwriteExistingPartsInfo(admin_level, locked) + + def get_no_db_connection_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetNoDBConnectionInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the database connection + | desabling. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetNoDBConnectionInfo(admin_level, locked) + + def get_vpm_cache_path_info(self, admin_level: str, locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetVPMCachePathInfo(CATBSTR AdminLevel,CATBSTR Locked) As + | boolean + | Retrieves environment informations for the VPM cache path. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetVPMCachePathInfo(admin_level, locked) + + def get_work_with_vpm_cache_mode_info(self, admin_level: str, o_locked: str) -> bool: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetWorkWithVPMCacheModeInfo(CATBSTR AdminLevel,CATBSTR oLocked) As + | boolean + | Retrieves informations about the VPM Cache activation + | mode. + | Refer to SettingController for a detailled description. + + :param str admin_level: + :param str o_locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.GetWorkWithVPMCacheModeInfo(admin_level, o_locked) + + def set_allow_replace_struct_exposed_during_extract_save_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetAllowReplaceStructExposedDuringExtractSaveLock(boolean + | iLocked) + | Locks or unlocks the enabling of forbidding overwriting existing + | part. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetAllowReplaceStructExposedDuringExtractSaveLock(i_locked) + + def set_ask_before_overwrite_existing_parts_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetAskBeforeOverwriteExistingPartsLock(boolean iLocked) + | Locks or unlocks the enabling of asking before overwriting existing + | part. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetAskBeforeOverwriteExistingPartsLock(i_locked) + + def set_auto_high_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetAutoHighLock(boolean iLocked) + | Locks or unlocks the automatic highlight in PSN status. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetAutoHighLock(i_locked) + + def set_check_exist_in_vpm_before_fbdi_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetCheckExistInVPMBeforeFBDILock(boolean iLocked) + | Locks or unlocks the check of existence in VPM before + | FBDI. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetCheckExistInVPMBeforeFBDILock(i_locked) + + def set_disable_app_obj_mgt_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetDisableAppObjMgtLock(boolean iLocked) + | Locks or unlocks the disabling of applicative object + | management. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetDisableAppObjMgtLock(i_locked) + + def set_disable_overwrite_reload_warn_msg_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetDisableOverwriteReloadWarnMsgLock(boolean iLocked) + | Locks or unlocks the desabling of the overwrite/reload + | message. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetDisableOverwriteReloadWarnMsgLock(i_locked) + + def set_disable_vpm_save_commit_panel_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetDisableVPMSaveCommitPanelLock(boolean iLocked) + | Locks or unlocks the disabling of VPM Save Commit Panel. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetDisableVPMSaveCommitPanelLock(i_locked) + + def set_disable_vpm_save_report_panel_panel_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetDisableVPMSaveReportPanelPanelLock(boolean iLocked) + | Locks or unlocks the disabling of VPM Save Report Panel. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetDisableVPMSaveReportPanelPanelLock(i_locked) + + def set_enable_direct_v5_vault_save_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetEnableDirectV5VaultSaveLock(boolean iLocked) + | Locks or unlocks the enabling of the direct V5 Vault save. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetEnableDirectV5VaultSaveLock(i_locked) + + def set_forbid_inconsistent_save_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetForbidInconsistentSaveLock(boolean iLocked) + | Locks or unlocks the enabling of forbidding inconsistent + | save. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetForbidInconsistentSaveLock(i_locked) + + def set_gfbdi_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetGFBDILock(boolean iLocked) + | Locks or unlocks the enabling of generic FBDI. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + return self.cdma_setting_att.SetGFBDILock(i_locked) + + def set_load_all_vpm_properties_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetLoadAllVPMPropertiesLock(boolean iLocked) + | Locks or unlocks the Load Of All VPM Properties status. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetLoadAllVPMPropertiesLock(i_locked) + + def set_manual_cache_cleaning_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetManualCacheCleaningLock(boolean iLocked) + | Locks or unlocks the manual cache cleaning activation. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetManualCacheCleaningLock(i_locked) + + def set_mapping_file_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetMappingFileLock(boolean iLocked) + | Locks or unlocks the mapping file. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetMappingFileLock(i_locked) + + def set_max_percent_cache_size_lock(self, i_locked: int) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetMaxPercentCacheSizeLock(long iLocked) + | Locks or unlocks the maximum percentage cache size before automatic cache + | cleaning. + | Refer to SettingController for a detailled description. + + :param int i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetMaxPercentCacheSizeLock(i_locked) + + def set_nb_files_for_deletion_lock(self, i_locked: int) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetNbFilesForDeletionLock(long iLocked) + | Locks or unlocks the number of files to delete in VPM cache during + | automatic cache cleaning. + | Refer to SettingController for a detailled description. + + :param int i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetNbFilesForDeletionLock(i_locked) + + def set_nb_files_max_lock(self, i_locked: int) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetNbFilesMaxLock(long iLocked) + | Locks or unlocks the maximum number of files in VPM cache before automatic + | cache cleaning. + | Refer to SettingController for a detailled description. + + :param int i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetNbFilesMaxLock(i_locked) + + def set_never_overwrite_existing_parts_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetNeverOverwriteExistingPartsLock(boolean iLocked) + | Locks or unlocks the enabling of forbidding overwriting existing + | part. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetNeverOverwriteExistingPartsLock(i_locked) + + def set_no_db_connection_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetNoDBConnectionLock(boolean iLocked) + | Locks or unlocks the database connection desabling. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetNoDBConnectionLock(i_locked) + + def set_vpm_cache_path_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetVPMCachePathLock(boolean iLocked) + | Locks or unlocks the VPM cache path. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetVPMCachePathLock(i_locked) + + def set_work_with_vpm_cache_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetWorkWithVPMCacheLock(boolean iLocked) + | Locks or unlocks the VPM Cache Activation mode. + | Refer to SettingController for a detailled description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.cdma_setting_att.SetWorkWithVPMCacheLock(i_locked) + + def __repr__(self): + return f'CdmaSettingAtt(name="{self.name}")' diff --git a/pycatia/drafting_2dL_interfaces/layout_2d_view.py b/pycatia/drafting_2dL_interfaces/layout_2d_view.py index 58be875b..bdc0948e 100644 --- a/pycatia/drafting_2dL_interfaces/layout_2d_view.py +++ b/pycatia/drafting_2dL_interfaces/layout_2d_view.py @@ -8,10 +8,13 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.drafting_interfaces.drawing_arrows import DrawingArrows from pycatia.drafting_interfaces.drawing_components import DrawingComponents +from pycatia.drafting_interfaces.drawing_coord_dims import DrawingCoordDims from pycatia.drafting_interfaces.drawing_dimensions import DrawingDimensions +from pycatia.drafting_interfaces.drawing_gdts import DrawingGDTs from pycatia.drafting_interfaces.drawing_pictures import DrawingPictures from pycatia.drafting_interfaces.drawing_tables import DrawingTables from pycatia.drafting_interfaces.drawing_texts import DrawingTexts @@ -127,6 +130,38 @@ def components(self) -> DrawingComponents: return DrawingComponents(self.layout_2d_view.Components) + @property + def coord_dims(self) -> DrawingCoordDims: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property CoordDims() As DrawingCoordDims (Read Only) + | Returns the drawing CoordDim collection of the Layout2D + | view. + | + | Example: + | This example retrieves in CoordDimCollection the collection of + | CoordDims of the MyView Layout2D view. + | + | Dim CoordDimCollection As DrawingCoordDims + | Set CoordDimCollection = MyView.CoordDims + + :rtype: DrawingCoordDims + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return DrawingCoordDims(self.layout_2d_view.CoordDims) + @property def dimensions(self) -> DrawingDimensions: """ @@ -212,6 +247,37 @@ def frame_visualization(self, value: bool): self.layout_2d_view.FrameVisualization = value + @property + def gdts(self) -> DrawingGDTs: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property GDTs() As DrawingGDTs (Read Only) + | Returns the drawing GDT collection of the Layout2D view. + | + | Example: + | This example retrieves in GDTCollection the collection of GDTs of the + | MyView Layout2D view. + | + | Dim GDTCollection As DrawingGDTs + | Set GDTCollection = MyView.GDTs + + :rtype: DrawingGDTs + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return DrawingGDTs(self.layout_2d_view.GDTs) + @property def geometric_elements(self) -> GeometricElements: """ diff --git a/pycatia/drafting_interfaces/drawing_arrow.py b/pycatia/drafting_interfaces/drawing_arrow.py index cfa9ebff..2b17eccc 100644 --- a/pycatia/drafting_interfaces/drawing_arrow.py +++ b/pycatia/drafting_interfaces/drawing_arrow.py @@ -8,6 +8,7 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.system_interfaces.any_object import AnyObject @@ -139,6 +140,44 @@ def nb_point(self) -> int: return self.drawing_arrow.NbPoint + @property + def scale_on_extremities(self) -> bool: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 15:47:12.690381) + | Property ScaleOnExtremities() As boolean + | Returns or sets the scale on extremities mode. + | + | Example: + | This example retrieves the target element of head side on MyArrow + | drawing arrow. + | + | oScaleOnExtremities = MyArrow.ScaleOnExtremities + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_arrow.ScaleOnExtremities + + @scale_on_extremities.setter + def scale_on_extremities(self, value: bool): + """ + :param bool value: + """ + + self.drawing_arrow.ScaleOnExtremities = value + @property def tail_symbol(self) -> int: """ diff --git a/pycatia/drafting_interfaces/drawing_coord_dim.py b/pycatia/drafting_interfaces/drawing_coord_dim.py new file mode 100644 index 00000000..920c358d --- /dev/null +++ b/pycatia/drafting_interfaces/drawing_coord_dim.py @@ -0,0 +1,245 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.drafting_interfaces.drawing_text_properties import DrawingTextProperties +from pycatia.system_interfaces.any_object import AnyObject + + +class DrawingCoordDim(AnyObject): + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | DrawingCoordDim + | + | Represents a drawing Coordinate Dimension in a drawing view. + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.drawing_coord_dim = com_object + + @property + def angle(self) -> float: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property Angle() As double + | Returns or sets the angle of the drawing coordinate dimension. The angle is + | measured between the axis system of the drawing view and the local axis system + | of the drawing coordinate dimension. The angle is measured in radians and is + | counted counterclockwise. + | + | Example: + | This example sets the angle of the MyCoordDim drawing Text to 90 + | degrees clockwise. You first need to compute the angle in degrees and set the + | minus sign to indicate the rotation is clockwise. + | + | Angle90Clockwise = -90 + | MyCoordDim.Angle = Angle90Clockwise + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_coord_dim.Angle + + @angle.setter + def angle(self, value: float): + """ + :param float value: + """ + + self.drawing_coord_dim.Angle = value + + @property + def text_properties(self) -> DrawingTextProperties: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property TextProperties() As DrawingTextProperties (Read Only) + | Returns the text properties of the drawing coordinate + | dimension. + | + | Example: + | This example retrieves in TextProperties the text properties of the + | MyCoordDim drawing coordinate dimension.. + | + | Dim TextProperties As DrawingTextProperties + | Set TextProperties = MyCoordDim.TextProperties + + :rtype: DrawingTextProperties + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return DrawingTextProperties(self.drawing_coord_dim.TextProperties) + + @property + def x(self) -> float: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property x() As double + | Returns or sets the x coordinate of the drawing coordinate dimension. It is + | expressed with respect to the current view coordinate system. This coordinate, + | like any length, is measured in millimeters. + | + | Example: + | This example retrieves in X the x coordinate of the MyCoordDim drawing + | coordinate dimension. + | + | X = MyCoordDim.x + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_coord_dim.x + + @x.setter + def x(self, value: float): + """ + :param float value: + """ + + self.drawing_coord_dim.x = value + + @property + def y(self) -> float: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property y() As double + | Returns or sets the y coordinate of the drawing coordinate dimension. It is + | expressed with respect to the current view coordinate system. This coordinate, + | like any length, is measured in millimeters. + | + | Example: + | This example sets the y coordinate of the MyCoordDim drawing coordinate + | dimension to 5 inches. You need first to convert the 5 inches into + | millmeters. + | + | NewYCoordinate = 5*25.4/1000 + | MyCoordDim.y = NewYCoordinate + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_coord_dim.y + + @y.setter + def y(self, value: float): + """ + :param float value: + """ + + self.drawing_coord_dim.y = value + + def get_coord_values(self, o_type: int, o_x: float, o_y: float, o_z: float) -> None: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub GetCoordValues(long oType,double oX,double oY,double oZ) + | Returns the value of the drawing coordinate dimension. + | + | Parameters: + | + | oType + | oType (0: 2D coordinate dimension, 1: 3D coordinate dimension). + | + | oX + | X value. + | oY + | Y value. + | oZ + | Z value (=0. if 2D coordinate dimension). + | + | Example: + | This example gets the type, x, y and z of the MyCoordDim + | drawing CoordDim + | + | MyCoordDim.GetCoordValues(oType, oX, oY, oZ) + + :param int o_type: + :param float o_x: + :param float o_y: + :param float o_z: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_coord_dim.GetCoordValues(o_type, o_x, o_y, o_z) + + def __repr__(self): + return f'DrawingCoordDim(name="{self.name}")' diff --git a/pycatia/drafting_interfaces/drawing_coord_dims.py b/pycatia/drafting_interfaces/drawing_coord_dims.py new file mode 100644 index 00000000..93d93ef2 --- /dev/null +++ b/pycatia/drafting_interfaces/drawing_coord_dims.py @@ -0,0 +1,133 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.drafting_interfaces.drawing_coord_dim import DrawingCoordDim +from pycatia.system_interfaces.collection import Collection + + +class DrawingCoordDims(Collection): + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.Collection + | DrawingCoordDims + | + | A collection of all the drawing Coordinate Dimension currently managed by a + | drawing view of drawing sheet in a drawing document. + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.drawing_coord_dims = com_object + + def item(self, i_index: int) -> DrawingCoordDim: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func Item(long iIndex) As DrawingCoordDim + | Returns a drawing CoordDim using its index from the drawing CoordDims + | collection. + | + | Parameters: + | + | iIndex + | The index of the drawing CoordDim to retrieve from the collection + | of drawing CoordDims. As a numerics, this index is the rank of the drawing + | CoordDim in the collection. The index of the first drawing CoordDim in the + | collection is 1, and the index of the last drawing CoordDim is Count. + | + | Returns: + | The retrieved drawing CoordDim + | + | Example: + | This example retrieves in ThisDrawingCoordDim the second drawing CoordDim, + | in the drawing CoordDim collection of the active view in the active sheet, in + | the active document supposed to be a drawing document. + | + | Dim MyView As DrawingView + | Set MyView = MySheet.Views.ActiveView + | Dim ThisDrawingCoordDim As DrawingCoordDim + | Set ThisDrawingCoordDim = MyView.CoordDims.Item(2) + + :param int i_index: + :rtype: DrawingCoordDim + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return DrawingCoordDim(self.drawing_coord_dims.Item(i_index)) + + def remove(self, i_index: int) -> None: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub Remove(long iIndex) + | Removes a drawing CoordDim from the drawing CoordDims + | collection. + | + | Parameters: + | + | iIndex + | The index of the drawing CoordDim to remove from the collection of + | drawing CoordDims. As a numerics, this index is the rank of the drawing text in + | the collection. The index of the first drawing CoordDim in the collection is 1, + | and the index of the last drawing CoordDim is Count. + | + | + | Example: + | The following example removes the third drawing CoordDim from the + | drawing CoordDim collection of the active view of the active document, supposed + | to be a drawing document. + | + | Dim MyView As DrawingView + | Set MyView = MySheet.Views.ActiveView + | MyView.CoordDims.Remove(3) + + :param int i_index: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_coord_dims.Remove(i_index) + + def __repr__(self): + return f'DrawingCoordDims(name="{self.name}")' diff --git a/pycatia/drafting_interfaces/drawing_gdt.py b/pycatia/drafting_interfaces/drawing_gdt.py new file mode 100644 index 00000000..97e6fa1f --- /dev/null +++ b/pycatia/drafting_interfaces/drawing_gdt.py @@ -0,0 +1,444 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.drafting_interfaces.drawing_leaders import DrawingLeaders +from pycatia.drafting_interfaces.drawing_text_properties import DrawingTextProperties +from pycatia.drafting_interfaces.drawing_text_range import DrawingTextRange +from pycatia.system_interfaces.any_object import AnyObject + + +class DrawingGDT(AnyObject): + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | DrawingGDT + | + | Represents a drawing GDT in a drawing view. + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.drawing_gdt = com_object + + @property + def angle(self) -> float: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property Angle() As double + | Returns or sets the angle of the drawing GDT. The angle is measured between + | the axis system of the drawing view and the local axis system of the drawing + | GDT. The angle is measured in radians and is counted + | counterclockwise. + | + | Example: + | This example sets the angle of the MyGDT drawing GDT to 90 degrees + | clockwise. You first need to compute the angle in degrees and set the minus + | sign to indicate the rotation is clockwise. + | + | Angle90Clockwise = -90 + | MyGDT.Angle = Angle90Clockwise + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_gdt.Angle + + @angle.setter + def angle(self, value: float): + """ + :param float value: + """ + + self.drawing_gdt.Angle = value + + @property + def leaders(self) -> DrawingLeaders: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property Leaders() As DrawingLeaders (Read Only) + | Returns the drawing leader collection of the drawing GDT. + | + | Example: + | This example retrieves in LeaderCollection the collection of leaders of + | the MyGDT drawing GDT. + | + | Dim LeaderCollection As DrawingLeaders + | Set LeaderCollection = MyGDT.Leaders + + :rtype: DrawingLeaders + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return DrawingLeaders(self.drawing_gdt.Leaders) + + @property + def row_number(self) -> int: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property RowNumber() As long (Read Only) + | Returns the number of lines in the GDT + | + | Returns: + | The number of line in the GDT + | + | Example: + | This example retrieves in rowNumber the row number of the MyGDT + | drawing GDT + | + | rowNumber = MyGDT.RowNumber + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_gdt.RowNumber + + @property + def text_properties(self) -> DrawingTextProperties: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property TextProperties() As DrawingTextProperties (Read Only) + | Returns the text properties of the drawing GDT. + | + | Example: + | This example retrieves in TextProperties the text properties of the + | MyGDT drawing GDT.. + | + | Dim TextProperties As DrawingTextProperties + | Set TextProperties = MyGDT.TextProperties + + :rtype: DrawingTextProperties + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return DrawingTextProperties(self.drawing_gdt.TextProperties) + + @property + def x(self) -> float: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property x() As double + | Returns or sets the x coordinate of the drawing GDT. It is expressed with + | respect to the current view coordinate system. This coordinate, like any + | length, is measured in millimeters. + | + | Example: + | This example retrieves in X the x coordinate of the MyGDT drawing + | GDT. + | + | X = MyGDT.x + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_gdt.x + + @x.setter + def x(self, value: float): + """ + :param float value: + """ + + self.drawing_gdt.x = value + + @property + def y(self) -> float: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property y() As double + | Returns or sets the y coordinate of the drawing GDT. It is expressed with + | respect to the current view coordinate system. This coordinate, like any + | length, is measured in millimeters. + | + | Example: + | This example sets the y coordinate of the MyGDT drawing GDT to 5 + | inches. You need first to convert the 5 inches into + | millmeters. + | + | NewYCoordinate = 5*25.4/1000 + | MyGDT.y = NewYCoordinate + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_gdt.y + + @y.setter + def y(self, value: float): + """ + :param float value: + """ + + self.drawing_gdt.y = value + + def get_reference_number(self, i_row_number: int) -> int: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetReferenceNumber(long iRowNumber) As long + | Returns the number of references in a row of the GDT. + | + | Parameters: + | + | iRowNumber + | The number of the row to analyse. + | + | Returns: + | The number of references in this row. + | + | Example: + | This example gets the reference number of the MyGDT drawing + | GDT + | + | MyGDT.GetReferenceNumber(iRowNumber, oRefNumber) + + :param int i_row_number: + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_gdt.GetReferenceNumber(i_row_number) + + def get_text_range(self, i_row_number: int, i_number: int) -> DrawingTextRange: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetTextRange(long iRowNumber,long iNumber) As + | DrawingTextRange + | Returns the CATIADrawingTextRange of tolerance value and reference + | value. + | + | Parameters: + | + | iRowNumber + | The number of the row to analyse If iRowNumber equals 0 to analyse + | upper text or lower text. If iRowNumber is greater than 0 analyse tolerance + | value or reference value. + | iNumber + | The modifier to analyse in this row: + | If iRowNumber equals 0 and iNumber = 0 represent upper text + | If iRowNumber equals 0 and iNumber = 1 represent lower text + | If iRowNumber is greater than 0 and iNumber equals 0 to analyse tolerance value + | If iRowNumber is greater than 0 and iNumber is greater than 0 to analyse reference value. + | + | Returns: + | The CATIADrawingTextRange which is specified. If there is no textrange + | which is corresponded above, then NULL is given back. + | This example gets the TextRange on the specified line and modifier of + | the MyGDT drawing GDT + | + | MyGDT.GetTextRange(iRowNumber, iNumber, oTextRange) + + :param int i_row_number: + :param int i_number: + :rtype: DrawingTextRange + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return DrawingTextRange(self.drawing_gdt.GetTextRange(i_row_number, i_number)) + + def get_tolerance_type(self, i_row_number: int) -> int: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetToleranceType(long iRowNumber) As long + | Returns the symbol used in the row of the GDT. + | + | Parameters: + | + | iRowNumber + | The number of the row to analyze. + | + | Returns: + | The symbol in this row. + | 0 : No GDT symbol. The specified row will be remove + | 1 : Straightness GDT symbol + | 2 : Flatness GDT symbol + | 3 : Circularity GDT symbol + | 4 : Cilindricity GDT symbol + | 5 : Line profile GDT symbol + | 6 : Surface profile GDT symbol + | 7 : Angularity GDT symbol + | 8 : Perpendicularity GDT symbol + | 9 : Parallelism GDT symbol + | 10 : Position GDT symbol + | 11 : Concentricity GDT symbol + | 12 : Symmetry + | 13 : Circular runout GDT symbol + | 14 : Total runout GDT symbol + | + | Example: + | This example gets the symbol on the specified line of the MyGDT + | drawing GDT + | + | MyGDT.GetToleranceType(iRowNumber, oGDTSymbol) + + :param int i_row_number: + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_gdt.GetToleranceType(i_row_number) + + def set_tolerance_type(self, i_row_number: int, i_gdt_symbol: int) -> None: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetToleranceType(long iRowNumber,long iGDTSymbol) + | Sets the symbol used in the row of the GDT. + | + | Parameters: + | + | iRowNumber + | The number of the row analyse. If the row doesn't exist, it will be + | created + | iGDTSymbol + | The symbol to use in this row. + | + | See also: + | CATIADrawingGDT::GetToleranceType + | This example sets a symbol on a specified line of the MyGDT drawing + | GDT + | + | MyGDT.SetToleranceType(iRowNumber, iGDTSymbol) + + :param int i_row_number: + :param int i_gdt_symbol: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_gdt.SetToleranceType(i_row_number, i_gdt_symbol) + + def __repr__(self): + return f'DrawingGDT(name="{self.name}")' diff --git a/pycatia/drafting_interfaces/drawing_gdts.py b/pycatia/drafting_interfaces/drawing_gdts.py new file mode 100644 index 00000000..8d05e268 --- /dev/null +++ b/pycatia/drafting_interfaces/drawing_gdts.py @@ -0,0 +1,200 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.drafting_interfaces.drawing_gdt import DrawingGDT +from pycatia.system_interfaces.collection import Collection + + +class DrawingGDTs(Collection): + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.Collection + | DrawingGDTs + | + | A collection of all the drawing GDTs currently managed by a drawing view of + | drawing sheet in a drawing document. + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.drawing_gd_ts = com_object + + def add( + self, + i_position_leader_x: float, + i_position_leader_y: float, + i_position_x: float, + i_position_y: float, + i_gdt_symbol: int, + i_text: str + ) -> DrawingGDT: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func Add(double iPositionLeaderX,double iPositionLeaderY,double + | iPositionX,double iPositionY,long iGDTSymbol,CATBSTR iText) As + | DrawingGDT + | Creates a drawing GDT and adds it to the drawing GDTs collection. This + | drawing GDT becomes the active one. + | + | Parameters: + | + | iPositionLeaderX, + | iPositionLeaderY The drawing leader of the GDT x and y coordinates, + | expressed in millimeters, and expressed with respect to the view coordinate + | system + | iPositionX, + | iPositionY The drawing GDT x and y coordinates, expressed in + | millimeters, and expressed with respect to the view coordinate system + | + | iGDTSymbol + | The symbol to use in the first row. + | + | See also: + | CATIADrawingGDT::GetToleranceType + | Parameters: + | + | iText + | The text of the iGDTSymbol + + :param float i_position_leader_x: + :param float i_position_leader_y: + :param float i_position_x: + :param float i_position_y: + :param int i_gdt_symbol: + :param str i_text: + :rtype: DrawingGDT + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return DrawingGDT( + self.drawing_gd_ts.Add( + i_position_leader_x, + i_position_leader_y, + i_position_x, + i_position_y, + i_gdt_symbol, + i_text + ) + ) + + def item(self, i_index: int) -> DrawingGDT: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func Item(long iIndex) As DrawingGDT + | Returns a drawing GDT using its index from the drawing GDTs + | collection. + | + | Parameters: + | + | iIndex + | The index of the drawing GDT to retrieve from the collection of + | drawing GDTs. As a numerics, this index is the rank of the drawing GDT in the + | collection. The index of the first drawing GDT in the collection is 1, and the + | index of the last drawing GDT is Count. + | + | Returns: + | The retrieved drawing GDT + | + | Example: + | This example retrieves in ThisDrawingGDT the second drawing GDT, in the + | drawing GDT collection of the active view in the active sheet, in the active + | document supposed to be a drawing document. + | + | Dim MyView As DrawingView + | Set MyView = MySheet.Views.ActiveView + | Dim ThisDrawingGDT As DrawingGDT + | Set ThisDrawingGDT = MyView.GDTs.Item(2) + + :param int i_index: + :rtype: DrawingGDT + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return DrawingGDT(self.drawing_gd_ts.Item(i_index)) + + def remove(self, i_index: int) -> None: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub Remove(long iIndex) + | Removes a drawing GDT from the drawing GDTs collection. + | + | Parameters: + | + | iIndex + | The index of the drawing GDT to remove from the collection of + | drawing GDTs. As a numerics, this index is the rank of the drawing text in the + | collection. The index of the first drawing GDT in the collection is 1, and the + | index of the last drawing GDT is Count. + | + | Example: + | The following example removes the third drawing GDT from the drawing + | GDT collection of the active view of the active document, supposed to be a + | drawing document. + | + | Dim MyView As DrawingView + | Set MyView = MySheet.Views.ActiveView + | MyView.GDTs.Remove(3) + + :param int i_index: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_gd_ts.Remove(i_index) + + def __repr__(self): + return f'DrawingGDTs(name="{self.name}")' diff --git a/pycatia/drafting_interfaces/drawing_leader.py b/pycatia/drafting_interfaces/drawing_leader.py index 1aa7d1b8..3187da50 100644 --- a/pycatia/drafting_interfaces/drawing_leader.py +++ b/pycatia/drafting_interfaces/drawing_leader.py @@ -8,6 +8,7 @@ and thus help debugging in pycatia. """ +import inspect from typing import TYPE_CHECKING from pycatia.system_interfaces.any_object import AnyObject @@ -15,6 +16,7 @@ if TYPE_CHECKING: from pycatia.drafting_interfaces.drawing_leaders import DrawingLeaders + class DrawingLeader(AnyObject): """ .. note:: @@ -97,6 +99,38 @@ def anchor_point(self, value: int): self.drawing_leader.AnchorPoint = value + @property + def anchor_symbol(self) -> int: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property AnchorSymbol() As long + | Returns or sets the anchor symbol of the drawing leader. AnchorSymbol 0 : No anchor symbol 1 : All-Around style (circle) - For GDT, Text, Table 2 : All-Over (2 concentric circles) - For GDT, Text, Table 3 : AllAboutWithHorLine (square with an horizontal line) - For GDT, Text, Table 4 : AllAboutWithVerLine (square with a vertical line) - For GDT, Text, Table 5 : AllAroundPartial (half circle) - For GDT, Text, Table 6 : AllOverPartial (2 half concentric circles) - For GDT, Text, Table 7 : AllAboutWithHorLinePartial (half square with an horizontal line) - For GDT, Text, Table 8 : AllAboutWithVerLinePartial (half square with an vertical line) - For GDT, Text, Table 9 : Flag (Flag) - For welding annotation only 10 : FlagAndAllAround (Flag And AllAround) - For welding annotation only + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_leader.AnchorSymbol + + @anchor_symbol.setter + def anchor_symbol(self, value: int): + """ + :param int value: + """ + + self.drawing_leader.AnchorSymbol = value + @property def head_symbol(self) -> int: """ diff --git a/pycatia/drafting_interfaces/drawing_table.py b/pycatia/drafting_interfaces/drawing_table.py index 3d1c98e6..d234135a 100644 --- a/pycatia/drafting_interfaces/drawing_table.py +++ b/pycatia/drafting_interfaces/drawing_table.py @@ -8,9 +8,11 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.drafting_interfaces.drawing_leaders import DrawingLeaders from pycatia.drafting_interfaces.drawing_text import DrawingText +from pycatia.drafting_interfaces.drawing_text_properties import DrawingTextProperties from pycatia.system_interfaces.any_object import AnyObject @@ -205,6 +207,79 @@ def number_of_rows(self) -> int: return self.drawing_table.NumberOfRows + @property + def orientation_reference(self) -> int: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property OrientationReference() As long + | Returns or sets the orientation reference of the drawing + | table. + | 0 : Sheet orientation + | 1 : View/Label/2Dcomponent orientation + | + | Example: + | This example sets the orientation reference of MyTable drawing table to + | view orientation + | + | MyTable.OrientationReference = 1 + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_table.OrientationReference + + @orientation_reference.setter + def orientation_reference(self, value: int): + """ + :param int value: + """ + + self.drawing_table.OrientationReference = value + + @property + def text_properties(self) -> DrawingTextProperties: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property TextProperties() As DrawingTextProperties (Read Only) + | Returns the text properties of the drawing table. Allows to modify the + | whole table properties. + | + | Example: + | This example retrieves in TextProperties the text properties of the + | MyTable drawing table. + | + | Dim TextProperties As DrawingTextProperties + | Set TextProperties = MyTable.TextProperties + + :rtype: DrawingTextProperties + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return DrawingTextProperties(self.drawing_table.TextProperties) + @property def x(self) -> float: """ diff --git a/pycatia/drafting_interfaces/drawing_text.py b/pycatia/drafting_interfaces/drawing_text.py index 1ee17dff..4a5d7acb 100644 --- a/pycatia/drafting_interfaces/drawing_text.py +++ b/pycatia/drafting_interfaces/drawing_text.py @@ -8,6 +8,7 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.drafting_interfaces.drawing_leaders import DrawingLeaders from pycatia.drafting_interfaces.drawing_text_properties import DrawingTextProperties @@ -187,6 +188,77 @@ def leaders(self): return DrawingLeaders(self.drawing_text.Leaders) + @property + def nb_link(self) -> int: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property NbLink() As long (Read Only) + | Returns the number of attributes link + | + | Example: + | This example gets number of attributes link of MyText drawing + | text. + | + | nbLink = MyText.NbLink + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_text.NbLink + + @property + def orientation_reference(self) -> int: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property OrientationReference() As long + | Returns or sets the orientation reference of the drawing + | text. + | 0 : Sheet orientation + | 1 : View/Label/2Dcomponent orientation + | + | Example: + | This example sets the orientation reference of MyText drawing text to + | sheet orientation + | + | MyText.OrientationReference = 0 + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_text.OrientationReference + + @orientation_reference.setter + def orientation_reference(self, value: int): + """ + :param int value: + """ + + self.drawing_text.OrientationReference = value + @property def text(self) -> str: """ @@ -469,6 +541,46 @@ def get_modifiable_in_2d_component_instances(self) -> bool: """ return self.drawing_text.GetModifiableIn2DComponentInstances() + def get_parameter_link(self, i_index: int) -> AnyObject: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetParameterLink(long iIndex) As CATBaseDispatch + | Returns the pointed parameter link + | + | Parameters: + | + | iIndex + | The index of the pointed parameter link. 1 <= iIndex <= + | NbLink + | + | Example: + | This example gets the first parameter link of MyText drawing + | text. + | + | Dim MyParm As Parameter + | MyParm = MyText.GetParameterLink(1) + | If MyParm.Value<>"Front view" Then + | 'Do something + | End If + + :param int i_index: + :rtype: AnyObject + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.drawing_text.GetParameterLink(i_index) + def get_parameter_on_sub_string(self, i_param: int, i_first: int, inb_character: int) -> int: """ .. note:: diff --git a/pycatia/drafting_interfaces/drawing_view.py b/pycatia/drafting_interfaces/drawing_view.py index a2223a5d..c6972c69 100644 --- a/pycatia/drafting_interfaces/drawing_view.py +++ b/pycatia/drafting_interfaces/drawing_view.py @@ -8,12 +8,14 @@ and thus help debugging in pycatia. """ - +import inspect from typing import TYPE_CHECKING, Tuple from pycatia.drafting_interfaces.drawing_arrows import DrawingArrows from pycatia.drafting_interfaces.drawing_components import DrawingComponents +from pycatia.drafting_interfaces.drawing_coord_dims import DrawingCoordDims from pycatia.drafting_interfaces.drawing_dimensions import DrawingDimensions +from pycatia.drafting_interfaces.drawing_gdts import DrawingGDTs from pycatia.drafting_interfaces.drawing_pictures import DrawingPictures from pycatia.drafting_interfaces.drawing_tables import DrawingTables from pycatia.drafting_interfaces.drawing_texts import DrawingTexts @@ -146,6 +148,40 @@ def components(self) -> DrawingComponents: return DrawingComponents(self.drawing_view.Components) + @property + def coord_dims(self) -> DrawingCoordDims: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property CoordDims() As DrawingCoordDims (Read Only) + | Returns the drawing CoordDim collection of the drawing + | view. + | Warning: This method is not available with 2D Layout for 3D + | Design. + | + | Example: + | This example retrieves in CoordDimCollection the collection of + | CoordDims of the MyView drawing view. + | + | Dim CoordDimCollection As DrawingCoordDims + | Set CoordDimCollection = MyView.CoordDims + + :rtype: DrawingCoordDims + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return DrawingCoordDims(self.drawing_view.CoordDims) + @property def dimensions(self) -> DrawingDimensions: """ @@ -237,6 +273,39 @@ def frame_visualization(self, value: bool): self.drawing_view.FrameVisualization = value + @property + def gdts(self) -> DrawingGDTs: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property GDTs() As DrawingGDTs (Read Only) + | Returns the drawing GDT collection of the drawing view. + | Warning: This method is not available with 2D Layout for 3D + | Design. + | + | Example: + | This example retrieves in GDTCollection the collection of GDTs of the + | MyView drawing view. + | + | Dim GDTCollection As DrawingGDTs + | Set GDTCollection = MyView.GDTs + + :rtype: DrawingGDTs + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return DrawingGDTs(self.drawing_view.GDTs) + @property def generative_behavior(self) -> DrawingViewGenerativeBehavior: """ diff --git a/pycatia/enumeration/enumeration_types.py b/pycatia/enumeration/enumeration_types.py index 4e455166..e2696894 100644 --- a/pycatia/enumeration/enumeration_types.py +++ b/pycatia/enumeration/enumeration_types.py @@ -335,6 +335,18 @@ "catClippingModeNearAndFar", ) +# Introduced in V5-6R2020. +cat_composites_type = ( + "Unknown", + "Stacking", + "PlyGroup", + "Sequence", + "CutPieceGroup", + "Ply", + "Core", + "CutPiece", +) + cat_conflict_comparison = ( "catConflictComparisonNew", "catConflictComparisonOld", @@ -454,6 +466,12 @@ "catCSModeAngleDiameter", ) +# Introduced in V5-6R2018. +cat_cd_hole_mode = ( + "catCDModeNoCountersunkDiameter", + "catCDModeCountersunkDiameter", +) + cat_dedicated_filter_type = ( "catDisplayInBackground", "catMaskInBackground", diff --git a/pycatia/hybrid_shape_interfaces/hybrid_shape_assemble.py b/pycatia/hybrid_shape_interfaces/hybrid_shape_assemble.py index dc7467a5..9bfafdd8 100644 --- a/pycatia/hybrid_shape_interfaces/hybrid_shape_assemble.py +++ b/pycatia/hybrid_shape_interfaces/hybrid_shape_assemble.py @@ -8,13 +8,13 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.in_interfaces.reference import Reference from pycatia.mec_mod_interfaces.hybrid_shape import HybridShape class HybridShapeAssemble(HybridShape): - """ .. note:: :class: toggle @@ -400,6 +400,34 @@ def get_federation_propagation(self) -> int: """ return self.hybrid_shape_assemble.GetFederationPropagation() + def get_healing_mode(self) -> bool: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetHealingMode() As boolean + | Gets the healing mode for merged cells. + | + | Parameters: + | + | oHeal + | True = merged cells are healed, False = merged cells are not healed. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.hybrid_shape_assemble.GetHealingMode() + def get_manifold(self) -> bool: """ .. note:: @@ -764,6 +792,35 @@ def set_federation_propagation(self, i_mode: int) -> None: """ return self.hybrid_shape_assemble.SetFederationPropagation(i_mode) + def set_healing_mode(self, i_heal: bool) -> None: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetHealingMode(boolean iHeal) + | Sets the healing mode for merged cells. + | + | Parameters: + | + | iHeal + | True = merged cells are healed, False = merged cells are not healed. + + :param bool i_heal: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.hybrid_shape_assemble.SetHealingMode(i_heal) + def set_manifold(self, i_manifold: bool) -> None: """ .. note:: @@ -901,4 +958,4 @@ def set_tangency_continuity(self, i_tangency_continuity: bool) -> None: # # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object]) def __repr__(self): - return f'HybridShapeAssemble(name="{ self.name }")' + return f'HybridShapeAssemble(name="{self.name}")' diff --git a/pycatia/hybrid_shape_interfaces/hybrid_shape_revol.py b/pycatia/hybrid_shape_interfaces/hybrid_shape_revol.py index ceeb03cd..18940a2e 100644 --- a/pycatia/hybrid_shape_interfaces/hybrid_shape_revol.py +++ b/pycatia/hybrid_shape_interfaces/hybrid_shape_revol.py @@ -8,6 +8,7 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.in_interfaces.reference import Reference from pycatia.knowledge_interfaces.angle import Angle @@ -112,6 +113,44 @@ def begin_angle(self) -> Angle: return Angle(self.hybrid_shape_revol.BeginAngle) + @property + def begin_angle_offset(self) -> float: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property BeginAngleOffset() As double + | Gets/Sets the first angle offset value of first upto + | element. + | + | Parameters: + | + | oAng1 + | first angle offset value. + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.hybrid_shape_revol.BeginAngleOffset + + @begin_angle_offset.setter + def begin_angle_offset(self, value: float): + """ + :param float value: + """ + + self.hybrid_shape_revol.BeginAngleOffset = value + @property def context(self) -> int: """ @@ -180,6 +219,44 @@ def end_angle(self) -> Angle: return Angle(self.hybrid_shape_revol.EndAngle) + @property + def end_angle_offset(self) -> float: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property EndAngleOffset() As double + | Gets/Sets the second angle offset value of second upto + | element. + | + | Parameters: + | + | oAng2 + | second angle offset value. + + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.hybrid_shape_revol.EndAngleOffset + + @end_angle_offset.setter + def end_angle_offset(self, value: float): + """ + :param float value: + """ + + self.hybrid_shape_revol.EndAngleOffset = value + @property def first_limit_type(self) -> int: """ diff --git a/pycatia/hybrid_shape_interfaces/hybrid_shape_unfold.py b/pycatia/hybrid_shape_interfaces/hybrid_shape_unfold.py index 030688ea..f40863bd 100644 --- a/pycatia/hybrid_shape_interfaces/hybrid_shape_unfold.py +++ b/pycatia/hybrid_shape_interfaces/hybrid_shape_unfold.py @@ -8,7 +8,9 @@ and thus help debugging in pycatia. """ +import inspect +from pycatia.hybrid_shape_interfaces.hybrid_shape_direction import HybridShapeDirection from pycatia.in_interfaces.reference import Reference from pycatia.mec_mod_interfaces.hybrid_shape import HybridShape @@ -178,6 +180,52 @@ def surface_type(self, value: int): self.hybrid_shape_unfold.SurfaceType = value + @property + def target_direction(self) -> HybridShapeDirection: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property TargetDirection() As HybridShapeDirection + | Role: Retrieves target direction on the object. + | + | Parameters: + | + | oDir + | return value for CATScript applications, with (IDLRETVAL) function + | type + | + | See also: + | HybridShapeDirection + | Returns: + | HRESULT S_OK if Ok E_FAIL else return error code for C++ + | Implementations + | See also: + | HybridShapeFactory + + :rtype: HybridShapeDirection + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return HybridShapeDirection(self.hybrid_shape_unfold.TargetDirection) + + @target_direction.setter + def target_direction(self, value: HybridShapeDirection): + """ + :param HybridShapeDirection value: + """ + + self.hybrid_shape_unfold.TargetDirection = value + @property def target_orientation_mode(self) -> int: """ @@ -212,6 +260,52 @@ def target_orientation_mode(self, value: int): self.hybrid_shape_unfold.TargetOrientationMode = value + @property + def target_origin(self) -> Reference: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property TargetOrigin() As Reference + | Role: Retrieves target origin on the object. + | + | Parameters: + | + | oElem + | return value for CATScript applications, with (IDLRETVAL) function + | type + | + | See also: + | Reference + | Returns: + | HRESULT S_OK if Ok E_FAIL else return error code for C++ + | Implementations + | See also: + | HybridShapeFactory + + :rtype: Reference + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return Reference(self.hybrid_shape_unfold.TargetOrigin) + + @target_origin.setter + def target_origin(self, value: Reference): + """ + :param Reference value: + """ + + self.hybrid_shape_unfold.TargetOrigin = value + @property def target_plane(self) -> Reference: """ diff --git a/pycatia/in_interfaces/application.py b/pycatia/in_interfaces/application.py index 3acf4862..87534f2d 100644 --- a/pycatia/in_interfaces/application.py +++ b/pycatia/in_interfaces/application.py @@ -1,5 +1,6 @@ #! /usr/bin/python3.9 # module initially auto generated using V5Automation.chm from CATIA R25 +import inspect from pywintypes import com_error @@ -914,6 +915,31 @@ def windows(self) -> Windows: return Windows(self.com_object.Windows) + def begin_ur_concatenation(self) -> None: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub BeginURConcatenation() + | Start to concatenate the undo steps created during the following code. + | Using this API will launch a dummy command in order to close all current model + | transaction. This is to avoid to left the model in an unconsitent state. + + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.application.BeginURConcatenation() + def create_send_to(self) -> SendToService: """ .. note:: @@ -1262,5 +1288,35 @@ def start_workbench(self, iworkbench_id: str) -> None: """ return self.com_object.StartWorkbench(iworkbench_id) + def stop_ur_concatenation(self, i_undo_step_name_bstr: str) -> None: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub StopURConcatenation(CATBSTR iUndoStepNameBSTR) + | Concatenate all the undo steps created since the start + | call. + | + | Parameters: + | + | iUndoStepNameBSTR + | Name of the undo step that will be created + + :param str i_undo_step_name_bstr: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.application.StopURConcatenation(i_undo_step_name_bstr) + def __repr__(self): return f'Application(name="{self.name}")' diff --git a/pycatia/in_interfaces/visualization_setting_att.py b/pycatia/in_interfaces/visualization_setting_att.py index 8c7304ce..8a559f04 100644 --- a/pycatia/in_interfaces/visualization_setting_att.py +++ b/pycatia/in_interfaces/visualization_setting_att.py @@ -8,6 +8,7 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.system_interfaces.setting_controller import SettingController @@ -1262,6 +1263,38 @@ def picking_window_size(self, value: int): self.visualization_setting_att.PickingWindowSize = value + @property + def pre_sel_navigator_started_by_arrow_keys(self) -> bool: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property PreSelNavigatorStartedByArrowKeys() As boolean + | Returns the PreSelNavigatorStartedByArrowKeys parameter. + + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.visualization_setting_att.PreSelNavigatorStartedByArrowKeys + + @pre_sel_navigator_started_by_arrow_keys.setter + def pre_sel_navigator_started_by_arrow_keys(self, value: bool): + """ + :param bool value: + """ + + self.visualization_setting_att.PreSelNavigatorStartedByArrowKeys = value + @property def pre_selection_mode(self) -> bool: """ @@ -2852,6 +2885,34 @@ def get_picking_window_size_info(self, io_admin_level: str, io_locked: str) -> b """ return self.visualization_setting_att.GetPickingWindowSizeInfo(io_admin_level, io_locked) + def get_pre_sel_navigator_started_by_arrow_keys_info(self, io_admin_level: str, io_locked: str) -> bool: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetPreSelNavigatorStartedByArrowKeysInfo(CATBSTR ioAdminLevel,CATBSTR + | ioLocked) As boolean + | Retrieves information about the PreSelNavigatorStartedByArrowKeys setting + | parameter. + | Refer to SettingController for a detailed description. + + :param str io_admin_level: + :param str io_locked: + :rtype: bool + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.visualization_setting_att.GetPreSelNavigatorStartedByArrowKeysInfo(io_admin_level, io_locked) + def get_pre_selection_mode_info(self, io_admin_level: str, io_locked: str) -> bool: """ .. note:: @@ -5235,6 +5296,32 @@ def set_picking_window_size_lock(self, i_locked: bool) -> None: # # system_service = self.application.system_service # # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object]) + def set_pre_sel_navigator_started_by_arrow_keys_lock(self, i_locked: bool) -> None: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub SetPreSelNavigatorStartedByArrowKeysLock(boolean iLocked) + | Locks or unlocks the PreSelNavigatorStartedByArrowKeys setting + | parameter. + | Refer to SettingController for a detailed description. + + :param bool i_locked: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.visualization_setting_att.SetPreSelNavigatorStartedByArrowKeysLock(i_locked) + def set_pre_selection_mode_lock(self, i_locked: bool) -> None: """ .. note:: diff --git a/pycatia/manufacturing_interfaces/manufacturing_activity_tool_path.py b/pycatia/manufacturing_interfaces/manufacturing_activity_tool_path.py new file mode 100644 index 00000000..c5f79538 --- /dev/null +++ b/pycatia/manufacturing_interfaces/manufacturing_activity_tool_path.py @@ -0,0 +1,65 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.system_interfaces.any_object import AnyObject + + +class ManufacturingActivityToolPath(AnyObject): + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | ManufacturingActivityToolPath + | + | Interface to compute the tool path of an activity. + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.manufacturing_activity_tool_path = com_object + + def compute_and_set_tool_path(self) -> None: + """ + + Introduced in V5-6R2019. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub ComputeAndSetToolPath() + | Compute and set Tool Path for this operation + + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 29, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.manufacturing_activity_tool_path.ComputeAndSetToolPath() + + def __repr__(self): + return f'ManufacturingActivityToolPath(name="{self.name}")' diff --git a/pycatia/manufacturing_interfaces/manufacturing_compute_pma_parameters.py b/pycatia/manufacturing_interfaces/manufacturing_compute_pma_parameters.py new file mode 100644 index 00000000..6771a156 --- /dev/null +++ b/pycatia/manufacturing_interfaces/manufacturing_compute_pma_parameters.py @@ -0,0 +1,103 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.system_interfaces.any_object import AnyObject + + +class ManufacturingComputePmaParameters(AnyObject): + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | ManufacturingComputePMAParameters + | + | Interface to compute and get PMA Parameters: - MfgMinimumCornerRadius - + | MfgMinimumChannelWidth - MfgMaximumChannelWidth - Depth - MfgBottomFilletRadius + | - BottomColor + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.manufacturing_compute_pma_parameters = com_object + + def compute_parameters(self) -> None: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub ComputeParameters() + | This function computes the PMA parameters and stores for 2DMA + | feature + | + | Returns: + | S_OK or E_FAIL + + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.manufacturing_compute_pma_parameters.ComputeParameters() + + def get_parameter_double_value(self, i_name: str) -> float: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetParameterDoubleValue(CATBSTR iName) As double + | Get double parameter + | + | Parameters: + | + | return + | double value + | + | Returns: + | S_OK or E_FAIL + + :param str i_name: + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.manufacturing_compute_pma_parameters.GetParameterDoubleValue(i_name) + + def __repr__(self): + return f'ManufacturingComputePmaParameters(name="{self.name}")' diff --git a/pycatia/manufacturing_interfaces/manufacturing_feature_factory.py b/pycatia/manufacturing_interfaces/manufacturing_feature_factory.py new file mode 100644 index 00000000..78d20f12 --- /dev/null +++ b/pycatia/manufacturing_interfaces/manufacturing_feature_factory.py @@ -0,0 +1,76 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.system_interfaces.any_object import AnyObject + + +class ManufacturingFeatureFactory(AnyObject): + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | ManufacturingFeatureFactory + | + | Interface dedicated to machining features creation. + | Role: This interface is used to create new machining features. + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.manufacturing_feature_factory = com_object + + def create_machining_feature(self, i_type: str) -> AnyObject: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func CreateMachiningFeature(CATBSTR iType) As AnyObject + | Creates a new machining feature. + | + | Parameters: + | + | iType + | The type of feature (ex: MfgInstructionSet, MfgOffsetPosition) + | + | + | Returns: + | The created machining feature + + :param str i_type: + :rtype: AnyObject + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return AnyObject(self.manufacturing_feature_factory.CreateMachiningFeature(i_type)) + + def __repr__(self): + return f'ManufacturingFeatureFactory(name="{self.name}")' diff --git a/pycatia/manufacturing_interfaces/manufacturing_machinable_area_mngt.py b/pycatia/manufacturing_interfaces/manufacturing_machinable_area_mngt.py new file mode 100644 index 00000000..1937f806 --- /dev/null +++ b/pycatia/manufacturing_interfaces/manufacturing_machinable_area_mngt.py @@ -0,0 +1,72 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.system_interfaces.any_object import AnyObject + + +class ManufacturingMachinableAreaMngt(AnyObject): + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | ManufacturingMachinableAreaMngt + | + | Interface dedicated to machinable area feature managment. + | Role: This interface delivers services on machinable area + | features + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.manufacturing_machinable_area_mngt = com_object + + def get_all_datas(self) -> tuple: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetAllDatas() As CATSafeArrayVariant + | Gets all the data in the Manufacturing Machinable Feature. + | + | Parameters: + | + | oDatas + | The list of data + + :rtype: tuple + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.manufacturing_machinable_area_mngt.GetAllDatas() + + def __repr__(self): + return f'ManufacturingMachinableAreaMngt(name="{self.name}")' diff --git a/pycatia/manufacturing_interfaces/manufacturing_parameter.py b/pycatia/manufacturing_interfaces/manufacturing_parameter.py new file mode 100644 index 00000000..e03f617c --- /dev/null +++ b/pycatia/manufacturing_interfaces/manufacturing_parameter.py @@ -0,0 +1,207 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.knowledge_interfaces.parameter import Parameter +from pycatia.system_interfaces.any_object import AnyObject + + +class ManufacturingParameter(AnyObject): + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | ManufacturingParameter + | + | This interface is used to handle with Enumeration Parameters for + | Manufacturing + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.manufacturing_parameter = com_object + + def get_bool_value(self, i_name: str, o_value: bool) -> None: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub GetBoolValue(CATBSTR iName,boolean oValue) + | Get boolean value of parameter + | + | Parameters: + | + | iName + | The name of the parameter + | oValue + | The boolean value + + :param str i_name: + :param bool o_value: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.manufacturing_parameter.GetBoolValue(i_name, o_value) + + def get_double_value(self, i_name: str, o_value: float, i_unit: int) -> None: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub GetDoubleValue(CATBSTR iName,double oValue,long iUnit) + | Get double value of parameter + | + | Parameters: + | + | iName + | The name of the parameter + | oValue + | The double value + | iUnit + | The unit value (default: 0) + + :param str i_name: + :param float o_value: + :param int i_unit: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.manufacturing_parameter.GetDoubleValue(i_name, o_value, i_unit) + + def get_long_value(self, i_name: str, o_value: int) -> None: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub GetLongValue(CATBSTR iName,long oValue) + | Get integer value of parameter + | + | Parameters: + | + | iName + | The name of the parameter + | oValue + | The double value + + :param str i_name: + :param int o_value: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.manufacturing_parameter.GetLongValue(i_name, o_value) + + def get_string_value(self, i_name: str, o_value: str) -> None: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub GetStringValue(CATBSTR iName,CATBSTR oValue) + | Get string value of parameter + | + | Parameters: + | + | iName + | The name of the parameter + | oValue + | The string value + + :param str i_name: + :param str o_value: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.manufacturing_parameter.GetStringValue(i_name, o_value) + + def get_value(self, i_name: str, o_value: Parameter) -> None: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub GetValue(CATBSTR iName,Parameter oValue) + | Get CATICkeParm value of parameter + | + | Parameters: + | + | iName + | The name of the parameter + | oValue + | The CATICkeParm value + + :param str i_name: + :param Parameter o_value: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.manufacturing_parameter.GetValue(i_name, o_value.com_object) + + def __repr__(self): + return f'ManufacturingParameter(name="{self.name}")' diff --git a/pycatia/manufacturing_interfaces/manufacturing_program2.py b/pycatia/manufacturing_interfaces/manufacturing_program2.py new file mode 100644 index 00000000..8ebec1be --- /dev/null +++ b/pycatia/manufacturing_interfaces/manufacturing_program2.py @@ -0,0 +1,140 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.manufacturing_interfaces.manufacturing_operation import ManufacturingOperation +from pycatia.system_interfaces.any_object import AnyObject + + +class ManufacturingProgram2(AnyObject): + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | ManufacturingProgram2 + | + | A ManufacturingProgram for a Manufacturing Document. + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.manufacturing_program2 = com_object + + def append_operation_after( + self, + i_manufacturing_operation: ManufacturingOperation, + type_: str, + auto_sequence: int) -> ManufacturingOperation: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func AppendOperationAfter(ManufacturingOperation + | iManufacturingOperation,CATBSTR type,short AutoSequence) As + | ManufacturingOperation + | Create and Insert a Manufacturing Operation of a specified type after the + | existing operation. + | if AutoSequence is set to 1, the new operation will be sequenced in the + | Program. + | + | Example: + | The following example creates, inserts and sequences + | in firstProgram the manufacturing operation ManufacturingOperation + | of type : type + | + | Set ManufacturingOperation = firstProgram.AppendOperationAfter(operation,Type,1) + + :param ManufacturingOperation i_manufacturing_operation: + :param str type_: + :param int auto_sequence: + :rtype: ManufacturingOperation + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return ManufacturingOperation( + self.manufacturing_program2.AppendOperationAfter( + i_manufacturing_operation.com_object, + type_, + auto_sequence + ) + ) + + def append_operation_before( + self, + i_manufacturing_operation: ManufacturingOperation, + type_: str, + auto_sequence: int + ) -> ManufacturingOperation: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func AppendOperationBefore(ManufacturingOperation + | iManufacturingOperation,CATBSTR type,short AutoSequence) As + | ManufacturingOperation + | Create and Insert a Manufacturing Operation of a specified type before the + | existing operation. + | if AutoSequence is set to 1, the new operation will be sequenced in the + | Program. + | + | Example: + | The following example creates, inserts and sequences + | in firstProgram the manufacturing operation ManufacturingOperation + | of type : type + | + | Set ManufacturingOperation = firstProgram.AppendOperationBefore(operation,Type,1) + + :param ManufacturingOperation i_manufacturing_operation: + :param str type_: + :param int auto_sequence: + :rtype: ManufacturingOperation + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return ManufacturingOperation( + self.manufacturing_program2.AppendOperationBefore( + i_manufacturing_operation.com_object, + type_, + auto_sequence + ) + ) + + def __repr__(self): + return f'ManufacturingProgram2(name="{self.name}")' diff --git a/pycatia/mec_mod_interfaces/part_services.py b/pycatia/mec_mod_interfaces/part_services.py new file mode 100644 index 00000000..e100554c --- /dev/null +++ b/pycatia/mec_mod_interfaces/part_services.py @@ -0,0 +1,167 @@ +#! usr/bin/python3.9 +""" + Module initially auto generated using V5Automation files from CATIA V5 R31 on 2024-08-20 16:04:57.203445 + + .. warning:: + The notes denoted "CAA V5 Visual Basic Help" are to be used as reference only. + They are there as a guide as to how the visual basic / catscript functions work + and thus help debugging in pycatia. + +""" +import inspect + +from pycatia.in_interfaces.references import References +from pycatia.system_interfaces.any_object import AnyObject + + +class PartServices(AnyObject): + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + + | System.IUnknown + | System.IDispatch + | System.CATBaseUnknown + | System.CATBaseDispatch + | System.AnyObject + | PartServices + | + | The object exposes services for the part. + | + | This object is available thanks to Part Set myPart = CATIA.ActiveDocument.Part ' Get Service Object by querying on part - extension of CATIA Base Set partServices = myPart.GetItem("CATPartServices") + | + | Example: + | + | Set part1 = CATIA.ActiveDocument.Part + | Set partServices1 = myPart.GetItem("CATPartServices") + + """ + + def __init__(self, com_object): + super().__init__(com_object) + self.part_services = com_object + + def get_near_sub_elements( + self, + i_object: AnyObject, + i_sub_element_dimension: int, + i_near_object: AnyObject + ) -> References: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetNearSubElements(AnyObject iObject,long iSubElementDimension,AnyObject + | iNearObject) As References + | Get the sub elements of a geometric object or a body that are the closest + | to a geometric object or a body. + | + | Parameters: + | + | iObject + | A geometric object or a body + | iSubElementDimension + | The dimension of sub elements wanted: 0 for vertex, 1 for edge, 2 + | for face. + | iNearObject + | A geometric object or a body to be close to + | oSubElements + | List of the sub elements of iObject (without duplicates) closest to + | iNearObject. + | + | Example: + | The following example returns the vertices of a pad that are + | the closest to a point. + | + | Set part1 = CATIA.ActiveDocument.Part + | Set bodies1 = part1.Bodies + | Set body1 = bodies1.Item("PartBody") + | Set shapes1 = body1.Shapes + | Set pad1 = shapes1.Item("Pad.1") + | Set point1 = shapes1.Item("Point.1") + | Set partServices1 = myPart.GetItem("CATPartServices") + | Set references1 = partServices1.GetSubNearElements(pad1, 0, point1) + + :param AnyObject i_object: + :param int i_sub_element_dimension: + :param AnyObject i_near_object: + :rtype: References + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return References( + self.part_services.GetNearSubElements( + i_object.com_object, + i_sub_element_dimension, + i_near_object.com_object + ) + ) + + def get_sub_elements(self, i_object: AnyObject, i_sub_element_dimension: int, i_duplicates: bool) -> References: + """ + + Introduced in V5-6R2021. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetSubElements(AnyObject iObject,long iSubElementDimension,boolean + | iDuplicates) As References + | Get the sub elements of a geometric object or a body. + | + | Parameters: + | + | iObject + | A geometric object or a body + | iSubElementDimension + | The dimension of sub elements wanted: 0 for vertex, 1 for edge, 2 + | for face. + | iDuplicates + | Allow duplicate sub elements in the list. FALSE will remove + | duplicates (same label and selecting feature). + | oSubElements + | List of the sub elements + | + | Example: + | The following example returns the vertices of a + | pad + | + | Set part1 = CATIA.ActiveDocument.Part + | Set bodies1 = part1.Bodies + | Set body1 = bodies1.Item("PartBody") + | Set shapes1 = body1.Shapes + | Set pad1 = shapes1.Item("Pad.1") + | Set partServices1 = myPart.GetItem("CATPartServices") + | Set references1 = partServices1.GetSubElements(pad1, 0, True) + + :param AnyObject i_object: + :param int i_sub_element_dimension: + :param bool i_duplicates: + :rtype: References + """ + + self.release_check( + self.application.system_configuration.release, + 31, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return References(self.part_services.GetSubElements(i_object.com_object, i_sub_element_dimension, i_duplicates)) + + def __repr__(self): + return f'PartServices(name="{self.name}")' diff --git a/pycatia/part_interfaces/const_rad_edge_fillet.py b/pycatia/part_interfaces/const_rad_edge_fillet.py index bbbfc24d..7c633a55 100644 --- a/pycatia/part_interfaces/const_rad_edge_fillet.py +++ b/pycatia/part_interfaces/const_rad_edge_fillet.py @@ -8,10 +8,13 @@ and thus help debugging in pycatia. """ +import inspect + from pycatia.in_interfaces.reference import Reference from pycatia.in_interfaces.references import References from pycatia.knowledge_interfaces.length import Length from pycatia.part_interfaces.edge_fillet import EdgeFillet +from pycatia.part_interfaces.var_rad_edge_fillet import VarRadEdgeFillet class ConstRadEdgeFillet(EdgeFillet): @@ -133,6 +136,35 @@ def add_object_to_fillet(self, i_object_to_fillet: Reference) -> None: # # system_service = self.application.system_service # # return system_service.evaluate(vba_code, 0, vba_function_name, [self.com_object]) + def switch_to_var_fillet_type(self) -> VarRadEdgeFillet: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func SwitchToVarFilletType() As VarRadEdgeFillet + | Changes the type of EdgeFillet to variable EdgeFillet and return + | it. + | + | Parameters: + | + | opVarFillet + | The opVarFillet is the variable edge fillet + + :rtype: VarRadEdgeFillet + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return VarRadEdgeFillet(self.const_rad_edge_fillet.SwitchToVarFilletType()) + def withdraw_object_to_fillet(self, i_object_to_withdraw: Reference) -> None: """ .. note:: diff --git a/pycatia/part_interfaces/hole.py b/pycatia/part_interfaces/hole.py index 6c602d31..5de26661 100644 --- a/pycatia/part_interfaces/hole.py +++ b/pycatia/part_interfaces/hole.py @@ -8,6 +8,8 @@ and thus help debugging in pycatia. """ +import inspect + from pycatia.in_interfaces.reference import Reference from pycatia.knowledge_interfaces.angle import Angle from pycatia.knowledge_interfaces.length import Length @@ -166,6 +168,50 @@ def bottom_type(self, value: int): self.hole.BottomType = value + @property + def counter_drilled_mode(self) -> int: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property CounterDrilledMode() As CatCDHoleMode + | Returns the mode of a counterdrilled hole . + | + | Returns: + | CDMode Value of the counterdrilled mode (see CatCDHoleMode for list of + | possible types) + | + | Example: + | The following example returns in CDMode the CDMode of hole + | firsthole: + | + | Set CDMode = firsthole.CounterDrilledMode + + See enumeration type: cat_cd_hole_mode + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.hole.CounterDrilledMode + + @counter_drilled_mode.setter + def counter_drilled_mode(self, value: int): + """ + :param int value: + """ + + self.hole.CounterDrilledMode = value + @property def counter_sunk_mode(self) -> int: """ diff --git a/pycatia/part_interfaces/var_rad_edge_fillet.py b/pycatia/part_interfaces/var_rad_edge_fillet.py index fa6c535c..26cc3248 100644 --- a/pycatia/part_interfaces/var_rad_edge_fillet.py +++ b/pycatia/part_interfaces/var_rad_edge_fillet.py @@ -8,12 +8,17 @@ and thus help debugging in pycatia. """ +import inspect +from typing import TYPE_CHECKING from pycatia.in_interfaces.reference import Reference from pycatia.in_interfaces.references import References from pycatia.knowledge_interfaces.length import Length from pycatia.part_interfaces.edge_fillet import EdgeFillet +if TYPE_CHECKING: + from pycatia.part_interfaces.const_rad_edge_fillet import ConstRadEdgeFillet + class VarRadEdgeFillet(EdgeFillet): """ @@ -183,6 +188,44 @@ def imposed_vertices(self) -> References: return References(self.var_rad_edge_fillet.ImposedVertices) + @property + def sharp_edge_removal_mode(self) -> int: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Property SharpEdgeRemovalMode() As short + | Returns or set the sharp edge removal mode for variable edge + | fillet. + | + | Parameters: + | + | iMode + | The mode to be used for variable edge fillet + + :rtype: int + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.var_rad_edge_fillet.SharpEdgeRemovalMode + + @sharp_edge_removal_mode.setter + def sharp_edge_removal_mode(self, value: int): + """ + :param int value: + """ + + self.var_rad_edge_fillet.SharpEdgeRemovalMode = value + def add_edge_to_fillet(self, i_edge: Reference, i_radius: float) -> None: """ .. note:: @@ -309,6 +352,36 @@ def imposed_vertex_radius(self, i_imposed_vertex: Reference) -> Length: """ return Length(self.var_rad_edge_fillet.ImposedVertexRadius(i_imposed_vertex.com_object)) + def switch_to_const_fillet_type(self) -> 'ConstRadEdgeFillet': + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func SwitchToConstFilletType() As ConstRadEdgeFillet + | Changes the type of EdgeFillet to constant EdgeFillet and return + | it. + | + | Parameters: + | + | opConstFillet + | The opConstFillet is the variable edge fillet + + :rtype: ConstRadEdgeFillet + """ + from pycatia.part_interfaces.const_rad_edge_fillet import ConstRadEdgeFillet + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return ConstRadEdgeFillet(self.var_rad_edge_fillet.SwitchToConstFilletType()) + def withdraw_edge_to_fillet(self, i_edge: Reference) -> None: """ .. note:: diff --git a/pycatia/smt_interfaces/wrappings.py b/pycatia/smt_interfaces/wrappings.py index b09ae5c7..f30c87c0 100644 --- a/pycatia/smt_interfaces/wrappings.py +++ b/pycatia/smt_interfaces/wrappings.py @@ -8,6 +8,7 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.in_interfaces.document import Document from pycatia.navigator_interfaces.group import Group @@ -222,6 +223,72 @@ def compute_a_wrapping_with_a_reference( ) ) + def compute_wrapping_with_convex_hull( + self, + i_group_of_selected_products: Group, + i_reference_product: Product, + i_accuracy: float, + i_perform_simplification: bool, + i_accuracy_for_simplification: float + ) -> Document: + """ + + Introduced in V5-6R2020. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func ComputeWrappingWithConvexHull(Group iGroupOfSelectedProducts,Product + | iReferenceProduct,double iAccuracy,boolean iPerformSimplification,double + | iAccuracyForSimplification) As Document + | Compute a wrapping using convex hull algorithm on the selected products, + | according to a reference product. + | + | Parameters: + | + | iGroupOfSelectedProducts + | The selected products to wrap. + | iReferenceProduct + | Product taken as a reference. + | iAccuracy + | The grain accuracy (accuracy value > 0 and units in mm). + | + | iPerformSimplification + | set to true for simplification and set to false for no + | simplification + | iAccuracyForSimplification + | The accuracy for the simplification (accuracy value > 0 and units + | in mm). The accuracy value is taken into account only if the @param + | iPerformSimplification is set to true. + | + | Returns: + | WrappingDocument: Document containing the result. + + :param Group i_group_of_selected_products: + :param Product i_reference_product: + :param float i_accuracy: + :param bool i_perform_simplification: + :param float i_accuracy_for_simplification: + :rtype: Document + """ + + self.release_check( + self.application.system_configuration.release, + 30, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return Document( + self.wrappings.ComputeWrappingWithConvexHull( + i_group_of_selected_products.com_object, + i_reference_product.com_object, + i_accuracy, + i_perform_simplification, + i_accuracy_for_simplification + ) + ) + def wrapping_shape_name(self) -> str: """ .. note:: diff --git a/pycatia/space_analyses_interfaces/measurable.py b/pycatia/space_analyses_interfaces/measurable.py index c68bbd27..b279d101 100644 --- a/pycatia/space_analyses_interfaces/measurable.py +++ b/pycatia/space_analyses_interfaces/measurable.py @@ -1,4 +1,5 @@ #! /usr/bin/python3.9 +import inspect from pycatia.in_interfaces.reference import Reference from pycatia.system_interfaces.any_object import AnyObject @@ -220,6 +221,53 @@ def get_angle_between(self, i_measured_item: Reference) -> float: return self.measurable.GetAngleBetween(i_measured_item.com_object) + def get_angle_between_in_context(self, i_measured_item: Reference, i_product_instance: AnyObject) -> float: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetAngleBetweenInContext(Reference iMeasuredItem,AnyObject + | iProductInstance) As double + | Compute the angle between the CATIAMeasurable and another with respect to + | the provided context (ProductInstance). Instantiate Measurable with method + | GetMeasurableInContext to get the correct result. + | + | Example: + | + | This example retrieves the angle between the reference1 and + | reference2. + | Dim reference1 As Reference + | Set reference1 = part1.CreateReferenceFromObject(object1) + | Dim ProductInstances As VPMInstance + | Set ProductInstances = "GetTheProductInstance" + | Dim reference2 As Reference + | Set reference2 = part1.CreateReferenceFromObject(object1) + | Dim ProductInstances2 As VPMInstance + | Set ProductInstances2 = "GetTheProductInstance" + | Dim TheSPAWorkbench As Workbench + | Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( "SPAWorkbench" ) + | Dim TheMeasurable As Measurable + | Set TheMeasurable = TheSPAWorkbench.GetMeasurable(reference1,ProductInstances) + | Dim AngleInContext As double + | AngleInContext = TheMeasurable.GetAngleBetween(reference2,ProductInstances2) + + :param Reference i_measured_item: + :param AnyObject i_product_instance: + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.measurable.GetAngleBetweenInContext(i_measured_item.com_object, i_product_instance.com_object) + def get_axis(self): """ ..note:: @@ -456,6 +504,54 @@ def get_minimum_distance(self, i_measured_item): return self.measurable.GetMinimumDistance(i_measured_item.com_object) + def get_minimum_distance_in_context(self, i_measured_item: Reference, i_product_instance: AnyObject) -> float: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetMinimumDistanceInContext(Reference iMeasuredItem,AnyObject + | iProductInstance) As double + | Compute the minimum distance between the CATIAMeasurable and another Bodies + | with respect to the provided context (ProductInstance) Instantiate Measurable + | with method GetMeasurableInContext to get the correct + | result. + | + | Example: + | + | This example retrieves the distance between the reference1 and + | reference2. + | Dim reference1 As Reference + | Set reference1 = part1.CreateReferenceFromObject(object1) + | Dim ProductInstances As VPMInstance + | Set ProductInstances = "GetTheProductInstance" + | Dim reference2 As Reference + | Set reference2 = part1.CreateReferenceFromObject(object2) + | Dim ProductInstances2 As VPMInstance + | Set ProductInstances2 = "GetTheProductInstance" + | Dim TheSPAWorkbench As Workbench + | Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( "SPAWorkbench" ) + | Dim TheMeasurable As Measurable + | Set TheMeasurable = TheSPAWorkbench.GetMeasurableInContext(reference1,ProductInstances) + | Dim MinimumDistanceInContext As double + | MinimumDistanceInContext = TheMeasurable.GetMinimumDistanceInContext(reference2,ProductInstances2) + + :param Reference i_measured_item: + :param AnyObject i_product_instance: + :rtype: float + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.measurable.GetMinimumDistanceInContext(i_measured_item.com_object, i_product_instance.com_object) + def get_minimum_distance_points(self, i_measured_item): """ .. note:: @@ -496,6 +592,65 @@ def get_minimum_distance_points(self, i_measured_item): system_service = self.application.system_service return system_service.evaluate(vba_code, 0, vba_function_name, [self.measurable, i_measured_item.com_object]) + def get_minimum_distance_points_in_context( + self, + i_measured_item: Reference, + i_product_instance: AnyObject, + o_coordinates: tuple + ) -> None: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Sub GetMinimumDistancePointsInContext(Reference iMeasuredItem,AnyObject + | iProductInstance,CATSafeArrayVariant oCoordinates) + | Compute the points corresponding to the minimum distance between the two + | references with respect to the provided context (ProductInstance). Instantiate + | Measurable with method GetMeasurableInContext to get the correct + | result. + | + | Example: + | + | This example retrieves the points corresponding to the distance + | between the reference1 and reference2. + | Dim reference1 As Reference + | Set reference1 = part1.CreateReferenceFromObject(object1) + | Dim ProductInstances As VPMInstance + | Set ProductInstances = "GetTheProductInstance" + | Dim reference2 As Reference + | Set reference2 = part1.CreateReferenceFromObject(object2) + | Dim ProductInstances2 As VPMInstance + | Set ProductInstances2 = "GetTheProductInstance" + | Dim TheSPAWorkbench As Workbench + | Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( "SPAWorkbench" ) + | Dim TheMeasurable As Measurable + | Set TheMeasurable = TheSPAWorkbench.GetMeasurableInContext(reference1,ProductInstances) + | Dim CoordinatesInContext (8) + | TheMeasurable.GetMinimumDistancePointsInContext + | reference2,ProductInstances2, CoordinatesInContext + + :param Reference i_measured_item: + :param AnyObject i_product_instance: + :param tuple o_coordinates: + :rtype: None + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return self.measurable.GetMinimumDistancePointsInContext( + i_measured_item.com_object, + i_product_instance.com_object, + o_coordinates + ) + def get_plane(self): """ .. note:: diff --git a/pycatia/space_analyses_interfaces/spa_workbench.py b/pycatia/space_analyses_interfaces/spa_workbench.py index 9f3cd138..25eb9504 100644 --- a/pycatia/space_analyses_interfaces/spa_workbench.py +++ b/pycatia/space_analyses_interfaces/spa_workbench.py @@ -8,6 +8,7 @@ and thus help debugging in pycatia. """ +import inspect from pycatia.in_interfaces.reference import Reference from pycatia.in_interfaces.workbench import Workbench @@ -16,6 +17,7 @@ from pycatia.space_analyses_interfaces.inertias import Inertias from pycatia.space_analyses_interfaces.measurable import Measurable from pycatia.space_analyses_interfaces.sections import Sections +from pycatia.system_interfaces.any_object import AnyObject class SPAWorkbench(Workbench): @@ -191,5 +193,47 @@ def get_measurable(self, i_measured_item: Reference) -> Measurable: """ return Measurable(self.spa_workbench.GetMeasurable(i_measured_item.com_object)) + def get_measurable_in_context(self, i_measured_item: Reference, i_product_instance: AnyObject) -> Measurable: + """ + + Introduced in V5-6R2018. + + .. note:: + :class: toggle + + CAA V5 Visual Basic Help (2024-08-20 16:04:57.203445) + | Func GetMeasurableInContext(Reference iMeasuredItem,AnyObject iProductInstance) + | As Measurable + | Returns the Measurable object with respect to the provided context + | (ProductInstance). + | + | Example: + | + | This example get the Measurable from the + | SPAWorkBench. + | + | Dim referenceObject As referenceObject + | Set referenceObject = "GetReference" + | Dim ProductInstances As VPMInstance + | Set ProductInstances = "GetProductInstance" + | Dim TheSPAWorkbench As Workbench + | Set TheSPAWorkbench = CATIA.ActiveDocument.GetWorkbench ( "SPAWorkbench" ) + | Dim TheMeasurable As Measurable + | Set TheMeasurable = TheSPAWorkbench.GetMeasurableInContext(referenceObject,ProductInstances) + + :param Reference i_measured_item: + :param AnyObject i_product_instance: + :rtype: Measurable + """ + + self.release_check( + self.application.system_configuration.release, + 28, + f'{self.__class__.__name__}.{inspect.stack()[0][3]}', + ) + + return Measurable( + self.spa_workbench.GetMeasurableInContext(i_measured_item.com_object, i_product_instance.com_object)) + def __repr__(self): return f'SpaWorkbench(name="{self.name}")' diff --git a/pycatia/version.py b/pycatia/version.py index 097012de..86755598 100644 --- a/pycatia/version.py +++ b/pycatia/version.py @@ -1 +1 @@ -version = "0.7.4" +version = "0.8.0" diff --git a/v5automation-autogenerated.7z b/v5automation-autogenerated.7z deleted file mode 100644 index 72c42b39..00000000 Binary files a/v5automation-autogenerated.7z and /dev/null differ