Search found 47 matches

by BartC
Tuesday 06 August, 2013 - 07:54
Forum: Enterprise Dynamics 4DScript
Topic: Random Product Label Assignment at Source Creation
Replies: 4
Views: 7366

Re: Random Product Label Assignment at Source Creation

Hi Terril,

You can use this:

Code: Select all

Do(
  var([valX], vbValue),
  
  valX := Uniform(0, 1),
  
  Case(
    WhichIsTrue(
      valX <= 0.3,
      valX <= 0.8,
      valX > 0.8
    ),
    SetLabel([JobType], 1, i),
    SetLabel([JobType], 2, i),
    SetLabel([JobType], 3, i)
  )
)
Regards,

Bart
by BartC
Friday 02 August, 2013 - 14:42
Forum: Enterprise Dynamics 4DScript
Topic: warehouse and advanced travsporter
Replies: 2
Views: 4040

Re: warehouse and advanced travsporter

Hello Somayeh, A way to implement this is by using the following 4DScript: Do( var([valChannel], vbValue), If( time >= 4, Case( WhichIsTrue( Content(c) < 7, Content(c) < 20, Content(c) < 40, True ), {Content < 7} msg([Content < 7]), {Content < 20,} valChannel := 1, {Content < 40,} valChannel := 2, {...
by BartC
Friday 02 August, 2013 - 14:25
Forum: Enterprise Dynamics 4DScript
Topic: Error in Server after Assembler
Replies: 3
Views: 4667

Re: Error in Server after Assembler

Hello WU R, The label "visual quality at retail" is set on your products and not on your monitored atom(s) e.g. Sold Products. To solve your issue I wrote some 4DScript on the entry trigger of the Sold Products atom to copy the label of the product to the Sold Product atom and at the same ...
by BartC
Friday 02 August, 2013 - 08:56
Forum: Enterprise Dynamics 4DScript
Topic: Connection Excel on another computer
Replies: 2
Views: 3620

Re: Connection Excel on another computer

Hello Roma, The function CurDir gives a referral to the map of your model, so in your case this is "C:\Users\Roel\Desktop\Enterprise Dynamics Files". You can extend this referral by using your filename as the first parameter of this function. So instead of using ExcelActiveX_Open([C:\Users...
by BartC
Thursday 25 July, 2013 - 09:04
Forum: Enterprise Dynamics 4DScript
Topic: Error in Server after Assembler
Replies: 3
Views: 4667

Re: Error in Server after Assembler

Hello WU R, First of all, on the SendTo statement, there is no involved atom, so your atom pointer "i" does refer to another/none existing atom. Instead, use other referrals e.g. first(c) to refer to the first product in the server. Secondly, I can see that you set the Label([visual qualit...
by BartC
Monday 22 July, 2013 - 09:08
Forum: Enterprise Dynamics 4DScript
Topic: For Loop in Server
Replies: 4
Views: 4804

Re: For Loop in Server

Hi Annaberth, So if I understand you right, you want to set the cell Data(11, 1) to the value of the "Ml O2 package manufacturer new" label? Since you already declared aliases for your table, the function SetData should exist in your model. By adding the following line beneath " Label...
by BartC
Friday 12 July, 2013 - 15:42
Forum: Enterprise Dynamics Atoms
Topic: Order generation in a source
Replies: 1
Views: 3306

Re: Order generation in a source

Hello WU R,

Can you give a little more info on how you generate the orders with the source. As I understand it, you just have to set the "Time to first product" to hr(10) and the "Inter-arrival time" to hr(24).

Regards,

Bart
by BartC
Friday 12 July, 2013 - 15:37
Forum: Enterprise Dynamics 4DScript
Topic: Pick not completely full orders
Replies: 1
Views: 2885

Re: Pick not completely full orders

Hello WUR,

I can tell you that that option is not there at the moment, but in the next release (ED9) it will be there.

Regards,

Bart
by BartC
Friday 12 July, 2013 - 14:51
Forum: Enterprise Dynamics 4DScript
Topic: For Loop in Server
Replies: 4
Views: 4804

Re: For Loop in Server

Hi Annaberth, Although common in other programming language, "i" can't be used in ED for a loop. In ED "i" is a referral (pointer) to the involved atom, e.g. the product at the entry/exittrigger of a server. At the for loop you are trying to set the pointer "i" to the v...
by BartC
Friday 05 July, 2013 - 16:29
Forum: Enterprise Dynamics 4DScript
Topic: Assign LIFO and FIFO consumers
Replies: 3
Views: 4372

Re: Assign LIFO and FIFO consumers

Hello WUR, Attached is an example model were a quick solution to this problem is given. I used a source for both generating the Customers and the Products. The products then go to a queue. At the exittrigger of the customer source I added a label to the customers like you said, Bernouilli(60, 1, 2)....