I am trying to check all Title Block family positions and set one of its corners to 0,0,0
However every time I run the script it checks all my sheets and generates its views. This is a significant load time.
I am using Revit 2022.1
Is there a node that can check the position for me and load the Title Block positions rather quickly?
I am doing this so I can paste Legends to the exact same place on Sheets that are similar.
This still generates all sheets though because of the first 2 nodes.
I just want to get all titleblocks, and the ones that are off, move the entire sheet (incl all views) back to the 0 point.
Perhaps another node forces the sheets to be generated?
Do you have multiple types or a single way of knowing what the types are?
You could grab the family type(s) and then get all elements of that type, and report it’s location. If you then know the intended location for each type you can convert the location to a vector, invert the vector, and move the element by the inverted vector.
I encountered these things while developing the script.
-I have to use string from object, because point positions do not go through if they are equal, even when they are @GavinCrump, your String.FromObject doesn’t work on point positions, the OOTB node does
If you want the position to be the origin, Point.AsVector and Vector.Reverse will give the vector required to move the title blocks into position. After that you can use a Vector.Length to find out if there are zero length vectors and filter out vectors and sheets, or you can move all the title blocks - even if some are moving by a zero length vector. From there it is as simple as Element.MoveByVector and you’re done with it.
Yes my string from object node primarily deals with numbers. I updated it in the last build to deal with this by trying to force integer first and if it coudldnt make one it just returned string representation.
This won’t work as I am filtering the ones that aren’t on the Origin because I am not just moving the titleblocks but I am loading the Viewports and Schedules etc of the sheet and returning moving them along the titleblock. Visually nothing really happens. But it is to restore the function of: Paste into Same Place for legends for similar views etc
However it is a nice insight, but it doesn’t really save me any amount of nodes since I am using Vector.ByTwoPoints, using Origin as the end point. 3 nodes vs 3 nodes. Multiple roads to the same end result I think.
I thought I had your latest package installed (2024.3.2). Just saw there is a newer version. I’ll check it out and get back to you
(As mentioned I am using R22.1. Don’t know if that makes a difference for the package. )
Yeah nah 2024.4.2 is latest, released a few days ago. Fairly sure I reworked this node in between builds to only try to handle trailing zeroes/points for number representateable objects. It should remove all rightmost zeroes and decimal points and then try to float that. If it can, it strings it. If it cant, it strings the original object. This should deal with the annoying X.00000 string outcomes from floats.