I’m having trouble getting a script I wrote up to perform appropriately, I can forward the code to anyone capable of helping but the gist of it is that I am orienting the assembly origin of a wall assembly to the front face of the largest wall in that assembly. When I run my script on a single assembly, it works exactly as intended, but when I run it on any more than 1 assembly at the same time it only orients one of them correctly and leaves the rest of them alone.
I’ve tried to run a subtransaction to see if that was the issue, perhaps the script was not pushing out it’s changes but that doesn’t really make any sense, and didn’t correct the problem.
I’ve tried to move the for loop cycling through the assemblies outside of the module so all of the local variables would be reset, that didn’t work either.
I put in a debug list to collect before and after transform information (using transform = assembly.GetTransform()) and then setting the transform with the wall orientation) and when I look over the output from that list it looks like the script is working - the before and after transforms are different from trans.BasisX/Y/Z before I set the transform and after. So I’m really stuck trying to figure out whats going on… The transforms are all different in the debug list so it doesn’t look like any variables are getting stuck with prior values or from other assemblies(thereby orienting incorrectly).
Anyone have any thoughts? I’m going to continue troubleshooting and collect more info to see if I can determine the cause of this.
If you need to see the code to help just shoot me a message or request and I’ll pm you. I’m not quite ready to publish my work for the community, in time.