Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by tbischel

  1. tbischel

    mass properties problem

    Thanks Artem, it works great! I wonder if that means the main reason my original code didn't work was a casting problem? Funny way to express itself. Thanks for the help, I've been banging my head against this one for far too long. --Tyler
  2. tbischel

    mass properties problem

    Thanks Artem! this gets me 90% of the way to what I need. It seems that the swMass.AddBodies has no effect on the mass properties... so if I want to combine the properties of two distinct selected components, I'm not quite sure how to do it. But at least I could manually add the masses of...
  3. tbischel

    mass properties problem

    Artem, So the exception appears to be that GetBodies2 will return null if there are no bodies associated with a bottom level feature (maybe a suppressed part?), so you can't get the length of a null object array. No biggie there... however, the mass properties never update to the selected...
  4. tbischel

    mass properties problem

    Artem, So the source that I received didn't quite work for me... Sometimes it will only return the total mass of the entire assembly instead of the selected part (for instance, when I select a single part), and other times it will just throw an exception "Object reference not set to an...
  5. tbischel

    mass properties problem

    So actually I had been selecting parts instead of subassemblies, I don't think that was the problem. GetBodies2 would return an object array with a couple elements, but when I call AddBodies with that array, it throws the exception.. "Attempted to read or write protected memory. This is often...
  6. tbischel

    mass properties problem

    Hello, I'm trying to write a C# program to get the mass properties of a selected subassembly in a large assembly. I thought I was following the documentation properly, but I run into one of two problems: the "AddBodies" function for a mass property object throws an exception if I use the...

Part and Inventory Search

Back
Top