Revit MEP Forum
Welcome to Autodesk’s Revit MEP Forums. Share your knowledge, ask questions, and explore popular Revit MEP topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Incremental Value with drive conditional formula

19 REPLIES 19
Reply
Message 1 of 20
JAOliveira
2839 Views, 19 Replies

Incremental Value with drive conditional formula

Hi everyone,

 

I am trying to create a few parameters to add to my mechanical equipment family (AHU) in Revit MEP.

 

The idea is to create/generate automatically a new reference number to each AHU add to the project.

 

How can I create a parameter that is subject to a unique reference number (new parameter) that increments the reference each time I add a new AHU.

 

I am looking for a solution using a conditional formula but unfortunately I can't find a correct solution!

 

Any ideas or suggestions?

 

19 REPLIES 19
Message 2 of 20
abulla
in reply to: JAOliveira

This is probably not the answer you're looking for, but the built-in parameter "Mark" will automatically increase as you place components.

Message 3 of 20
CoreyDaun
in reply to: JAOliveira

I believe that abulla is right in that the Mark Parameter will increase as described, but for it counts ALL elements. There is no other viable parameter that will behave like this.

 

If you create a Schedule, and under the Sorting/Grouping tab, check the box for "Itemize every instance" and then duplicate tag values will be very obvious in the schedule. It's very easy to change these from the schedule, too.

Corey D.                                                                                                                  ADSK_Logo_EE_2013.png    AutoCAD 2014 User  Revit 2014 User
──────────────────────────────────────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate to further enhance these forums. Thank you!
Message 4 of 20
Sandleaz
in reply to: JAOliveira

The idea is to create/generate automatically a new reference number to each AHU add to the project.

 

Generated by REVIT?  Why?  I am sure any time you create an element, REVIT assigns a unique ID to it ...

 

How can I create a parameter that is subject to a unique reference number (new parameter) that increments the reference each time I add a new AHU.

 

Again, if it's not a user input, why are you trying to track it if you are at all?  I don't know if you can create a parameter and allow REVIT to insert a randomly generated value ... but I am sure there's a random function somewhere or you can program one in.

 

I am looking for a solution using a conditional formula but unfortunately I can't find a correct solution!

 

Any ideas or suggestions?

 

I am not sure what you're trying to calculate.  You have to be more specific/clear about what you're trying to do.

Message 5 of 20
dvilleneuve
in reply to: JAOliveira

 

I think the intent is to assign a number in sequentail order (not randomly assigned) to each AHU as it is placed. For Ex. adding 5 AHU's to the project would in a perfect world achieve the desired result of 1,2,3,4 and 5. By assigning each AHU a "designation" you can do things such as tag each as such: AHU-1, AHU-2, AHU-3, AHU-4 and AHU-5.

 

Again another desired result, (which I am not sure can be acheived) but I too would like this feature. When deleting AHU-3 the result would be AHU-4 and AHU-5 then become 3 and 4.

 

Using the Mark value does increase with each addition of any Mechanical Equipment (or any category) which will skew the numbers if the AHU's are not placed all at the same time. Also the mark will not reduce the number if one is deleted, and finally I do not use Mark values because when manually changing the number to be what you would like the potential for Duplicate Mark Value errors increase.

 

I have been trying to achieve this result as well and have not yet found a good solution.

Message 6 of 20
JAOliveira
in reply to: abulla


@abulla wrote:

This is probably not the answer you're looking for, but the built-in parameter "Mark" will automatically increase as you place components.



Abulla,

 

Thanks for your reply.

I am aware of the built-in parameter "Mark" that automatically increases when you place any component...

But the problem is if for example you add an AHU, FCU and after AHU.. The mark for this elements will by placement order 01 (AHU), 02 (FCU) and 03 (AHU)... So imagine this in a big project! Make sense?

 


 

Message 7 of 20
JAOliveira
in reply to: CoreyDaun


@Anonymous wrote:

I believe that abulla is right in that the Mark Parameter will increase as described, but for it counts ALL elements. There is no other viable parameter that will behave like this.

 

If you create a Schedule, and under the Sorting/Grouping tab, check the box for "Itemize every instance" and then duplicate tag values will be very obvious in the schedule. It's very easy to change these from the schedule, too.



CADastrophe,

Thanks for your reply.

 

I am also aware that I could create a Schedule in Revit and easily change "Mark" parameter and update to correct reference that I was looking for. Is this a easy solution but I am just trying to challenging it a bit more!

 

But the idea, is to create a 2 or 3 parameters (or less if not necessary) to add in mech equip family and associate these new parameters to a conditional formula will generate to a new reference.

Unfortunately my "relation" with conditional formulas is not the best and that why I am looking a idea/suggestion to figure out a solution!

! Man Embarassed

Message 8 of 20
CoreyDaun
in reply to: JAOliveira

I understand your aims, but unfortunately it isn't possible with Revit's current functionality.

 

Though, I do think that this would be a decent Wishlist item and don't imagine that it would be too difficult to accomplish for the programmers. However, this must me an optional function, which would make it's incorporation complicated. As a couple of examples why: I have seen such labeling as "EF-1" and "EF-1A", an existing unit may be labeled "AH-5" but is the only AHU referenced in the Project.

 

Anyway, I would not expect to see any kind of advancement like this implemented, seeing as though there are so many other useful concepts that have been thoroughly ignored for years.

Corey D.                                                                                                                  ADSK_Logo_EE_2013.png    AutoCAD 2014 User  Revit 2014 User
──────────────────────────────────────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate to further enhance these forums. Thank you!
Message 9 of 20
JAOliveira
in reply to: Sandleaz


Sandleaz wrote:

 

Generated by REVIT?  Why?  I am sure any time you create an element, REVIT assigns a unique ID to it ... 

------------------------------------------------

Again, if it's not a user input, why are you trying to track it if you are at all?  I don't know if you can create a parameter and allow REVIT to insert a randomly generated value ... but I am sure there's a random function somewhere or you can program one in. 

-----------------------------------------

I am not sure what you're trying to calculate.  You have to be more specific/clear about what you're trying to do.


 

Sandleaz,

Thanks for your reply...

 

I know but this unique ID is generate automatically and without any rules and I've already exemplified in a post above. Is this useful? Maybe will be better if we could control that or maybe create a new option!

 

The idea is not Revit to generate a automatic "serial number" to each component... Is only to happen with the some speciifc families with the new parameters.

Example:

I add a new and first FCU from the project where the ID/reference from the new parameter that we create is 001, the second to be 002 - we could just simple create a text parameter, where we could just type the new reference or we could create something "smart" that will recognise the previous FCU as 001 and will automatically give 002 to the second, 003 to the third and so on...

 

Message 10 of 20
JAOliveira
in reply to: dvilleneuve


@dannyv79 wrote:

 

I think the intent is to assign a number in sequentail order (not randomly assigned) to each AHU as it is placed. For Ex. adding 5 AHU's to the project would in a perfect world achieve the desired result of 1,2,3,4 and 5. By assigning each AHU a "designation" you can do things such as tag each as such: AHU-1, AHU-2, AHU-3, AHU-4 and AHU-5.

 

Again another desired result, (which I am not sure can be acheived) but I too would like this feature. When deleting AHU-3 the result would be AHU-4 and AHU-5 then become 3 and 4.

 

Using the Mark value does increase with each addition of any Mechanical Equipment (or any category) which will skew the numbers if the AHU's are not placed all at the same time. Also the mark will not reduce the number if one is deleted, and finally I do not use Mark values because when manually changing the number to be what you would like the potential for Duplicate Mark Value errors increase.

 

I have been trying to achieve this result as well and have not yet found a good solution.


dannyv79,

 

Thanks for your replay...

 

Yes, is that what I am looking for and I know that is not a easy and clear solution but I am sure is possible to combine a few "new" parameters, add a formula and get the precious solution!

 

How did you try to find a solution? What have you done?

Maybe together we can achieve what both need!

 

Message 11 of 20
dvilleneuve
in reply to: JAOliveira


@JAOliveira wrote:

 

Thanks for your replay...

 

Yes, is that what I am looking for and I know that is not a easy and clear solution but I am sure is possible to combine a few "new" parameters, add a formula and get the precious solution!

 

How did you try to find a solution? What have you done?

Maybe together we can achieve what both need!

 


Unfortunately I think too many variables would need to be overcome to achive this through formula's only. I certainly don't mean to discourage, but I think the only way to achieve this would be through the API. Here is why I think this.

 

1. If we had a "Type of Parameter" that allowed us the ability of sequential designations similar to what "Mark" Provides we could accomplish what we are looking for by creating a label with 2 parameters "Equipment Type + Equipment Designation". Unfortunately this ability has not been written in.

 

2. I have attempted to isolate AHU's, VAV's, FCU's by using an "Equipment Type" Parameter which is easily achieved, however the "Mark" parameter is a hard coded parameter which will not allow us to populate formula capabilities. This stops us from using the "Equipment Type" parameter and "Mark" Together to achieve this. In addition this is not a viable option as I think I mentioned before it would most likely result in "Duplicate Mark Value" errors which creates more to clean up in the model.

 

3. Even if we knew of a formula function that would allow a number to be sequentially added to the previous number after finding the "Equipment Type" we would need the parameter to be a project parameter to be able to get it to work. This is the only way I could see us being able to pass a "+1" formula to an existing number each time a piece of Mechanical equipment is placed.

 

Unfortunately project parameters do not allow formulas which stops us again dead in our tracks.

 

With all of the walls I keep hitting the only way I can see this being achieved without Autodesk providing us these features in the platform is through the API which I am not yet fluid enough in writing C# code.

 

Again I do not mean to discourage, I am open to ideas and solutions to solve this problem but I am running out of options.

Message 12 of 20
Sandleaz
in reply to: JAOliveira

I add a new and first FCU from the project where the ID/reference from the new parameter that we create is 001, the second to be 002 - we could just simple create a text parameter, where we could just type the new reference or we could create something "smart" that will recognise the previous FCU as 001 and will automatically give 002 to the second, 003 to the third and so on...

 

Are you going to use this automatic parameter that has 001, 002, 003... in your drawings/schedules or is it something for internal use only?  If the latter, you can skip the following rant and i misunderstood you completely.

 

Before I take a stab at how you're going to try to achieve this (most likely through programming), you should ask yourself what is the benefits of this and the drawbacks of this.  You're trying to get REVIT to automate an easy yet important task as designating equipment! What if you don't like the number that REVIT gives your AHU?  What if someone else created a bunch of AHUs and wanted to number them differently but couldn't because that designation is solely dictated by REVIT and your formula or the order in which they were created?  What if you wanted to use text in your designations ... are you going to mess around the ASCII code to try to get the next AHU in sequence after 1A to be 1B or 2A?  Lets say someone accidently deletes an AHU, the other AHUs get moved down a spot (like you want them to?), then tries to undo but REVIT can't get the previous number back so that deleted/recovered AHU will get the next number in line?  How about multiple people working on a large project ... they're trying to create a bunch of VAV boxes but they keep getting designations that are far apart because other people are also trying to create VAV boxes.  Would that not annoy them if they already know which designations they want to use and not let REVIT and your formula decide what's best for them?  Don't get me started on copy/pasted items that are moved around, deleted, put on another design option that's to be either forgotten or deleted later on!  What about multiple files with multiple VAV boxes ... how will REVIT know what number to go to for the next VAV box? What if you wanted to renumber all your VAV boxes because something occurs late in the project that is unforseen?  

 

You ever wonder why the mark (or type mark) parameter acts the way it does?  Some smart programmer decided that it's cool that "mark" should be unique and warn the user that there's a duplicate of "mark" (because AHU-1 and VAV-1 can't happen, clearly the stupid user's fault for attempting it ... i just use my shared parameters and skip mr. smart programmer's warnings)!  Then he decided to write some code to get the next mark for a new element should be set to some next in line number or text so that you don't get a warning every time you create something (but when you change the mark, you'll most likely get that warning).

 

 

Message 13 of 20
dvilleneuve
in reply to: Sandleaz

 

All very valid points to consider on why to use or not to use such a feature in certain circumstances. Which I agree some of the points you make build a strong argument on why not to use such a feature in the situation of AHU-1, AHU-2. However knowing how to accomplish this method could apply it to a large number of situations that could benefit and have a strong argument on why you would want to use such a method. I would like to think of the application in which we are discussing to apply a possible method is only a vehicle for it's potential use.

 

Another example of where this could be applied is if you wanted to tag the number of FCU's or VAV's on a floor plan so that you can look  at the highest number on the plan to verify counts. Most likely an internal use only.

 

Ex. Level 1 - 1st Instance = 1.1

      Level 2 - 5th Instance = 2.5

 

Another possibility is an order of installation schedule (going way off topic here) where the sequential number assigned to FCU's or VAV's could be scheduled and assigned as the primary "Sorting/Grouping" parameter which will build a step by step schedule of installation based on the order they were placed.

 

These are only a few examples but my point is that each of us would be able to find a useful application for it's method depending on how each of our firms work.

 

 

Message 14 of 20

I have run into this issue with SQL and Access databases, and Revit (as is AutoCAD) is a big one.

 

The issue, I believe, is that once you create a Mark it saves it into the database, so even if you remove it, it was already placed and cannot be recreated. Access AutoNumber does the same thing.

 

For example:

I create a user ID for jsmith and assign a workstation, Revit installs and graphics card options. The Access DB gives it an AutoNumber of 12.

 

JSmith decides to leave the company and we remove the wokstation and user ID after they depart. But Access will not "re-use" the AutoNumber... ever. It goes on to 13 and marches up from there. Even compacting and repairing the database will not recycle the AutoNumber; it is gone.

 

So, as far as AHU's incrementally numbering, while that is a good suggestion and would be nice, I think Revit's "internal formula" would preclude that as is would go back to trying to reference something once associated with something else. Say:

 

I add a transformer and give it a Mark of "1" and proceed to circuit it. After a while, we realize that the transformer is incorrectly sized and remove it, replacing it with a new unit. Revit would "look" at Mark "1" as the original unit and then realize it was orphaned. Therefore circuiting it to the new unit requires more modifications.

 

I know I did some custom work in AutoCAD MEP with databases a while ago, it was very much relational in the database design. That has always been an issue with databases with incremental ID numbering.

Message 15 of 20
seanfinlay
in reply to: dvilleneuve

Message 16 of 20
s.borello
in reply to: JAOliveira

You could utilize the comments param... add a number to each piece of equipment perhaps. 

Message 17 of 20
seanfinlay
in reply to: s.borello

In my case I am trying to put a sequential number against a pipe penetration family. There will be a couple thousand in the project. Manually entering and trying to keep track of what numbers have been entered would be too laborious. 

Message 18 of 20
s.borello
in reply to: seanfinlay

Oh yeah... that's definitely out... good luck!

Message 19 of 20
johna
in reply to: JAOliveira

I once asked this question and did not find a direct way in doing it, it would be beneficial to have that certain functionality.

The Good News is there is a work around with the help of one or two add-in from the same maker.

ElementRenumber by Juan Osborne

Try it out, this is the closest solution i have to the same exact function i was looking for the same as yours.

 

Work Around,

1. Create Shared Parameter and add it to your Equipment(e.g AHU I.D.)

2. In your project you can isolate all AHU by filter or you can use add-in from Juan Osborne

FilterMore (this add-in is not free but cheap $2 one time purchase and believe me it is worth it)

FilterMore.JPG

3. Once you isolate all equipment then use the ElementRenumber and start clicking. it will populate the parameter with values and then you can create your own tag using the shared parameter.

ElementRenumber.JPG

 

It is still not the solution you hope you will get but it is a rather fast work around.

 

__________________

Criticize but don't hate
Message 20 of 20
johna
in reply to: seanfinlay

ooops replied to the original post, see my work around above.👆👆👆

__________________

Criticize but don't hate

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

Post to forums  

Rail Community


Autodesk Design & Make Report