Dear All!!!
Please tell me the way how can i delete recipe from Runtime.
There are only save and restore options in the inbuild recipe function.
I am using inbuild recipe function.
Factory Talk View SE v8.0 (all the patches till date are installed)
I have RSView32 VBA code but i am not able to use it in FTV SE Please help me with it!!!
Private Sub Display_AnymationStart()
Dim sRecipes As StringList
Dim vRecipe As Variant
On Error GoTo ErrHandler
Set sRecipes = gProject.GetComponents("recipe;files")
For Each vRecipe In sRecipes
LstRecipeNames.AddItem vRecipe
Next vRecipe
ErrHandler:
If Err.Number Then
gActivity.Log Err.Description
Err.Clear
End If
Set sRecipes = Nothing
Set vEachRecipe = Nothing
End Sub
'user selects the recipe name in the list box, and then presses delete button
Private Sub cmdDeleteRcp_Click()
On Error GoTo ErrHandler
If LstRecipeNames.ListIndex = -1 Then
MsgBox "Select a recipe to delete"
Else
'delete the recipe file, and remove from the project
gProject.DeleteComponent "Recipe;files", LstRecipeNames.Text
'remove the item from the listbox
LstRecipeNames.RemoveItem LstRecipeNames.ListIndex
End If
ErrHandler:
If Err.Number Then
gActivity.Log Err.Description
Err.Clear
End If
End Sub
The bolded points are problem, Bypased the error handler , but please lemme know how can use use this commands in FTV SE, as VBA in SE is client based blah blah...
gProject.DeleteComponent "Recipe;files", LstRecipeNames.Text
Factory Talk View SE v8.0 Recipe Delete
-
- Posts: 17
- Joined: Sun Jun 14, 2015 4:41 pm