Getting models connected

Typically: "How do I... ", "How can I... " questions
Post Reply
Maenre
Posts: 8
Joined: 29 Jul 2019, 11:10

Getting models connected

Post by Maenre » 05 Sep 2019, 15:56

Hello.

I want to make connection interfaces between my models so I would be able to dynamically assign them to each other to work as a system. I'm looking for the way to declare these connections and dummy-dummy connection seems to be a way for it. So to get from initial model to connected I need:
1. Find the dummy in the initial model
2. Find connected dummy
3. Find parent model of connected dummy
Is this approach ok or maybe there is a better way?

fferri
Posts: 396
Joined: 09 Sep 2013, 19:28

Re: Getting models connected

Post by fferri » 05 Sep 2019, 22:07

If you wish to store a reference to another object, have a look at sim.setReferencedHandles.

Additionally, you can attach any other kind of data to an object with sim.writeCustomDataBlock (for example to mark an object as the connecting endpoint, so that later you can choose amongst many when you have to make the connection, e.g. by using sim.getObjects/ sim.getObjectsInTree and sim.readCustomDataBlock).

Post Reply