using an "invalid" name in a formula

haydenwse
Collaborator
Collaborator

using an "invalid" name in a formula

haydenwse
Collaborator
Collaborator

I have a bunch of families with a shared length parameter length with the name of "C-E" that are used many places in different projects.  I now need to use this parameter in a formula to find the path length of a sweep. 

 

Many years ago, when I was young and naive, I created this name (in my mind C hyphen E) and did not know about formulas or that Revit would read this as C minus E.  Is there either a way to change the name of the parameter in all of the families that it is used in or a way to pull the value from that parameter into another better named parameter that I can use in a formula? 

I tried using a reporting formula but could not get it work. see 1 report failure.

 

I tried to create a new parameter and using that name to drive "C-E" but it could not be loaded into the family that it nests to.  see name change, and failed attempts. 

 

 

0 Likes
Reply
Accepted solutions (1)
678 Views
14 Replies
Replies (14)

barthbradley
Consultant
Consultant
Accepted solution

Put brackets around the C-E when used in a formula. 

 

[C-E]

 

 

https://revitoped.blogspot.com/2014/10/parameters-with-math-characters.html

barthbradley
Consultant
Consultant

Regarding the Reporting Parameter in your Formula: is the dimension that uses this RP referencing only in-built host elements in the RFT, such as the host wall in a Door/Window Family Template? If not, Revit will throw this error:  

 

 

Reporting Parameter in Formula.png

0 Likes

haydenwse
Collaborator
Collaborator

This family is nested into another one which then drives the C-E perameter.  The nested family is a type perameter in that family along with a bunch of others so that I can switch type and adjust size in the project.  It all works very well except that I cannot get the total length of the sweep path which I would like to put onto a schedule.

I know that I could create a new shared parameter that did not have the "-" but it is in several dozen families and past experience tells me that this effort rarely ends well, and I end up breaking stuff.

0 Likes

barthbradley
Consultant
Consultant

Just post the families here so I can see how they are built.  Know you to do that?  As an Attachment to a reply post. 

0 Likes

haydenwse
Collaborator
Collaborator

@barthbradley  the [C-E] worked perfectly!  Thank you so much! 

This has frustrated me for years. 

haydenwse
Collaborator
Collaborator

@barthbradley 

I got so much closer but no joy in the end.  I got the nested family to have the length but cannot assign that length in the nesting family.  the nested family make one of a kind and the nesting family makes a parametric array.

0 Likes

barthbradley
Consultant
Consultant

You know, FWIW, this can be done quite effortlessly in the Project environment with Rebar.  

 

Rebar10.pngRebar11.pngRebar12.png

 

https://help.autodesk.com/view/RVT/2024/ENU/?guid=GUID-4C8C6094-D734-43B0-ACD9-D727A2C2B9DC

 

But back at the task at hand, I'm unclear what you want to do with the bar length in the nested family. Is it to drive something in the Array Family or is it just that you want the bar length to report in Project QTO Schedules?  To do that, make it a Shared Parameter. Then make the Family a Shared Family and nest it into the Array Family.  Once the Array Family is loaded in the Project, you'll be able to a QTO Schedule that reports all the individual bars and their lengths. 

0 Likes

barthbradley
Consultant
Consultant

HA! I just realized your family is an Electrical Fixture.  Out of curiosity, what are these "bars"? 

 

EFSchedBarLength.png

0 Likes

haydenwse
Collaborator
Collaborator

You said "You know, FWIW, this can be done quite effortlessly in the Project environment with Rebar. "

 

It can be done easily but not accurately.  I use rebar when I can, but it is too unstable.  Anytime anything gets added to the concrete, the rebar wants to adjust its cover clearance and ends up in all the wrong sizes.  Doing it this way, I can control the actual sizes and not get messed up by cover.  I end up with a lot of embedments such as steel plates and angles and they do not affect my needed cover, but Revit offset from them anyway.

0 Likes

haydenwse
Collaborator
Collaborator

The bar length is a reporting value that is calculated in type 01 ns.  The intent is to place it into the embeds family where it is arrayed, and that family calculate the number of bars.  Number of bars times length gives total length of bar.  Yes, this is rebar, but I use electrical fixtures families because I have no need for them and needed a way to make my own rebar that did not constantly think that it knew how much cover was needed.  This way, I can make rebar that is consistent and will never change unless I tell it to.

 

The Revit rebar is too unstable for my needs.

 

I cannot insert the type 01 ns into embeds as a shared family or I will need to click each individual instance to add it to an assembly.  In a column, I will have several hundred rebars and do not want to click my mouse that many times.  The array reports the quantity, and the schedule totals them.

0 Likes

haydenwse
Collaborator
Collaborator

I can see the bar length in _embeds but cannot assign use it.

0 Likes

haydenwse
Collaborator
Collaborator

FWIW, I do precast / prestress design and detailing and my drawings need to be dead accurate because the schedules are used for automated rebar cutting and bending.  I have been told that Revit cannot do this but the precasters I do work for would disagree.  I have one family that puts every component of a precast column in with a single click and some directions as to needs.  It is fully parametric for height cross section, reinforcement, number of stories and beams attached to one or both sides.

0 Likes

barthbradley
Consultant
Consultant

Why don't you just clear out all those Formulas in the Nested Family, and instead, associate those Instance Parameters to Parameters in the Array Family - and drive the Array Family Parameters with Formulas.  

 

Bar Length.png

 

Bar Length 2.png

0 Likes

haydenwse
Collaborator
Collaborator

This is not my actual family but a very stripped-down version which shows the problem.  In the actual family, the nested family is a type parameter and can be changed to many types of rebar such as straight, 90º, 135º, 180º hooks at on one or both ends, T1, T2, type 17 etc.  each one requires a different length equation, so bringing the length in with the rebar type lets each one to do its own thing.

Everything in this column family is parametric and can be driven to work for square or rectangular columns 12" and bigger.

0 Likes