1

Dynamo Script

Within Dynamo I was able to adjust the title block per sheet but I was requested to simplify it into a button click using python only.

I can find the sheets but I can not adjust the parameters per sheet. I believe this is because the parameter I am trying to toggle on and off is located within the Titleblock and not on the sheet it self. I thought maybe I would need to unwrap these but I could not get the function to work outside of Dynamo. Any help would be appreciated.

sheet_collector = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Sheets) \
                                           .WhereElementIsNotElementType() \
                                           .ToElements()
for sheet in sheet_collector:
    print(sheet.Name)

The snippet above is how I am sourcing all the sheets and I have been able to find everyone but when searching for the custome parameter, it comes up nil.

1 Answer 1

1

To get the FamilyInstance of the title block you can use this:

var titleBlockFamInst = new FilteredElementCollector(doc, viewSheetId).OfCategory(BuiltInCategory.OST_TitleBlocks).FirstElement() as FamilyInstance;
Sign up to request clarification or add additional context in comments.

2 Comments

Thanks, FamilyInstance was what I needed to find.
Instead of trying to find the sheet and its corresponding title block, I just found every family instance I was looking for. Once I had all the correct instances I got the OwnerViewId. Then, using GetElement(id), I was able to get the matching sheet and access to all the correct information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.