tracking objects after simulation

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I've been working on this C# code for a while, and I cannot make a head or a tail out of it. Basically, I would like to know the transforms of a series of objects after some simulation steps. For instance, imagine I have 3 connected gears, and I apply some rotation to the first one. What I would like to know is the rotation of the other two after the first one rotated a few degrees.
For this, I am using C# with the following piece of code to retrieve the results (after the simulation has finished):
AssemblyDocument asmDoc = (AssemblyDocument)_invApp.ActiveDocument;
ComponentOccurrences g = asmDoc.ComponentDefinition.Occurrences;
SurfaceBodies sb = asmDoc.ComponentDefinition.SurfaceBodies;
foreach (SurfaceBody sby in sb)
{
// doesn't seem to enter here, sb is empty!
}
foreach (ComponentOccurrence element in g)
{
ComponentDefinition Defi = element.Definition;
// I CAN do this, but I do not know how to go on after getting the definition...
}
thanks in advance for any help!!!
best
gus.-