Welcome to the Revit Ideas Board! Before posting, please read the helpful tips here. Thank you for your Ideas!
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Make substitution variables available everywhere where text can be entered

Make substitution variables available everywhere where text can be entered

In the world of software development there exists the idea of substitution variables. These are specially denoted words that when encountered by the run-time system are substituted with some well defined value that relates to the name of the variable. This idea is also often used in more high-level use situations such as when one designs a document header/footer in a modern word processor. There are a number of substitution variables available in this situation such as current page number, document title, author, etc. The special notation usually employs some kind of a symbol to denote that this is not a regular piece of text. To carry the word processor analogy, it could be something like $page_number$ (I just made that up).


I think that it would be very powerful to expose most of system parameters as substitution variables in Revit. One use case is to be able to access current view name within filter definitions. Then we could create a filter that filters out elements only if they appear on a particular view. Moreover, with partial matching and clever view naming conventions, we could create filters that filter out elements on a range of views whose name partially matches given criteria.


For example, I have a number of semi-opaque masses that I use to mask out portions of some of my 3D views. 3D view names follow a regular convention such as 3D_V1, 3D_v2, 3D_V3, etc. The masking masses are called 3D_V1_Mask, 3D_V2_Mask, etc. I would like to create a filter that hides these special masses in all views except for the ones where they need to appear. So the filter rule would be specified as something like this:




Note the string $current_view$_Mask in the filter rule. The run-time system (i.e. Revit) would substitute the variable $current_view$ with the exact name of the current view. In my case if the current view was 3D_V1 the rule would read: Family Name equals 3D_V1_Mask.


By the way, in the above example Family Name is an example of a substitution variable, but selecting it from a drop down box limits its potential use. Drop down boxes are fine but also having a more general way of referencing these parameters anywhere where one can enter plain text would be very powerful.





@Anonymous Very thorough explanation - thanks!


Here's another example use case:


Categories: Sections

Filter by: Sheet Number

does not equal

$current_view_Sheet Number$


Then the Filter would be unchecked to turn off all sections on sheets other than the one that the current view is on. That way I wouldn't have to always manually turn off sections in our key plan (or be forced to maintain different filters for each view - and remove filters from the template).

Not applicable

My example was quite specific. The $current_view$ variable was supposed to just hold the name of the current view but what you suggested exposes an even more powerful idea, that of objects and attributes. First we need to come up with some syntax for denoting these special bits of text. I used a '$' at the start and end of the keyword but it doesn't have to be that symbol. If we expand the original idea to objects and attributes then a slightly different syntax might be more appropriate. For example, assuming that an object referred to as current_view is available then we should be able to access its properties like so:






And so on. It probably doesn't make sense to expose all the properties but most could be exposed.


Going back to your example, a sheet is not a view so using ${current_view} might not work in this case. I don't have the right answer for you because I haven't spent all that much time thinking through all the use cases, it's just the beginning of an idea, but if this system was to well engineered, it would give us an incredibly powerful way of accessing and using all the meta data that is already there but can only be accessed with buttons.


Imagine how much more powerful your annotations could become if you were able to refer to all sorts of objects and their properties in the annotation and have that reference be updated automatically as the referred object changes during its lifetime.




Not applicable

I've just noticed that there is a growing number of requests to support the ability to contain view references in text notes etc. My system, if implemented, would definitely support that. In your text you would enter the view identifier and Revit would convert that into a hyperlinked view reference.


I can even imagine this working with autocomplete so that as soon as you type something like ${VIEW_REF} an autocomplete box would appear at the cursor with all the views available to choose from. I should be able to type a few letters of the view name to have the list automatically filter/narrow down.


I think this would be great.



Not applicable

What I find curious is that the Revit dev team use tools in their daily work that do exactly what I am suggesting (i.e. intelligent code editors and IDE's) but they're not seeing that these same tools would be really useful within Revit itself.




Great idea tomek. View reference in text is most important idea for me, but your idea is more universal and I guess it not to hard realized.


Whoah, 2018.


Yeah this a no-brainer. I'll contribute a very similar idea; we just need to be able to select any view or sheet parameters in the other half of the comparison:

'My_Item's_Parameter' is equal to 'My_View's_Selector'


or, more advanced:

Filter by

'My_Item's_Parameter' is greater than 'My_View's_Selector_Minimum'


'My_Item's_Parameter' is less than 'My_View's_Selector_Maximum'

We split up conduit racks for detailing on separate sheets, while showing them all on an overall plan. The elements have a designator parameter common to their rack, either consecutive integers or letters. As is, in order to hide elements that belong to the other racks, I have to create a 'not equal to' style filter and a template for each value. If I have 15 racks on a level, that's 15 filters and 15 templates; we could just uncheck filters on the template, but since for conduit specifically, the filters provide a different and more comprehensive way of controlling graphics, this turns it into a management nightmare.


Have there been any updates on this issues since 2017? 

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

Submit Idea  

Autodesk Customer Advisory Groups

Autodesk Design & Make Report