Revit Architecture Forum
Welcome to Autodeskโ€™s Revit Architecture Forums. Share your knowledge, ask questions, and explore popular Revit Architecture topics.
Showing results forย 
Showย ย onlyย  | Search instead forย 
Did you mean:ย 

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

Message 1 of 3
219 Views, 2 Replies

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

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.




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.




This is my Dynamo graph:




And this is my Script:


from Autodesk.Revit.DB import *

from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

# Begin transaction

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

OUT = updated_count


Any suggestions would be greatly appreciated as ๐Ÿ˜Š


Thank you so much!

Tags (2)
Labels (1)
Message 2 of 3

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

Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin
Message 3 of 3

I'll ask there, thank you for the suggestion ๐Ÿ˜Š

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Customer Advisory Groups

Autodesk Design & Make Report