PACK 02 - Model Maintenance- SCRIPT 3 / 4 - Exclude / Include From View Template - BIM One Inc

PACK 02 - Model maintenance - SCRIPT 3 / 4 - Exclude / Include From View Template - BIM One Inc

Here is the last script of 4 today

With this script you will be able to:

Include or exclude a parameter or a series of parameters from view templates.

4-step process

  1. Select the view templates you wish to process
  2. Select the parameters
  3. Choose to include or exclude those parameters from selected view templates
  4. A window dialog will report the elements processed.

Warning

Revit API, through Dynamo, does not allow the script to process 3D view template.

and for the french speaking people :slight_smile:

UPCOMING SCRIPTS

We can’t wait to release our next Dynamo Script Pack. The third pack should consist of tools to help you replace data or elements in batch.

If you have any questions about these scripts, please do not hesitate to contact us on dynamo@bimone.com. If you’d like to receive the latest news, sign up here to our monthly newsletter.

INTERFACE

All scripts have an interface when needed (with thanks to our friends at data|shapes).

DEPENDENCIES

We worked hard to develop our scripts with as few dependencies as possible to make deployment and maintenance straightforward. By dependencies, we mean custom nodes that need to be downloaded for the script to be functional.

Languages

Our scripts are bilingual. The first section of each script starts with a Python script that queries the language of the Revit interface and conditions the text of the interface.

WARNINGS

  • These scripts are distributed free of charge by BIM One Inc. They have all been tested and used by our specialists before being released. However, Dynamo, like computing, is not an exact science. Some scripts may not work as expected on your computer or in your projects. We cannot be held responsible for your use of it. Obviously, we will try to correct any problems or answer your questions as best we can and according to our availability. Our goal is to follow up once a week.
  • Like any Dynamo script, it’s essential to understand that manipulations on a file can cause an unwanted result: Always save your file or a copy before proceeding.

*In order to have a correct result, it is necessary to close and reopen Dynamo every time you use the same script on the same file.

BIM1_ExcludeIncludeFromViewTemplate.DYN (214.7 KB)

5 Likes

@Jean-Marc, is there a way to have certain “default” selections already checked in the boxes?

@JustinStirling
input 7 in both pythons in the UI section you can specify indices if default values (you might have to make sure it sorts your default choices properly everytime.)

Thanks @Jean-Marc. Here’s the error I’m getting, and I’m pretty sure it has to do with how I’m specifying the indices. Any assistance would be greatly appreciated!

try flattening the list of indices

I tested it, it does take a flattened list: [0,1,7]
you fed it with a list [[0],[1],[7]]

1 Like

Works like a charm, thank you for the advice @Jean-Marc!

Are you aware of any changes to the API (or other workarounds) to be able to adjust the “include/exclude” for visibility graphics of linked models with Dynamo?

1 Like

not that I know of.

you might be able to use filters (I am not convinced writing it though)
I don’t know the end result you are expecting or the context
if that implies editing links, two options: open in background, or https://github.com/bvn-architecture/RevitBatchProcessor

I should have been a little more clear. I want to be able to manipulate the visibility of let’s say a linked structural or architectural model floor plan within my host MEP model. Looking to turn on/off certain parameters in the Revit Link tab for Model Categories and/or Annotation Categories. I’d also like the ability to turn on/off the Halftone and/or Underlay option for Revit Links as well.

we are going more and more off topic, best way would be _ I guess you know that _ assign a template properly setup with those parameters. and if you already have templates on you views, untick the whole link properties portion, assign a new template that has the proper parameter setup just for the link portion of the template, then reassign the original template.

I suggest you post that issue in a new post.

Yes, exactly the “manual” process. Looking to find a way to automate it instead. I can post a new topic, but I think I already know what the answer is…it can’t be done until the Revit API is open to this area. Thanks for your time!

New topic posted here:

Hi Jean Marc. Thanks for the graph. However, it doesnt seem to work on the shared parameters of the views, only in system parameters:

The problem must be in this part of the graph, since it gives back an empty list at item 1 in the list of the “List View Template parameter names group” , wich correponds to the shared parameters

Any idea how to fix it? Thanks

Hi @abaroja,
you are right, there is a mistake in the filtering there. I just fixed it
All should be working as expected now,
cheers and thanks for the head’s up.
jm

BIM1_ExcludeIncludeFromViewTemplate.DYN (214.7 KB)

Hi @Jean-Marc , it works perfect now with RVT in English Language.

Thank you!