I am building a dynamo script that creates multiple sections for a model group. One of the sections I want to rotate after it is created, in them same script. I use a SectionView.ByCoordinateSystemMinPointMaxPoint to create the sections and that works fine. But then I use a python script to rotate one of the sections and that won’t work. When I put the python script in a separate dynamo script it works fine. Can somebody help me with this problem?
Extra information about the working of the python and dynamo script:
I want to create sections and rotate a section in one script, because what the rotation needs to be is determent when the sections are create and do not prefer to make a separate parameter in Revit so that the data can be used in a separate script that rotates the section.
The python script uses the boundingbox of the section to determine its centerpoint and rotate the section around the Z axis. When I created the section and rotate the section in the same dynamo script, the python script is not able to find the boundingbox of the section. When I remove the boundingbox out of the script and try to rotate the element around 0.0.0 point in Revit, it won’t work.
With the dynamo script I want in the future, is to make several sections for different model groups at once and place them on sheets. Because the modelgroup can also be slanted and the views always needs be at right angles to the model group, I also use sections as floorplans that I have rotated 90 degrees. With the create section view node, this all goes fine. But the sections that are “floorplans” views are always in vertical direction no matter how I put in the coordinate system in the create section node. I need those views to be in horizontal direction. So that its why I want to rotate the section after creating section.