tracking objects after simulation

tracking objects after simulation

Anonymous
Not applicable
370 Views
2 Replies
Message 1 of 3

tracking objects after simulation

Anonymous
Not applicable

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.-

 

371 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

I have the same problem, in c# I can't get the Angular velocity of a gear, any one have the solution?

0 Likes
Message 3 of 3

Anonymous
Not applicable

Hi,

   Someone, please!!! I am REALLY stuck with this!!! I haven't been able to add a single meaningful line to my code in weeks!!!

   If you have the solution to know the "current" state of a part, even if it is VB, I would LOVE to hear it!!!

 

   please!!

   best

gus.-

 

0 Likes