Hi,
I’ve created a Dynamo 2.3 graph for extracting information from projects in different Revit versions. However, I have some issues with nodes that are no longer compatible with the newer version, Dynamo 2.13. Specifically, the node “Purge unsed” from Genius Loci are not woking as in Dynamo 2.3.
I got this node to count the number of elements that can be purged.
Is there a way to count the total number of items that can be purged that are compatible with both Dynamo 2.3 and 2.13 without relying on additional packages ?
Thank you
Did you install the DynamoIronPython package from the package manager
4 Likes
There is an out of the box Purge node as of 2.6 if memory serves, though the exact version may be earlier. It’s likely that 2.3 is on the downward slope of adoption, so you may be able to move to that method and spend the time getting projects upgraded as you are down to the last few months of support anyway.
Hi @john_pierson,
I’m not sure. How can I check this?
I’m not quite sure what I have to do in this case
Hi,
Choose the DynamoIronPython2.7 package. (This is the version installed by default in previous versions of Dynamo).
ok @Alban_de_Chasteigner
I’m feeling a bit lost with the new interface, and I’m trying to figure out this IronPython 2 or 3 this. Also, do I need to install IronPython 3?
Thanks a bunch for assisting me.
The release notes and this blog post might help: Dynamo Core 2.13 Release - Part 3/3 - Dynamo BIM
For completeness in Revit 2024 you can utilise the following code to do it natively in revit 2024.
NOTE: It only works in revit 2024 because of the addition of the purgeunused method!
3 Likes
Hi,
for info since Revit 2022 “eTransmit” assemblies are available in Dynamo context
so, it easily to use it
import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
clr.AddReference('eTransmitForRevitDB')
import eTransmitForRevitDB as eTransmit
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
uidoc = uiapp.ActiveUIDocument
app = uiapp.Application
for i in range(3):
eTransmitUpgradeOMatic = eTransmit.eTransmitUpgradeOMatic(app)
resultPurg = eTransmitUpgradeOMatic.purgeUnused(doc)
OUT = resultPurg, doc.Title
if the assembly is not loaded you can try to load it by adding the path to the sys.path
4 Likes
Hi everybody,
I finally created a python script node base in the code of Alban de Chasteigner in the node called “Purge Unused” of GeniusLoci.
This approache still work from versions 2020 to 2023.
Thank you all.