Custom script for Feeder Process in Table Feedmode

Hello,
I have a question.
I’m trying to write a python script for the ‘Feeder Process’ component configured with a Table feedmode in order to create the table from information available in a csv file with columns ProductType, Frequency, MinHours, MaxHours. For each line in this csv file, I want to be able to create [frequency] lines in the ProductCreator table with the ProductType read from the csv file as the ProductType and the result of uniform (MinHours,MaxHours) as the CreationTime.
I tried to use what I read in the documentation available here: vcProductCreatorTableRow . In my attempt, the “new” constructor gives an error message: line 65, in OnRun NameError: Attribute or method ‘new’ not found. What did i wrong ? Can anyone help me solve my problem?
Here is my attempt :

Kind regards

You’ll need to import the vcProductCreatorTableRow module and then call
new_row = vcProductCreatorTableRow.new()

Also modifying the feed table during simulation is not necessarily great idea because the product creator is already executing, or may already have concluded its “program”.

Hello,
Thanks a lot. It works fine. Here my code if it can help someone else :slight_smile:
Kind regards