WombatDynamo: "The symbol is not active"

Hi!

I have made a dynamo script that allows me to place multiple doors on a wall using the WombatDynamo node “FamilyInstance.ByPointHostTypeAndLevel”:

But, the node doesn’t seems to “recognize” some family instances (see image in list, number 30, 31, 32…) and doesn’t place them in Revit. I don’t really know what the warning means, but I found some kind of fix: I place the concerned families (nb 30, 31, 32…) manually, delete them right afterwards and re-run dynamo and…tadaaa, the script works again and place the family! (I actually don’t even have to place it, just grab it from the project browser to the drawing and then press Esc)

Is it something wrong with my script or an issue with the node? :slight_smile:

Ps: I had the same issue with some wall based sink…

Sounds to me like that happens whenever the families were loaded but never attempted to be placed.

There may be a solution here to “Activate” first. (@Brian_Ringley3) - Is Wombat on Github for pull requests? :slight_smile:

3 Likes

@DavidDK, to workaround this behaviour, you need to place somewhere the newly loaded family, then delete it and launch the script.

Ok! I get it! That’s annoying, I guess it’s some code to add before or in the node right? I can’t code unfortunately…

@zhukoven unfortunately I am supposed to place hundreds of instances in Revit with that script, I can’t just place them manually or else the scprit loses it’s purpose…right? :slight_smile:

Yep, this logic should work for you.
Try placing this code between the “Watch node” (where you look at the list of family types) and the “FamilyInstance.ByPointHostTypeAndLevel” node:

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

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

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

doc = DocumentManager.Instance.CurrentDBDocument
famtype = UnwrapElement(IN[0])

TransactionManager.Instance.EnsureInTransaction(doc)
# Make sure the familysymbol is active
if famtype.IsActive == False:
	famtype.Activate()
	doc.Regenerate()
TransactionManager.Instance.TransactionTaskDone()
OUT = famtype

The python script takes an input of Family Types, activates them, and outputs to use in the next node.
@DavidDK, please check if this code works with your families. I’ve made some basic tests in the sample model, and it should work.

1 Like

That seems to work well, thank you!
But it does not work when placed where you asked me to place it, maybe because of this script I have before the watch node?

 import clr
 import System
 
 #Import the Revit API
 clr.AddReference('RevitAPI')
 import Autodesk
 from Autodesk.Revit.DB import *
 
 #Import DocumentManager and TransactionManager
 clr.AddReference('RevitServices')
 import RevitServices
 from RevitServices.Persistence import DocumentManager
 from RevitServices.Transactions import TransactionManager
 
 #Reference the active Document and application
 doc = DocumentManager.Instance.CurrentDBDocument
 uiapp = DocumentManager.Instance.CurrentUIApplication
 app = uiapp.Application
 
#Start scripting here:
 
 OUT = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Doors).WhereElementIsElementType().ToElements()

I get this error for your script:
ergerge

@DavidDK, that’s because I missed the for loop to iterate through the list of items . Try this one:

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

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)

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

doc = DocumentManager.Instance.CurrentDBDocument
famtype = UnwrapElement(IN[0])

TransactionManager.Instance.EnsureInTransaction(doc)
# Make sure the familysymbol is active
for i in famtype:
	if i.IsActive == False:
		i.Activate()
		doc.Regenerate()
TransactionManager.Instance.TransactionTaskDone()
OUT = famtype
3 Likes

Yep! That’s perfect, it works on all elements I think :slight_smile:
(it doesn’t work anymore after a simple Family Type node though, but I do not use it so it’s fine by me!)

Thanks a lot!

@john_pierson no it’s not a public repo (maybe in the future?)

we’ll look into this thanks!

1 Like

This just solve an issue i Had thanks a lot =D

Even after a year, thats what i love about forums they are amazing.

Thanks @zhukoven

2 Likes