I don’t think you need to get the centroid at all. Just replace the Vector.ByTwoPoints node with a Point.AsVector node and then it should work.
Hi @Rob_Kuffel1, I also tried your solution, this is my result:
Now, I get all the tags in the same place :S
I betcha it has to do with trying to tag them in section. When I was dealing with crops of varying view types I found that the Z axis is not the model Z axis in all view types!
Set the is offset Boolean to True. I think that should fix it.
Thanks @Rob_Kuffel1, I did what you said, but I’m stll getting the same result. What am I missing?
Oh dang, I didn’t even notice that he was trying to tag in section. I haven’t done that. I’m curious to see how Revit OOTB tag all command would handle that. Sorry I missed that detail Jorge.
Section views got their own coordinate systems, you can check what direction is to the right for the user with the RightDirection property and use that vector to determine the offset,
import clr clr.AddReference('RevitNodes') import Revit clr.ImportExtensions(Revit.GeometryConversion) OUT=IN.InternalElement.RightDirection.ToVector()
ViewDirection are similar properties)
Align tag by referense
I made some test with the script I got from the beginning. With Dynamo 1.2.1 I get the result I want, but with the 1.3.0 version I have the issue described above.
Is this a bug? or something thyat changed in the current version?
Hi @Einar_Raknes, I looked at your comment, but I don’t know how to implement this to solve my problem?
Thanks in advance
I don’t remember exactly what I was thinking of, but you should check that the X direction of your vector aligns with the rightdirection in the view.
Could you tell me left side block in the uploaded snapshot?
Thanks in advance.