plc.myforum.ro Forum Index plc.myforum.ro
PLCs users www.plc.myforum.ro!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delete Recipe in FT View SE v8.0

 
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> ALLEN-BRADLEY(Rockwell Automation) Reg. U
View previous topic :: View next topic  
Author Message
sachincool786
Junior 2
Junior 2


Joined: 21 Jun 2015
Posts: 28

PostPosted: 11/01/2016 16:14    Post subject: Delete Recipe in FT View SE v8.0 Reply with quote

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)
Back to top
View user's profile Send private message
zwang
Junior 2
Junior 2


Joined: 30 Jul 2015
Posts: 42
Location: China

PostPosted: 11/01/2016 18:53    Post subject: Re: Delete Recipe in FT View SE v8.0 Reply with quote

sachincool786 wrote:
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)


From FactoryTalk View Machine Edition 5.00 upward this is available
RecipePlus - Delete and Rename functions have been added to the RecipePlus button's actions. Users can now delete and rename a recipe unit selected in the selector object.
https://rockwellautomation.custhelp.com/ci/fattach/get/12635/MEproj.chm::/Project/PROJECT_Product_Support.htm
Back to top
View user's profile Send private message
sachincool786
Junior 2
Junior 2


Joined: 21 Jun 2015
Posts: 28

PostPosted: 11/01/2016 19:15    Post subject: Reply with quote

Dear !!!

I am using SE application not ME.
Back to top
View user's profile Send private message
zwang
Junior 2
Junior 2


Joined: 30 Jul 2015
Posts: 42
Location: China

PostPosted: 11/01/2016 19:23    Post subject: Reply with quote

sachincool786 wrote:
Dear !!!

I am using SE application not ME.


REcipePlus is for the Me edition not the SE.
IN SE Edition is not available.
Just write VBA for this because is not available.
Unfortunately just now I have not a writed code available.
Back to top
View user's profile Send private message
sachincool786
Junior 2
Junior 2


Joined: 21 Jun 2015
Posts: 28

PostPosted: 11/01/2016 19:26    Post subject: Reply with quote

Please give me a sample if you have one.
Back to top
View user's profile Send private message
zwang
Junior 2
Junior 2


Joined: 30 Jul 2015
Posts: 42
Location: China

PostPosted: 11/01/2016 19:26    Post subject: Reply with quote

Here is a code finded for RSView if you can adapt
Code:

'initialize the listbox with all the existing recipe file names
Private Sub UserForm_Initialize()
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
Back to top
View user's profile Send private message
sachincool786
Junior 2
Junior 2


Joined: 21 Jun 2015
Posts: 28

PostPosted: 11/01/2016 19:28    Post subject: Reply with quote

Dear!!!

used this code already but not able to make it working.

What i did is:

I made a button named "cmdDeleteRcp" as per the code saying and made to it VBA exposed.

Now I made a Listbox from Microsoft form 2.0 activeX control with the name of "LstRecipeNames" as per the code saying and made to it VBA exposed.

Now when i run the runtime, i could not see any recipe in listbox

and one thing more i am getting error on the step

gActivity.Log Err.Description

but i bypassed ut by make it comment
Back to top
View user's profile Send private message
sachincool786
Junior 2
Junior 2


Joined: 21 Jun 2015
Posts: 28

PostPosted: 12/01/2016 07:46    Post subject: Reply with quote

Private Sub Display_AnimationStart()

Dim sRecipes As StringList
Dim vRecipe As Variant
On Error GoTo ErrHandler
Set sRecipes = gProject.GetComponents("Recipes;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
'Set vRecipe = Nothing
End Sub

'user selects the recipe name in the list box, and then presses delete button
Private Sub cmdDeleteRcp_Press()
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 "Recipes;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
Back to top
View user's profile Send private message
sachincool786
Junior 2
Junior 2


Joined: 21 Jun 2015
Posts: 28

PostPosted: 12/01/2016 07:48    Post subject: Reply with quote

THis above code i am using.

Please tell me what is wrong in it???

The listbox is not picking list of recipes from Recipe function
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> ALLEN-BRADLEY(Rockwell Automation) Reg. U All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro