pycatia.eno_cd5_interfaces.cd5_engine¶
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-09-25 14:34:21.593357
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.
- class pycatia.eno_cd5_interfaces.cd5_engine.CD5Engine(com_object)¶
Note
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectCD5EngineRepresents the ENOVIA V6 Integration Engine, that is to say the entry point tothe CATIA/ENOVIA V6 Integration.It allows end user to realize the following operations : connection and disconnection toENOVIA V6 Integration, creation of ENOVIA V6 Integration IDs (CD5ID) and Structures (CD5Strcture),and opening of the corresponding objects in different modes.Note that all operations performed from this interface are the same asoperations available in the ENOVIA V6 menu in CATIA, unless most of them areexecuted without panel.Example:The following example indicates how to retrieve the ENOVIA V6 IntegrationEngine.Dim oCD5Engine As CD5EngineSet oCD5Engine = CATIA.GetItem(“CD5Engine”)See also:CD5ID, CD5Structure- connect(i_user_name: str, i_user_password: str, i_security_context: str) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Connect(CATBSTR iUserName,CATBSTR iUserPassword,CATBSTR iSecurityContext)Connects to ENOVIA V6. It is equivalent to launch in CATIA the commandENOVIA V6/Connect and enter the User Name/Password/SecurityContext.Parameters:iUserNameThe Login name of the end user, who wants to connect to ENOVIA V6.iUserPasswordThe associated Password of this end user.iSecurityContextThe security context the end user wants to use (if empty, the APIwill first try to connect without security context then try again with thedefault one).Throws:-1867244384 : The Document Location setting is incorrect.-1878815075 : Invalid Password.-1803748693 : Another user is already logged in.Example:The following example connects end user to ENOVIA V6 on CD5EngineoCD5Engine.The User Login is “xxx” and his associated Password“yyy”.Dim iUserName As CATBSTRiUserName = “xxx”Dim iUserPassword As CATBSTRiUserPassword = “yyy”oCD5Engine.Connect iUserName,iUserPassword,””
- Parameters:
i_user_name (str) –
i_user_password (str) –
i_security_context (str) –
- Return type:
None
- disconnect() None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Disconnect()Disconnects from ENOVIA V6. It is equivalent to launch in CATIA the commandENOVIA V6/Disconnect.Example:The following example disconnects end user from ENOVIA V6 Integrationon CD5Engine oCD5Engine.oCD5Engine.Disconnect
- Return type:
None
- property expand_mode: str¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property ExpandMode() As CATBSTRReturns (gets) or sets the value of the Open option “Expand Mode”. Thedefault value is set in the user’s Preferences.Throws:-1641847650 : Connection to ENOVIA V6 is necessary to intialize this option.Example:The following example sets Expand Mode to LatestVersion, thendisplays it.oCD5Engine.ExpandMode = “LatestVersion”MsgBox oCD5Engine.ExpandMode
- Return type:
str
- get_id_from_tnr(i_type: str, i_name: str, i_revision: str) CD5ID ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetIDFromTNR(CATBSTR iType,CATBSTR iName,CATBSTR iRevision) As CD5IDCreates a ENOVIA V6 Integration ID (CD5ID) from a Major Object thanks toits Type, Name and Revision.Parameters:iTypeThe type of the ENOVIA V6 Object.iNameThe name of the ENOVIA V6 Object.iRevisionThe revision of the ENOVIA V6 Object.Returns:The created CD5ID.Example:The following example creates a CD5ID from the major object“MyProduct” of Type “CATProduct For Team” and Revision “—” on CD5EngineoCD5Engine.Dim oCD5ID As CD5IDSet oCD5ID = oCD5Engine.GetIDFromTNR(“CATProduct For Team”, “MyProduct”, “—“)
- Parameters:
i_type (str) –
i_name (str) –
i_revision (str) –
- Return type:
- get_id_from_tnrv(i_type: str, i_name: str, i_revision: str, i_version: str) CD5ID ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetIDFromTNRV(CATBSTR iType,CATBSTR iName,CATBSTR iRevision,CATBSTR iVersion) As CD5IDCreates a ENOVIA V6 Integration ID (CD5ID) from a Minor Object thanks toits Type, Name, Revision and Version.Parameters:iTypeThe type of the ENOVIA V6 Object.iNameThe name of the ENOVIA V6 Object.iRevisionThe revision of the ENOVIA V6 Object.iVersionThe version of the ENOVIA V6 Object.Returns:The created CD5ID.Example:The following example creates a CD5ID from the minor object“MyProduct” of Type “CATProduct For Team”, Revision “—” and Version “0” onCD5Engine oCD5Engine.Dim oCD5ID As CD5IDSet oCD5ID = oCD5Engine.GetIDFromTNRV(“CATProduct For Team”, “MyProduct”, “—”, “0”)
- Parameters:
i_type (str) –
i_name (str) –
i_revision (str) –
i_version (str) –
- Return type:
- get_structure(i_cd5_id: CD5ID) CD5Structure ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetStructure(CD5ID iCD5ID) As CD5StructureCreates a Structure from a ENOVIA V6 Object identified by its CD5ID, in thepurpose of a future Partial Open.Parameters:iCD5IDThe CD5ID of the ENOVIA V6 Object, candidate for a partial open.Returns:The created CD5Structure.Example:The following example creates a CD5Structure from the CD5ID of anobject on CD5Engine oCD5Engine.Dim iCD5ID As CD5IDSet iCD5ID = oCD5Engine.GetIDFromTNR(“CATProduct For Team”, “MyProduct”, “—“)Dim oCD5Structure As CD5StructureSet oCD5Structure = oCD5Engine.GetStructure(iCD5ID)
- Parameters:
i_cd5_id (CD5ID) –
- Return type:
- property include_all_children: bool¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property IncludeAllChildren() As booleanReturns (gets) or sets the value of the Open option “Open With”. Thedefault value is False, means Required Children.Example:The following example sets Open With to AllChildren.oCD5Engine.IncludeAllChildren = True
- Return type:
bool
- interactive_open(i_cd5_id: CD5ID) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub InteractiveOpen(CD5ID iCD5ID)Launches the Interactive ENOVIA V6 Open Command and performs the searchwith the input CD5ID.Parameters:iCD5IDThe ENOVIA V6 ID of the Object to open in CATIA.Throws:-1697450280 : CATIA is not connected to ENOVIA V6.Example:The following example launches the interactive ENOVIA V6 Open Commandon CD5Engine oCD5Engine, with the following searchcriteria:Type : “CATProduct For Team”.Name : “MyProduct”.Revision : “—“.Dim myCD5ID As CD5IDSet myCD5ID = oCD5Engine.GetIDFromTNR(“CATProduct For Team”, “MyProduct”, “—“)oCD5Engine.InteractiveOpen(myCD5ID)
- Parameters:
i_cd5_id (CD5ID) –
- Return type:
None
- is_connected() bool ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func IsConnected() As booleanReturns if end user is connected to ENOVIA V6 (True) or not(False).Example:The following example tests if end user is connected to ENOVIA V6Integration on CD5Engine oCD5Engine.A MsgBox with the connection status will appear to the enduser.If end user is connected, the MsgBox will contain “Connected”, else itwill contain “Not Connected”.If oCD5Engine.IsConnected ThenMsgBox “Connected”ElseMsgBox “Not Connected”End If
- Return type:
bool
- open(i_cd5_id: CD5ID) Document ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func Open(CD5ID iCD5ID) As DocumentOpens a ENOVIA V6 Object in CATIA thanks to its previously created CD5ID,and returns the created Document.Parameters:iCD5IDThe ENOVIA V6 ID of the Object to open in CATIA.Returns:The created Document.Throws:-1697450280 : CATIA is not connected to ENOVIA V6.-1871171370 : Failed to get details of design objects.Example:The following example opens an ENOVIA V6 Object in CATIA from itsCD5ID on CD5Engine oCD5Engine.Dim myCD5ID As CD5IDSet myCD5ID = oCD5Engine.GetIDFromTNRV(“CATProduct For Team”, “MyProduct”, “—”, “0”)Dim oDocument As DocumentSet oDocument = oCD5Engine.Open(myCD5ID)
- partial_open(i_cd5_structure: CD5Structure) Document ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func PartialOpen(CD5Structure iCD5Structure) As DocumentOpens partially a ENOVIA V6 Object in CATIA thanks to its previouslycreated CD5Structure, and returns the created Document.Parameters:iCD5StructureThe Structure of the Object to open in CATIA.Returns:The created Document.Throws:-1697450280 : CATIA is not connected to ENOVIA V6.-1871171370 : Failed to get details of design objects.Example:The following example opens partially the ENOVIA V6 Object“RootProduct” and its subproduct “DummyProduct” in CATIA on CD5EngineoCD5Engine.Dim iRootCD5ID As CD5IDSet iRootCD5ID = oCD5Engine.GetIDFromTNR(“CATProduct For Team”, “RootProduct”, “—“)Dim iSubCD5ID As CD5IDSet iSubCD5ID = oCD5Engine.GetIDFromTNR(“CATProduct For Team”, “SubProduct”, “—“)Dim iCD5Structure As CD5StructureSet iCD5Structure = oCD5Engine.GetStructure(iRootCD5ID)iCD5Structure.Include(iDummyCD5ID)Dim oDocument As DocumentSet oDocument = oCD5Engine.PartialOpen(iCD5Structure)
- Parameters:
i_cd5_structure (CD5Structure) –
- Return type:
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property RelatedDesigns() As CATBSTRReturns (gets) or sets the value of the Open option “Related Designs”. Thedefault value is set in the user’s Preferences.Throws:-1641847650 : Connection to ENOVIA V6 is necessary to intialize this option.Example:The following example sets Related Designs to Associated Drawings,then displays it.oCD5Engine.RelatedDesigns = “Associated Drawings”MsgBox oCD5Engine.RelatedDesigns
- Return type:
str