Is it possible to program logic into mechanisms or assemblies?

I'm a mechatronic engineering student at university,

I would like to design an assembly and program it (assuming in c or c++) logic to its functionality, for example, modeling and assembling a cd carousel selector, and being able to program the logic for the selector to work, and dynamically pick cd numbers etc

Thank you kindly

2 Answers

I think you can simulate your mechanism by applying advanced mates between components.
I don't have a useful tutorial on how advanced mates cand be applied, but you can search on the Internet to find some answers.
In your place,I wouldn't think that far to create scripts in C / C++.

Thank you Alex, I have put the assembly together, and I can simulate mechanical movement and that all operates correctly, however I would like to code logic into the mechanisms so I can emulate the machinery in its product stage, eg, code the mechanism to slide down, pick up a particular cd (given at runtime) and take it off the spindle. I'm not sure if creo allows to this level of functionality.

Thank you kindly!