hi !
I am trying to change the position, elbow, and end of a Room tag or any other tag. After making these changes, the updates do not reflect. I need to change the LevelOfDetail to Fine, Medium, or Coarse for the transaction to update. I attempted to implement this in my code, but it does not work when the view has a template. I also tried using Regenerate(doc), but it still doesn’t work. After running the code, I still need to change the LevelOfDetail. Is there any way to update the display without having to do that?
here is the python Node i use for set Head Position, another one is the same
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
def SetSpatialTagHeadPosition(spatialTag,point):
TransactionManager.Instance.EnsureInTransaction(doc)
spatialTag.TagHeadPosition = point.ToRevitType(True) #cast point to revit type
TransactionManager.Instance.TransactionTaskDone()
return spatialTag
spatialTags = UnwrapElement(IN[0])
locationPoints = UnwrapElement(IN[1])
if isinstance(IN[0], list): OUT = [SetSpatialTagHeadPosition(t,p) for t,p in zip(spatialTags,locationPoints)]
else: OUT = SetSpatialTagHeadPosition(spatialTags,locationPoints)

