pycatia.cat_smarteam_integ_interfaces.sti_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.cat_smarteam_integ_interfaces.sti_engine.StiEngine(com_object)¶
Note
CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.AnyObjectStiEngineRepresents the SmarTeam Integration Engine, that is to say the entry point tothe CATIA/SmarTeam Integration.It allows end user to realize the following operations (also called StiEnginemethods): connection and disconnection to SmarTeam Integration, creation ofSmarTeam Integration Objects (StiDBItem) and management of their lifecycle(Save, Check In, Check Out, Release, New Release, …).Note that all operations performed from this interface are the same asoperations available and launched from the SmarTeam menu inCATIA.Warning: By Default, these operations launched from this interface are executedWithout Panel.Example:The following example indicates how to retrieve the SmarTeam IntegrationEngine.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)See also:StiDBItem- build_doc_db_item_from_smar_team_id(iobject_id: int, iclass_id: int) StiDBItem ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func BuildDocDBItemFromSmarTeamID(long iobjectId,short iclassId) As StiDBItemCopys the SmarTeam object -and its children- to default Work directory,opens it into CATIA session and returns the correspondingCATIAStiDBItem.Note that this method is always executed Without any GUI and is so totallyindependent of the value returned by ‘UseGraphicalUI’.Parameters:iobjectIdThis input corresponds to the Object ID of the required SmarTeamobject.iclassIdThis input corresponds to the Class ID of the required SmarTeamobject.Returns:This output corresponds to the retrieved CATIAStiDBItem.Example:The following example retrieves a loaded document corresponding to aSmarTeam ID {Object ID, Class ID}.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim iobjectId As longiobjectId = 963Dim iclassId As shorticlassId = 57Dim oStiDBItem As StiDBItemSet oStiDBItem = oStiEngine.BuildDocDBItemFromSmarTeamID iobjectId, iclassId
- Parameters:
iobject_id (int) –
iclass_id (int) –
- Return type:
- build_file_db_item_from_smar_team_id(iobject_id: int, iclass_id: int) StiDBItem ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func BuildFileDBItemFromSmarTeamID(long iobjectId,short iclassId) As StiDBItemCopys the SmarTeam object -and its children- to default Work directory andreturns the corresponding CATIAStiDBItem, Without opening the file into CATIAsession.Note that this method is always executed Without any GUI and is so totallyindependent of the value returned by ‘UseGraphicalUI’.Parameters:iobjectIdThis input corresponds to the Object ID of the required SmarTeamobject.iclassIdThis input corresponds to the Class ID of the required SmarTeamobject.Returns:This output corresponds to the retrieved CATIAStiDBItem.Example:The following example retrieves a loaded document corresponding to aSmarTeam ID {Object ID, Class ID}.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim iobjectId As longiobjectId = 963Dim iclassId As shorticlassId = 57Dim oStiDBItem As StiDBItemSet oStiDBItem = oStiEngine.BuildFileDBItemFromSmarTeamID iobjectId, iclassId
- Parameters:
iobject_id (int) –
iclass_id (int) –
- Return type:
- connect(i_user_login: str, i_user_password: str) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Connect(CATBSTR iUserLogin,CATBSTR iUserPassword)Connects to SmarTeam Integration.This connection to SmarTeam Integration is equivalent to launch in CATIAthe command SmarTeam/Connect.Note that this method is totally independent of the value returned by‘UseGraphicalUI’ and that the ‘SmarTeam User Login’ panel (dedicated connectionpanel) may be displayed.Parameters:iUserLoginThis input corresponds to the Login name of the end user, who wantsto connect to SmarTeam Integration.iUserPasswordThis input corresponds to the associated Password of this enduser.Note that when ‘iUserLogin’ is EMPTY, the ‘SmarTeam User Login’panel is displayed and the end user has to login himself. Note that‘iUserPassword’ is taken into account if and only if ‘iUserLogin’ is NOT empty.Example:****** Connection With ‘iUserLogin’ & ‘iUserPassword’******The following example connects end user to SmarTeam database onStiEngine oStiEngine Without displaying‘SmarTeam User Login’ panel. The User Login is “xxx” and hisassociated Password “yyy”.Note that User Login and Password should NOT be EMPTY. Otherwise the‘SmarTeam User Login’ panel will be displayed.If User Login or Password are NOT correct, the connectionfailed.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim iUserLogin As CATBSTRiUserLogin = “xxx”Dim iUserPassword As CATBSTRiUserPassword = “yyy”oStiEngine.Connect iUserLogin,iUserPassword****** Connection Without ‘iUserLogin’ & ‘iUserPassword’******The following example connects end user to SmarTeam database onstiEngine oStiEngine With ‘SmarTeam User Login’ panel.The end user will have to type his Login and his Password in thededicated panel.Note that if the User Login and his Password are specified, the‘SmarTeam User Login’ panel will NOT be displayed.If the end user only specifies his Login or if User Login and/orPassword are NOT correct, the connection failed.In these cases, the ‘SmarTeam User Login’ panel will NOT bedisplayed.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)oStiEngine.Connect “”,””
- Parameters:
i_user_login (str) –
i_user_password (str) –
- Return type:
None
- disconnect() None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Disconnect()Disconnects to SmarTeam Integration.This disconnection to SmarTeam Integration is equivalent to launch in CATIAthe command SmarTeam/Disconnect.Note that this method is always executed Without any GUI and is so totallyindependent of the value returned by ‘UseGraphicalUI’.Example:The following example disconnects end user to SmarTeam database onStiEngine oStiEngine.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)oStiEngine.Connect “”,””(…)oStiEngine.Disconnect
- Return type:
None
- get_smarteam_class_id(i_sti_db_item: StiDBItem) int ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetSMARTEAMClassID(StiDBItem iStiDBItem) As shortReturns the Class Identifier of a SmarTeam Integration ObjectCATIAStiDBItem -at least saved in SmarTeam.Note that the Class Identifier is unique for each Class defined in SmarTeamData Model. This data is so linked to the current DataBase, that is to say Withthe SmarTeam Release (RXX).Note that this method is always executed Without any GUI and is so totallyindependent of the value returned by ‘UseGraphicalUI’.Parameters:iStiDBItemThis input corresponds to the CATIAStiDBItem.Returns:This output corresponds to the retrieved Class Identifier of theCATIAStiDBItem.Example:The following example returns in oClassId the Class Identifier of theCATIAStiDBItem oStiDBItem.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)‘ Retrieve the Current Activated Product DocumentDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject(productDocument01)Dim oClassId As shortoClassId = oStiEngine.GetSMARTEAMClassID(iStiDBItem)
- Parameters:
i_sti_db_item (StiDBItem) –
- Return type:
int
- get_smarteam_object_id(i_sti_db_item: StiDBItem) int ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetSMARTEAMObjectID(StiDBItem iStiDBItem) As longReturns the Object Identifier of a SmarTeam Integration ObjectCATIAStiDBItem -at least saved in SmarTeam.This data is linked to the current DataBase, that is to say to the SmarTeamRelease (RXX).Note that this method is always executed Without any GUI and is so totallyindependent of the value returned by ‘UseGraphicalUI’.Parameters:iStiDBItemThis input corresponds to the CATIAStiDBItem.Returns:This output corresponds to the retrieved Object Identifier of theCATIAStiDBItem.Example:The following example returns in oObjectId the Object Identifier ofthe CATIAStiDBItem oStiDBItem.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)‘ Retrieve the Current Activated Product DocumentDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject(productDocument01)Dim oObjectId As longoObjectId = oStiEngine.GetSMARTEAMObjectID(iStiDBItem)
- Parameters:
i_sti_db_item (StiDBItem) –
- Return type:
int
- get_sti_db_item_from_any_object(i_any_object: AnyObject) StiDBItem ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetStiDBItemFromAnyObject(AnyObject iAnyObject) AsStiDBItemReturns the SmarTeam Integration Object CATIAStiDBItem from an AnyObjectobject.This method is useful to convert whatever CATIA V5 Object to aCATIAStiDBItem.Note that this method is always executed Without any GUI and is so totallyindependent of the value returned by ‘UseGraphicalUI’.Parameters:iAnyObjectThis input corresponds to a CATIA V5 Object. It must be a Document,a Product, a Part or a DrawingSheet.Returns:This output corresponds to the retrieved CATIAStiDBItem.Example:The following example returns in oStiDBItem the CATIAStiDBItemcorresponding to the Document iDocument.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)‘ Retrieve the Current Activated Product DocumentDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim oStiDBItem As StiDBItemSet oStiDBItem = oStiEngine.GetStiDBItemFromAnyObject(productDocument01)
- get_sti_db_item_from_catbstr(i_full_path: str) StiDBItem ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetStiDBItemFromCATBSTR(CATBSTR iFullPath) AsStiDBItemReturns the SmarTeam Integration Object CATIAStiDBItem from a FullPath.This method is useful to convert a path to a CATIAStiDBItem, that is to sayto create a SmarTeam Integration object. The programmer is then able to manageits lifecycle (that is to say to Save, Check In, Check Out, Release, NewRelease, … it).Note that this method is always executed Without any GUI and is so totallyindependent of the value returned by ‘UseGraphicalUI’.See also:CATIAStiDBItemParameters:iFullPathThis input corresponds to the Full Path of the object to retrieve.Returns:This output corresponds to the retrieved CATIAStiDBItem.Example:The following example returns in oStiDBItem the CATIAStiDBItemcorresponding to the full path.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim iFullPath As CATBSTRiFullPath = “E:/CATIAFiles/Engine.CATProduct”Dim oStiDBItem As StiDBItemSet oStiDBItem = oStiEngine.GetStiDBItemFromCATBSTR(iFullPath)
- Parameters:
i_full_path (str) –
- Return type:
- get_team_pdmurl(i_sti_db_item: StiDBItem) str ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Func GetTeamPDMURL(StiDBItem iStiDBItem) As CATBSTRReturns the Team PDM URL of a CATIAStiDBItem.Note that the Team PDM URL has the following syntax:“TeamPDM://DBExtractor?CLASSID.EQ.www.AND.OBJECTID.EQ.zzz.AND.Vers.EQ.1”The only values which are modified from a SmarTeam object to an other arethe numbers corresponding to the document “Class ID” (www) and “Object ID”(zzz).Note that this method is always executed With GUI. Indeed it returns aSmarTeam panel displaying the TEAM PDM URL. It is so totally independent of thevalue returned by ‘UseGraphicalUI’.Parameters:iStiDBItemThis input corresponds to the CATIAStiDBItem.Returns:This output corresponds to the retrieved Team PDM URL of theCATIAStiDBItem.Example:The following example returns the Team PDM URL from aCATIAStiDBItem.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim iobjectId As longiobjectId = 963Dim iclassId As shorticlassId = 57Dim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.BuildFileDBItemFromSmarTeamID iobjectId, iclassIdDim oTeamPDMURL As CATBSTRoTeamPDMURL = oStiEngine.GetTeamPDMURL iStiDBItem
- Parameters:
i_sti_db_item (StiDBItem) –
- Return type:
str
- property integration_type: str¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property IntegrationType() As CATBSTR (Read Only)Returns the Engine Integration Type.Warning: Do Not use this method. It is Not implemented.
- Return type:
str
- 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 SmarTeam Integration (True) or not(False).Note that this method is always executed Without any GUI and is so totallyindependent of the value returned by ‘UseGraphicalUI’.Example:The following example tests if end user is connected to SmarTeamIntegration on StiEngine oStiEngine.If end user is not connected, this code sample allows her/him toconnect to SmarTeam Integration by displaying the ‘SmarTeam User Login’panel.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim oIsConnected As booleanoIsConnected = oStiEngine.IsConnectedIf Not oStiEngine.IsConnected() ThenoStiEngine.ConnectEnd If
- Return type:
bool
- life_cycle_check_in(i_sti_db_item: StiDBItem) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub LifeCycleCheckIn(StiDBItem iStiDBItem)Checks the CATIAStiDBItem Into SmarTeam Check-In Vault.This LifeCycleCheckIn operation is equivalent to launch in CATIA thecommand SmarTeam/LifeCycle/CheckIn.2 cases: either the document is NEW (that is to say already saved inSmarTeam) or the document is being Modified (Checked-Out) and is removed backinto the vault.Note that this method should be executed With GUI and is so totallydependent of the value returned by ‘UseGraphicalUI’.Parameters:iStiDBItemThis input corresponds to the CATIAStiDBItem to Check-In.Example:****** LifeCycleCheckIn With GUI ******The following example checks the current activated document -associatedto the CATIAStiDBItem oStiDBItem andalready saved in SmarTeam -into the vault.Note that in the dedicated panel, the end user should choose toactivate the following options ‘Keep Local File’ or ‘KeepChecked-Out’.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf Not bIsActive ThenoStiEngine.UseGraphicalUI = TrueEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleCheckIn iStiDBItem****** LifeCycleCheckIn Without GUI ******The following example checks the current activated document -associatedto the CATIAStiDBItem oStiDBItem andalready saved in SmarTeam- into the vault.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf bIsActive ThenoStiEngine.UseGraphicalUI = FalseEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleCheckIn iStiDBItem
- Parameters:
i_sti_db_item (StiDBItem) –
- Return type:
None
- life_cycle_check_out(i_sti_db_item: StiDBItem) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub LifeCycleCheckOut(StiDBItem iStiDBItem)Checks Out Without Propagation the CATIAStiDBItem inSmarTeam.This LifeCycleCheckOut operation is equivalent to launch in CATIA thecommand SmarTeam/LifeCycle/CheckOut.Note that this method should be executed With GUI and is so totallydependent of the value returned by ‘UseGraphicalUI’.Parameters:iStiDBItemThis input corresponds to the CATIAStiDBItem to Check-Out.Example:****** LifeCycleCheckOut With GUI ******The following example checks out from the vault the current activateddocument -associated to the CATIAStiDBItem oStiDBItem.Note that in the dedicated panel, the end user is able to realize thefollowing action ‘Propagate Operation’ to select which children she/he alsowants to Check-Out.She/he has also access to the SmarTeam panel option ‘Do not get thefile from vault’.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf Not bIsActive ThenoStiEngine.UseGraphicalUI = TrueEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleCheckOut iStiDBItem****** LifeCycleCheckOut Without GUI ******The following example Checks Out from the vault the current activateddocument -associated to the StiDBItem oStiDBItem.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf bIsActive ThenoStiEngine.UseGraphicalUI = FalseEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleCheckOut iStiDBItem
- Parameters:
i_sti_db_item (StiDBItem) –
- Return type:
None
- life_cycle_check_out_propagated(i_sti_db_item: StiDBItem) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub LifeCycleCheckOutPropagated(StiDBItem iStiDBItem)Checks Out With Propagation the CATIAStiDBItem inSMARTEAM.This LifeCycleCheckOutPropagated operation is equivalent to launch in CATIAthe command SmarTeam/LifeCycle/CheckOut and then to specify in the associatedSmarTeam panel ‘Actions/Propagate Operation’.Note that this method should be executed With GUI and is so totallydependent of the value returned by ‘UseGraphicalUI’.Parameters:iStiDBItemThis input corresponds to the CATIAStiDBItem to be Checked-Out.Example:****** LifeCycleCheckOutPropagated With GUI******The following example Checks Out from the vault the current activateddocument -associated to the CATIAStiDBItem oStiDBItemAND its children.She/he has also access to the SmarTeam panel option ‘Do not get thefile from vault’.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf Not bIsActive ThenoStiEngine.UseGraphicalUI = TrueEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleCheckOutPropagated iStiDBItem****** LifeCycleCheckOutPropagated Without GUI******The following example Checks Out from the vault the current activateddocument -associated to the StiDBItem oStiDBItemAND its children.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf bIsActive ThenoStiEngine.UseGraphicalUI = FalseEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleCheckOutPropagated iStiDBItem
- Parameters:
i_sti_db_item (StiDBItem) –
- Return type:
None
- life_cycle_new_release(i_sti_db_item: StiDBItem) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub LifeCycleNewRelease(StiDBItem iStiDBItem)Enables a New Release Without Propagation for the CATIAStiDBItem inSmarTeam.This LifeCycleNewRelease operation to SmarTeam Integration is equivalent tolaunch in CATIA the command SmarTeam/LifeCycle/NewRelease.Note that this method should be executed With GUI and is so totallydependent of the value returned by ‘UseGraphicalUI’.Parameters:iStiDBItemThis input corresponds to the CATIAStiDBItem to New Release.Example:****** LifeCycleNewRelease With GUI ******The following example makes a new copy of a Released documentassociated to the CATIAStiDBItem oStiDBItemthat was moved into the Released vault. The resulting document is anew revision of the source document.Note that in the dedicated panel,the end user is also able to realizethe following action ‘Propagate Operation’ to select whichchildrenshe/he also wants to Check-Out. She/he has also access to the SmarTeampanel option ‘Do not get the file from vault’.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf Not bIsActive ThenoStiEngine.UseGraphicalUI = TrueEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleNewRelease iStiDBItem****** LifeCycleNewRelease Without GUI******The following example makes a new copy of a Released documentassociated to the CATIAStiDBItem oStiDBItemthat was moved into the Released vault. The resulting document is anew revision of the source document.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf bIsActive ThenoStiEngine.UseGraphicalUI = FalseEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleNewRelease iStiDBItem
- Parameters:
i_sti_db_item (StiDBItem) –
- Return type:
None
- life_cycle_new_release_propagated(i_sti_db_item: StiDBItem) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub LifeCycleNewReleasePropagated(StiDBItem iStiDBItem)Enables a NewRelease action With Propagation for the CATIAStiDBItem inSmarTeam.This LifeCycleNewReleasePropagated operation is equivalent to launch inCATIA the command SmarTeam/LifeCycle/NewRelease and then to specify in theassociated SmarTeam panel ‘Propagate Operation’.Note that this method should be executed With GUI and is so totallydependent of the value returned by ‘UseGraphicalUI’.Parameters:iStiDBItemThis input corresponds to the CATIAStiDBItem to be New Released.Example:****** LifeCycleNewReleasePropagated With GUI******The following example makes a new copy of the Released documentassociated to the CATIAStiDBItem oStiDBItem and of itschildren.This document was previously saved into the Released vault. Theresulting document is a new revision of the source document.She/he has also access to the SmarTeam panel option ‘Do not get thefile from vault’.Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf Not bIsActive ThenoStiEngine.UseGraphicalUI = TrueEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleNewReleasePropagated iStiDBItem****** LifeCycleNewReleasePropagated Without GUI******The following example makes a new copy of a Released documentassociated to the CATIAStiDBItem oStiDBItem and of itschildren.This document was previously saved into the Released vault. Theresulting document is a new revision of the source document.Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf bIsActive ThenoStiEngine.UseGraphicalUI = FalseEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleNewReleasePropagated iStiDBItem
- Parameters:
i_sti_db_item (StiDBItem) –
- Return type:
None
- life_cycle_release(i_sti_db_item: StiDBItem) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub LifeCycleRelease(StiDBItem iStiDBItem)Releases the CATIAStiDBItem in SmarTeam Release Vault.This LifeCycleRelease operation is equivalent to launch in CATIA thecommand SmarTeam/LifeCycle/Release.3 cases: either the document is New (that is to say already saved inSmarTeam) or it is being Modified (Checked-Out or New Released) and is removedback into the vault or it is Checked-In and is moved from the Check-In vault tothe Release one.Note that this method should be executed With GUI and is so totallydependent of the value returned by ‘UseGraphicalUI’.Parameters:iStiDBItemThis input corresponds to the CATIAStiDBItem to Released.Example:****** LifeCycleRelease With GUI ******The following example releases the current activated document-associated to the CATIAStiDBItem oStiDBItem andalready saved in SmarTeam- into the vault.Note that in the dedicated panel, the end user should choose toactivate the following options ‘Keep Local File’ or ‘KeepChecked-Out’.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf Not bIsActive ThenoStiEngine.UseGraphicalUI = TrueEnd If‘ Retrieve the Current activated documentDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleRelease iStiDBItem****** LifeCycleRelease Without GUI ******The following example moves the current activated document -associatedto the CATIAStiDBItem oStiDBItem andalready saved in SmarTeam -into the Released vault.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf bIsActive ThenoStiEngine.UseGraphicalUI = FalseEnd If‘ Retrieve the Current activated documentDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleRelease iStiDBItem
- Parameters:
i_sti_db_item (StiDBItem) –
- Return type:
None
- life_cycle_undo_check_out(i_sti_db_item: StiDBItem) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub LifeCycleUndoCheckOut(StiDBItem iStiDBItem)Cancels Check-Out operation on the CATIAStiDBItem in SmarTeam. So theprogrammer is able to retrieve the previous latest state (Checked-In orReleased) of the CATIAStiDBItem.This LifeCycleUndoCheckOut operation is equivalent to launch in CATIA thecommand SmarTeam/LifeCycle/UndoCheckOut.Note that this method should be executed With GUI and is so totallydependent of the value returned by ‘UseGraphicalUI’.Parameters:iStiDBItemThis input corresponds to the CATIAStiDBItem to be UndoChecked-Out.Example:****** LifeCycleUndoCheckOut With GUI******The following example retrieves a copy of a document associated to theCATIAStiDBItem oStiDBItemin the previous latest state (Checked-In orReleased).A CATIA panel is firstly displayed to warn the end user that it isstrongly recommanded to confirm the file deletion whenasked.If, the end user clicks “OK”, a SmarTeam panel is then displayed “File‘(…)/Work/CATPRD-XXXX.CATProduct’ is referenced only byObject ‘CATPRD-XXXX RevX.X’, and will be deleted. Do you want todelete this file?” The end user had better accept.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf Not bIsActive ThenoStiEngine.UseGraphicalUI = TrueEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleUndoCheckOut iStiDBItem****** LifeCycleUndoCheckOut Without GUI******The following example cancels the Check-Out of the document associatedto the CATIAStiDBItem oStiDBItemin the previous latest state (Checked-In orReleased).By default, the Undo Check-Out operation is not propagated, i.e.available only for the current CATIAStiDBItem.Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf bIsActive ThenoStiEngine.UseGraphicalUI = FalseEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )oStiEngine.LifeCycleUndoCheckOut iStiDBItem
- Parameters:
i_sti_db_item (StiDBItem) –
- Return type:
None
- refresh_info() None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub RefreshInfo()Refreshes Information concerning all CATIA Documents insession.This RefreshInfo operation is equivalent to launch in CATIA the commandSmarTeam/Tools/Refresh.Note that this method is always executed Without any GUI and is so totallyindependent of the value returned by ‘UseGraphicalUI’.During this RefreshInfo operation, the following steps areexecuted:- Checking the document synchronization on disk,- Updating internal info,- Updating Read/Write status for valid documents,- Updating icons,- Sending error or warning message for not synchronized or removeddocuments if GUIs are activated.Example:The following example refreshs the CATIA session:Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)oStiEngine.RefreshInfo
- Return type:
None
- save(i_sti_db_item: StiDBItem) None ¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357))
- o Sub Save(StiDBItem iStiDBItem)Saves the CATIAStiDBItem in SmarTeam.This Save operation is equivalent to launch in CATIA the commandSmarTeam/Save.Note that this method should be executed With GUI and is so totallydependent of the value returned by ‘UseGraphicalUI’. The SmarTeam IntegrationObject (and its children) is(are) saved in the current Work -if NOT alreadysaved on disc.Parameters:iStiDBItemThis input corresponds to the CATIAStiDBItem to save.Example:****** Save With GUI ******Note that in the ‘Projects Manager’ panel, the end user should selectthe ‘Project’ in which she/he wants to save the correspondingfile.If she/he selects one, then she/he can activate the option ‘Link ToProjects’ and then ‘Secured By’ and to finish ‘Propagatesecurity’.She/he is also able to choose to activate the following option ‘Add ToDesktop’.The following example saves in SmarTeam the CATIAStiDBItem oStiDBItemWith GUI.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf Not bIsActive ThenoStiEngine.UseGraphicalUI = TrueEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject(productDocument01)oStiEngine.Save iStiDBItem****** Save Without GUI ******By Default, the SmarTeam Integration Object (and its children) is(are)saved in the current Work -if NOT already saved on disc,NOT linked With any Project and NOT Added to Desktop.The following example saves in SmarTeam the CATIAStiDBItem oStiDBItemWithout GUI.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf bIsActive ThenoStiEngine.UseGraphicalUI = FalseEnd If‘ Retrieve the Current Activated ProductDim productDocument01 As DocumentSet productDocument01 = CATIA.ActiveDocument‘ Retrieve the StiDBItem from the DocumentDim iStiDBItem As StiDBItemSet iStiDBItem = oStiEngine.GetStiDBItemFromAnyObject( productDocument01 )‘ Save the ProductoStiEngine.Save iStiDBItem
- Parameters:
i_sti_db_item (StiDBItem) –
- Return type:
None
- property use_graphical_ui: bool¶
Note
- CAA V5 Visual Basic Help (2020-09-25 14:34:21.593357)
- o Property UseGraphicalUI() As booleanReturns (gets) or sets the use of Graphical User Interface (GUI) in orderto display or not panels. This method allows programmer to define if methods ofthis Interface Definition Language (IDL) will be executed With or Without userinteractions.Warning: By Default, operations launched from this interface are executedWithout GUI, that is to say ‘UseGraphicalUI’ is set to ‘False’. In practice, NoGUI means that treatments are executed With Default Values because additionalparameters or options can not be set, as there is no user interaction. If GUIare allowed, panels will be displayed. These panels correspond to the usualones displayed when the corresponding functionnalities are launched from theSmarTeam Intagration menu. The behaviour is so the same as in InteractiveMode.Note that the Connection to SmarTeam Integration is totally Independent ofthe Value of UseGraphicalUI.Example:The following example returns in the boolean bIsActive the currentvalue of this option -that is to sayif we use or not GUI for StiEngine methods- and then sets it -ifneeded- to ‘True’ -that corresponds to GUI operatingmode.Dim oStiEngine As StiEngineSet oStiEngine = CATIA.GetItem(“CAIEngine”)Dim bIsActive As booleanbIsActive = oStiEngine.UseGraphicalUIIf Not bIsActive ThenoStiEngine.UseGraphicalUI = TrueEnd If
- Return type:
bool