Using Dynamo to automate "Mark" field in properties of curtain panels

jessica_vazquezKLYLC
Explorer

Using Dynamo to automate "Mark" field in properties of curtain panels

jessica_vazquezKLYLC
Explorer
Explorer

Hello everyone:

 

I've been trying to use Dynamo to automate the "Mark" field in my curtain panels according to the "Mark" field of their curtain wall host.

 

In my project I use a wall family as a curtain panel as it's needed to add walls and windows to said walls. Since the positioning of these walls and windows does not match exaclty with the curtain grids,  adding a panel as a window and door is not an option. Therefore I don't use a panel family as "Curtain Panel" for my wall.

 

jessica_vazquezKLYLC_1-1710754552503.png

 

This Mark field is used for schedules as I work with prefab panels and I add the name of the host wall to the panel.

 

My problem is that I don't know how to get Dynamo to identify the walls being used as a Panel in my curtain walls. I have been trying for Dynamo to identify regular walls from walls being used as Panels by using the Parameter "Categorize as" as a difference between the two. I know that the "Categorize as" is an integer with values 0=Panel and 1=Panel. What I want is for the Mark field in my curtain panels automatically updates everytime a change this parameter in the host wall.

 

jessica_vazquezKLYLC_2-1710754702215.png

 

This is my Dynamo graph:

 

jessica_vazquezKLYLC_3-1710755078672.png

 

And this is my Script:

 

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

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

doc = DocumentManager.Instance.CurrentDBDocument

# Begin transaction
TransactionManager.Instance.EnsureInTransaction(doc)

panels = UnwrapElement(IN[0])
updated_count = 0

for panel in panels:
    # Assuming the "Type Mark" of the host curtain wall needs to be synchronized
    type_mark = panel.LookupParameter("Type Mark").AsString()
    if type_mark:
        # Loop through related curtain panels to set "Type Mark"
        # This example assumes direct access to related panels; adjust logic as needed
        panel.SetParameterByName("Type Mark", type_mark)
        updated_count += 1

TransactionManager.Instance.TransactionTaskDone()
OUT = updated_count

 

Any suggestions would be greatly appreciated as 😊

 

Thank you so much!

0 Likes
Reply
Accepted solutions (1)
958 Views
4 Replies
Replies (4)

Alfredo_Medina
Mentor
Mentor
Accepted solution

I suggest that you post your question in the Dynamo forum, where all the experts are. Here: https://forum.dynamobim.com/


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
0 Likes

jessica_vazquezKLYLC
Explorer
Explorer

I'll ask there, thank you for the suggestion 😊

0 Likes

bim6MRER3
Explorer
Explorer
is this also applicable ducts & pipe ?
0 Likes

azad.Nanva
Advisor
Advisor

did you have solution?

If it solves your problem, please click Accept to enhance the Forum.
0 Likes