Voltage values and voltage drop values for circuits not consistent with Revit app
s-github-2 opened this issue · comments
Describe the bug
Voltage values printed in RevitPythonShell dont match those in the application for electrical circuits so trying to figure out what is the cause of the discrepancy
from Autodesk.Revit.DB import FilteredElementCollector as Fec
from Autodesk.Revit.DB import BuiltInCategory as Bic
e_cir = Fec(doc).\
OfCategory(Bic.OST_ElectricalCircuit).\
WhereElementIsNotElementType().ToElements()
print ('len ecircuits',len(e_cir))
for e in e_cir:
print (f'Name {e.Name}',f"Cir Number {e.CircuitNumber}",f"Length: {e.Length:.2f}",f"Voltage: {e.Voltage:.2f}")
print (f"Apparent Load {e.ApparentLoad:.2f}",f" Vdrop: {e.VoltageDrop:.2f}")
print ("---")
To Reproduce
View properties for electrical circuits in the Revit app and then compare with output from the script copied above .
I am getting values that are approximately but not exactly 10 times larger than the voltage drop shown in the Revit app itself for the same electrical circuit.
For example a circuit with Voltage Drop 0.24V in Revit Application shows up as 13.13 using the above script
This is the output of the script for my circuit. Circuit number 1 is a 120V circuit which is printing Voltage 1291.67 for some reason and the voltage drop is getting reported as 2.53 instead of 0.24
len ecircuits 5
Name 1 Cir Number 1 Length: 19.60 Voltage: 1291.67
Apparent Load 3875.01 Vdrop: 2.53
Name 2 Cir Number 2 Length: 31.82 Voltage: 1291.67
Apparent Load 12378.50 Vdrop: 13.13
Name 3 Cir Number 3 Length: 53.77 Voltage: 1291.67
Apparent Load 10763.91 Vdrop: 19.29
Name 9,11 Cir Number 9,11 Length: 22.91 Voltage: 2238.89
Apparent Load 11194.47 Vdrop: 4.75
Name 10,12 Cir Number 10,12 Length: 40.59 Voltage: 2238.89
Apparent Load 11194.47 Vdrop: 8.42
Expected behavior
Values should match precisely
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS:Windows 11
- Revit 2024
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
found the answer in this post https://thebuildingcoder.typepad.com/blog/2010/06/voltage-units.html
Revit insanely uses a MIX of unit systems - all else metric except for length which is why voltage internal is weird
Question: What is the internal unit used by Revit for voltage? In the API, the ElectricalSystem.Voltage property returns a value that is about 10.76391 times the expected value in Volts, i.e., I get 1291.669 instead of 120 V. The same applies to the TrueLoad property. So I assume Revit is using some non-standard unit for voltage?
Answer: Electrical potential can be defined using the following more fundamental units:
(Length2 * Mass) / (Time3 * Current).
In Revit, this formula makes use of the following units:
Length: feet
Mass: kg
Time: s
Current: A
The unit Volt is defined in the same way, of course, but uses the SI unit meters instead of feet, as specified by the International System of Units SI.
As a result, to convert the Revit internal database voltage unit to Volts, you have to multiply it with 0.3048^2.
Not an issue with RevitPythonShell but just a #$%@ issue with Revit internal units needing 0.3048^2 scaling for voltage