Create Dynamic Instances of Objects

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
d_reibelt
Posts: 9
Joined: Mon Jun 18, 2018 6:12 pm

Create Dynamic Instances of Objects

Post by d_reibelt »

Is this possible to declare new instances and remove instances of objects on a screen on the fly.

eg: On_ScreenOpened, read some tag, draw n# instances at dynamic positions

then animate those instances individually from those positions and toggle visibility at different stages based on arbitrary tag values

// this bit could be done with a reset position and visibility control
finally remove those instances and create a new set of instances.

AMitchneck
Posts: 137
Joined: Mon Jun 11, 2012 2:10 pm

Re: Create Dynamic Instances of Objects

Post by AMitchneck »

d_reibelt,

Technically, this can be done, but I've never tried it before in iX. In C#, to add a control to the screen you would create the object, add it to the form's Controls list, then refresh the form. To remove it, you would remove the object from the controls list, etc. Doing some digging, it seems iX's equivalent to Controls is DrawingPrimitives.
Adam M.
Controls Engineer
FlexEnergy

d_reibelt
Posts: 9
Joined: Mon Jun 18, 2018 6:12 pm

Re: Create Dynamic Instances of Objects

Post by d_reibelt »

AMitchneck,

yes thanks, I found a way to do it using standard forms techniques. This key is understanding how iX is doing the same thing.

Post Reply