Text Bounding Box? (to help with 2017 text problems)

@ddelarosa Maybe you can just use the Width property to scale the text witdh with a certain factor. Here is an example that increases the width by 20 % (MANUAL MODE ONLY!)

import clr

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

#Preparing input from dynamo to revit
if isinstance(IN[0], list):
	textNotes = UnwrapElement(IN[0])
else:
	textNotes = [UnwrapElement(IN[0])]
	
scale = IN[1]

#Do some action in a Transaction
TransactionManager.Instance.EnsureInTransaction(doc)
for textNote in textNotes:
	width = textNote.Width
	textNote.Width = width*scale
TransactionManager.Instance.TransactionTaskDone()

OUT = 0
2 Likes