Selecting input in a server with Excel

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
DCG909
Posts: 2
Joined: Monday 21 October, 2013 - 12:28

Selecting input in a server with Excel

Post by DCG909 »

Hi,

I am trying to use Excel to change the chosen input channel in multiple servers.
I can get the server to use excel to read cycle times, but it doesn't seem to be possible to use a 4D script in the input channel.
Could you tell me how to do this, or if this is impossible?

Best regards,

Dirk
marlies
Posts: 301
Joined: Monday 17 January, 2011 - 09:28

Re: Selecting input in a server with Excel

Post by marlies »

Hi Dirk,

To do this you should start with option nr 5 in the Input Strategy field: Channel 1. The code behind option nr 5 is: Openic( 1, c), instead of a fixed number 1, you can add a statement that reads the channel to open from excel. You can edit the 4Dscript behind the standard options by clicking the small square button, once you clicked on the option in the dropdownlist.

I made an example with a simple ED table where I replaced the channel nr 1 by: cell( input(c), 1, refTableIC) where input(c) is a counter that determines which row to read. You could replace the cell( input(c), 1, refTableIC) by anything that reads from your excelfile.

Regards, Marlies
Attachments
20131022_OpenIC.mod
(19.34 KiB) Downloaded 259 times
DCG909
Posts: 2
Joined: Monday 21 October, 2013 - 12:28

Re: Selecting input in a server with Excel

Post by DCG909 »

Dear Marlies,

That worked like a charm :)
Though the first part entering the servers seems to be a random one, depending on which que is supplied a part first.

Thank you for your help :)

Best regards,

Dirk
Post Reply