Message 1 of 2
Changing TextNoteType - Python/Dynamo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hey guys!
I have started learning using Revit API in my scripts and I have hard time understanding how to use it in Python scripts. Could someone explain me how I can change this TextNoteType, please? It is 3.5 mm and I want to change it to the 2.0mm type. I have tried so many different ways, I found some solutions in C# but I don't know the C# syntax.
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference("RevitServices")
clr.AddReference('RevitAPI')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
import System
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
doc = DocumentManager.Instance.CurrentDBDocument
list = IN[0]
txt = UnwrapElement(list[0])
output = []
TransactionManager.Instance.EnsureInTransaction(doc)
x = (txt.TextNoteType)
output.append(x)
TransactionManager.Instance.TransactionTaskDone()
OUT = output
Developer Advocacy and Support +