Is there a way to get wall assembly Sweeps profile name?

i am trying to get wall sweeps profile name in dynamo but i am not getting anything ?

Can you show us what you have so far?

@AmrinderWaraich, there are different ways to do this, depending on what you’re trying to get as an output. Say, you can get all WallSweep profiles from your model, and query their names like this:



Or if you need to get the specified profile from the wall, this would be another story.
Please clarify your question, and you’ll probably get the answer.

2 Likes

I tried its not working because i want sweeps profile name from wall assembly

1 Like

@AmrinderWaraich, this would be a bit harder, as soon as your profile is nested inside the wall. The only way to extract it is by asking for the ProfileId class of the WallSweepInfo (http://www.revitapidocs.com/2018/6678775e-5c0b-375b-957c-c4bad537a88e.htm) via the python code, and returning an element by id.

So here’s what I came up with:

The python code extracts profile(s) from your walls, while the “Element.Host” node from the clockwork package returns the walls that host your profiles.

Below is the python code:

#Author Konstantin Zhukoven @ https://zhukoven.com
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

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

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
doc = DocumentManager.Instance.CurrentDBDocument

swp = UnwrapElement(IN[0])
swprofile = []
for i in swp:
	swprofile.append(doc.GetElement(i.GetWallSweepInfo().ProfileId))
#Output
OUT = swprofile

Let me know if this worked for you.

2 Likes

Thanks @zhukoven it works flawless
Thank you…

@AmrinderWaraich, you’re welcome :wink:

Hello Zhukoven,

can you please share with me, if you have any node for wall sweeps profile change in dynamo but i am not getting anything ?