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: 

Lookup Table using numbers?

28 REPLIES 28
Reply
Message 1 of 29
Gyvven
3155 Views, 28 Replies

Lookup Table using numbers?

I've been trying to make lookup tables for Mechanical Equipment to return values for KVA based on HP but I can't seem to get numbers to work despite the WikiHelp stating that you can. Lookup tables seem like they would be a great solution and would really help streamline things if they worked as stated. The only parameter type I've been able to get to work is length, though I haven't tried area, volume or angle, but certainly other and number don't work. I could take all of my parameters and create duplicates defined as length and convert them back and forth to get the lookup table to work but I'm wondering if anyone else has had success in getting numbers to return?

 

To return numbers I've tried all of the suggestions I've found including ##number##, ##other## and ##other##number, but only one suggestion has worked and the person posting said he was told by Autodesk to use length and then convert it to unitless by dividing by 1' or 1". This seems to work but it's not accurate because the value .528 KVA turns into 135/256" which then converts to .527344. I could probably change the units to feet instead of inches and gain a bit more resolution but I feel I should be able to bring in numeric values to populate my family without all the goofey workarounds.

 

An interesting thing I've discovered is that  there are 2 sub-folders in the Lookup Tables directory for Pipe and Conduit and the csv file for the Mechanical Equipment ONLY works if the file is in the Pipe folder and not in the main Lookup Tables folder.

28 REPLIES 28
Message 21 of 29
kitsmiller
in reply to: Gyvven

Okay; I'm just a little confused on why its important to use KVA instead of VA when Revit itself OTB is using VA?
Really all I was trying to do is get Revit to insert the FLA based on the NEC 2011 table.

Basically;
FLA*Voltage=VA(for 1 and 2 pole circuits)

FLA*Voltage*sqrt(3) = VA(for 3 pole circuits)

so
1 hp or 4.6*208=957 rounded up

1 hp or 2.1*480*sqrt(3)=1746 rounded up

Message 22 of 29
kitsmiller
in reply to: CoreyDaun

This looks promising; but where is the lookup table that you used in the formula?

Not sure how the formating of the .cvs file would go here. 

Message 23 of 29
Gyvven
in reply to: kitsmiller

I don't know why it's important to use KVA, but that's what my engineers want, that's what I'm giving them. My background is architectural and mechanical, very little electrical.
Message 24 of 29
CoreyDaun
in reply to: Gyvven


Gyvven wrote:
"Correct, I opened the CVS file and it says ##other##feet."

I see. Upon further testing, mine exporte changed to "##number##feet" when in fact it was "##other##" in the initial .CVS file. I believe that the "feet" extension to the "##number" is actually irrelevant, because I loaded that export version into the same Family and it works all the same.

 

Additionally, I tried modifying the original .CVS file to "##number##" (no "feet") and upon loading it into the Family, an error message pops up "Revit has encountered a serious error...".

 

BOTTOM LINE: use "##number##feet" for unitless values; Revit does not appear to add the feet units to the listed number.

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 25 of 29
CoreyDaun
in reply to: kitsmiller


kitsmiller wrote:

"Okay; I'm just a little confused on why its important to use KVA instead of VA when Revit itself OTB is using VA?..."


I changed the units to kVA to create an example family to suit the needs of the original request (which was kVA) but this could be VA just the same - just correct the Family Project Units under the Manage tab.

 


kitsmiller wrote:

"This looks promising; but where is the lookup table that you used in the formula?

Not sure how the formating of the .csv file would go here."


Attached is a .CSV file, and I shall explain the workings of it here. You can easily customize the CSV. file structure to suit your exact needs.

 

Below is the Lookup formula: 

size_lookup(Lookup_Table, "A", 0, Voltage / 1 V, Horsepower) * 1 A

 

Red = "Lookup_Table" references a Text Parameter which reads the name of the imported Lookup Table. This does not have to reference a separate parameter, and could instead just read the Lookup Table's name in quotes.

 

Green = Which column in the referenced CSV. file to retrieve the value from.

 

Gold = This is the value to return if the search is invalid and does not find an appropriate listing in the .CSV table. For instance if you entered 0.875 as the Horsepower (which is not listed in the Lookup Table) the value returned here would be 0 [zero].

 

Blue = This is the value that is looked up in the second column of the .CSV file (the first column is ignored). This is a mandatory argument to the function. Note that since the numbers in the .CSV table are unitless, the units must be stripped from the value, hence the "/1V".

 

Magenta = This is a secondary lookup value, which searches the third column of the .CSV file. This allows you to lookup more than one condition and report the appropriate value. In this example, it first searches for the listed Voltage and then searches for the listed Horsepower, and returns the result that matches BOTH conditions. This is an optional argument, and you can add more columns as needed.

 

Orange = This just applies the appropriate units to the unitless value that is looked up in the .CSV table. This can be easily modified to suit any non-Text Parameter Type.

 

 *Note that the first column in the .CSV file is ignored by Revit.

  V##number##feet HP##number##feet A##number##feet
1 200 0.5 2.5
2 200 0.75 3.7
3 200 1 4.8
4 200 1.5 6.9
5 200 2 7.8
6 208 0.5 2.4
7 208 0.75 3.5
8 208 1 4.6
9 208 1.5 6.6
10 208 2 7.5
11 230 0.5 2.2
12 230 0.75 3.2
13 230 1 4.2
14 230 1.5 6
15 230 2 6.8
16 460 0.5 1.1
17 460 0.75 1.6
18 460 1 2.1
19 460 1.5 3
20 460 2 3.4
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!
Tags (1)
Message 26 of 29
kitsmiller
in reply to: CoreyDaun

Very good explanation; thank you very much!

This is what I have put together with the input that I received from you guys.

It appears that this family is working very well; I did not include the entire table but now I have something that I can add to. 

Only issue that I did have was using Number of Poles in the formula; I just could not figure out a way to get it to let me use that in a formula which is why I put the work around for Single Phase in the Constraints. I tried several ways other than this to use Number of Poles but in the end it did not like it.

Note that the electrical information is based on the information Revit uses to connect loads.

i.e... I used it how it is named in the system; Number of Poles happens to be one of those system defined parameters; a lot of people like to change this to Phase or Number of Phase; I like mine to be named the exact way Revit names them.

Message 27 of 29
kitsmiller
in reply to: Gyvven

I would be interested to pick your brain on temperatures and GPM along with other systems on the Mech side; I do mostly Electrical but I create families all the time for other disciplines as well. I have done a little Mech and IM fairly good at Mech and Piping but I need more jobs to do in those areas to really grasp the impact at a final design level. Hopefully the next two projects coming up they'll let me off my leash so to speak.   

Message 28 of 29
CoreyDaun
in reply to: kitsmiller

Thank you for reawakening this thread! It worked out very well, and I'll give you Kudos for that!

 


kitsmiller wrote:

"...Only issue that I did have was using Number of Poles in the formula; I just could not figure out a way to get it to let me use that in a formula which is why I put the work around for Single Phase in the Constraints. I tried several ways other than this to use Number of Poles but in the end it did not like it..."


A problem with the method you have here is that the "Single Phase" options is bound to become "out of sync" with the "Number of Poles" because it is an Instance Parameter. I think you are best off changing "Single Phase" to a Type Parameter and creating two separate Family Types (one for Single Phase, one for Three Phase) and setting these Parameters appropriately.

 

The reason I bring this up is because if the Number of Phases is powering the Connector, a user is bound to eventually change or copy it and uncheck the "Single Phase" option while "Number of Poles" is still set to 3. If a user is required to change the Type in order to switch it between single and three-phase, they will more likely remain correct.

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 29 of 29
nmulder34
in reply to: CoreyDaun

Thanks to this thread I was able to make use of numbers in a lookup table. I also discovered two additional points:

  1. This does not work in 2013 that I could figure out. The exact same syntax worked in 2014.
  2. text_file_lookup in 2013 and prior was replaced with size_lookup in 2014. 2013 helps seems to indicate use of both. I was curious about this as I was seeing use of both in help, forums, articles, etc. but didn't understand the difference. Maybe someone else out there has more info on this?

Anyway, when I upgraded my 2013 family to 2014, size_lookup had automatically replaced text_file_lookup and it accepted the numbers in a lookup table no problem.

 

Thanks again.

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

Post to forums  

Rail Community


Autodesk Design & Make Report