Hi, i am trying to get all line styles in a background opended document in order to delete them but i can’t find a solution. Normally I would use the node “Tool.GetLineStyleByName” from Steam Nodes but this only works in the current document.
Hey,
Here’s a related thread you might find interesting… Lots of issues to consider!
Thanks @solamour for the additional feedback. After thinking more about this, it seemed better to wrap all of this up into one node. One key piece was calling the Transaction manually rather than the TransactionManager. No matter how I tried to slice it, it kept telling me I couldn’t edit because no transaction was open.
import System
import clr
clr.AddReference("RevitNodes")
import Revit
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference('RevitServices')
import Revit…
Of course if you click into the Steam node you can see how the python is working.
Hope that is useful,
Mark
1 Like
Thanks Mark.
I have searched aorund the web for a solution but everything I can find is not working with background documents.
HI all,
I am having difficulty with this graph. Basically what I want to do is remove all of the Line Styles in the project that are not contained in a list.
I have used the Categories and Get Sub-Categories, filtered the list to remove the categories i want to keep, but i cant seem to delete the ones remaining.
I know that some of the remaining sub-cats are Revit defaults and cannot be removed. You will see 4 “Rubbish” line styles that i want to get rid of, which i cant.
Any help is apprec…
In the screenshot below you can see the node “Get Category Properties” this one would be the perfect one for finding the line styles".
Any ideas or alternatives to make it work with background documents?
Thanks for all your help.