While reading the section Wolfgang suggested, here are a few hints to help out:
When you get to the part on "Manipulating Occurrences" instead of just settling for .Move() and .Rotate(), look into .GetTransform() and .PutTransform(). These will help you a great deal. .GetTransform() will tell you the current position and rotation of the part/assembly and .PutTransform() will allow you to specify the position and rotation.
Keep in mind that SE uses metric internally, so if you use standard, you will need to convert the value just before feeding it into these functions and after retrieving it from the functions. If you are converting, keep in mind the rounding error and make sure you round to a sane value when you use .GetTransform(). Otherwise you can run into failures since 0.0000000000000001 and 0 are not the same thing. This would happen more in part features and assembly mates than with grounded positioning but still a good habit to get into.
When creating parts and assemblies, make sure you keep the origin in an appropriate place. This will make it much easier to figure out how to position the part when you insert it into the next level assembly.
If you are going to manipulate the part/assembly through the variables table, create a VAR for each DIM you want to edit. Set the DIM equal to the VAR and edit the VAR. Otherwise you will get failures.
Have fun automating, the sky is the limit.
Posted by: Terry Tyson Post date: 4/25/2013 7:32:08 AM