CreateAtom (CreateAtomCopy)

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
Katinka
Posts: 23
Joined: Thursday 14 June, 2012 - 08:42

CreateAtom (CreateAtomCopy)

Post by Katinka »

Hello,

I would like to make a copy of a Product Atom (which is located in a Warehouse Atom).
Unfortunately, I can't make use of the Splitter Atom, so I used the 4D Script function: "CreateAtom".
Indeed a copy was created, including all desired attributes, but this Copy is 'doing nothing', i.e. I sent it to a Queue Atom, but it just stays there, without going to the next Atom, although this is possible (and very much desired ;) ). I think some event should be triggered in order to let the Copy leave its current atom? But I don't know how..

Thanks in advance,

Katinka
MarvinH
Posts: 93
Joined: Tuesday 25 January, 2011 - 11:07
Contact:

Re: CreateAtom (CreateAtomCopy)

Post by MarvinH »

Hello Katinka!
Katinka wrote:i.e. I sent it to a Queue Atom, but it just stays there, without going to the next Atom, although this is possible (and very much desired )
How do you send the product to the queue? I think there are 2 options:
  • 1) Use CreateAtom where you provide the queue as the second parameter, to define where the new atom is created;
  • 2) Use CreateAtom where you provide another atom (for example Model) as a second parameter, and move the new atom into the queue afterwards.
In case you chose for the first option, I think that indeed the new atom will stay in the queue. In case you chose for the second option, the atom should leave the queue when it is possible, so something else went wrong.

If you chose for the first option, please try the second option. :D When you already implemented the second option and it's still not working, please return to this topic again.

Kind regards,

Marvin
Katinka
Posts: 23
Joined: Thursday 14 June, 2012 - 08:42

Re: CreateAtom (CreateAtomCopy)

Post by Katinka »

Hello Marvin,

I indeed went for the first option. In the 4DScript overview concerning CreateAtom, I read the Copy is "moved into atom e2 at the end of its queue". Therefore, I was thinking 'better send it there right away, then first put it somewhere else (the Model) and afterwards move it to the correct place'. However, reading your reply, parameter e2 rather seems the place where the Atom is created (and that maybe changes things a bit).

Anyway, the second option works like a charm :)

Thanks for your quick reply!

Katinka
Post Reply