sachincool786

Factory Talk View SE v8.0 Recipe Delete

1 post in this topic

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now