AnyLogic 6 Discussion

I am animating a discret event model and would like to create for every individual entity an individual animated text field which shows an individual number. So every created Entity should get his own serial number. Is this possible? I would be grateful for any advice. Jonas
Hello Jonas, In the Resources Exchange Forum you have the link http://jmgdurana.googlepages.com/home from which you can download the file JoseModels.zip The entities in the first model, Turnstil.alp, have individual colors. Probably you can easily change the color entity by a number entity. Have luck! Regards, Jose
Hello Jonas, In the Resources Exchange Forum you have the link http://jmgdurana.googlepages.com/home from which you can download the file 3. EntitySetShapeDynamicly.alp where entities have individual numbers. Kind regards, Jose
Please put the tick in the ‘Unique shape for each entity’ check box in the general properties of ‘source’ element. Then create a group of shapes to animate entity (e.g. ‘oval’ and ‘text’) and type the name of this group in the ‘Entity animation shape’ field in general properties of ‘sink’ element. For instance you want each entity has the animated text field with its order number. So you should type the following code in ‘On Enter’ field of some element from Enterprise Library: ShapeGroup g = (ShapeGroup)entity.getShape(); //create new ‘Group’ for this entity ShapeText text = (ShapeText)g.get(1); //create new ‘Text’ for this entity text.setText(""+plainVar); // set text as plain variable’s value (order number) plainVar++; Entity will have its own unique animation (order number) along the whole flowchart after it enters this block where you have typed such code.