Volt Amp Data Type?

Volt Amp Data Type?

MuirEng
Collaborator Collaborator
1,288 Views
4 Replies
Message 1 of 5

Volt Amp Data Type?

MuirEng
Collaborator
Collaborator

Hi, I am working on a little script to check device breaker size versus circuit load.

 

If I look at an electrical device in dynamo I see "LOAD" as 300VA when I put it through Element.Parameters. This is the right value, but I want that 300 value for use in some equations.

 

If try to extract it directly using Element.Get.ParameterValueBy name then it comes in as 3229, as a system.double data type.

 

Screen shot of my script attached.

It looks like Revit encodes 300VA as 3229 and Element.Parameters knows how to translate it properly.

Can anyone help me understand this encoding and help me get the value out in a useful form?

 

thank you

 

Brian Muir, P.Eng, Muir Engineering
0 Likes
Accepted solutions (1)
1,289 Views
4 Replies
Replies (4)
Message 2 of 5

stever66
Advisor
Advisor

Maybe try the StringToNumber block?

 

I was also looking at String from Object, and Convert Between Units, but my money is on the first one.

 

Or maybe a code block that takes the parameter and uses param.AsValueString();

 

 

 

0 Likes
Message 3 of 5

Anonymous
Not applicable
Accepted solution

Follow this post:

http://thebuildingcoder.typepad.com/blog/2010/06/voltage-units.html

 

Basically, Revit mixed SI and English and voltage is represented by other units.  So you need to undo that.   If you multiply 3229 by .3048^2, you get 300.  (1ft = .3048 meter).   Hope this helps!

 

Tak Au,

 

 

Message 4 of 5

MuirEng
Collaborator
Collaborator

Thank you. I figured out the ratio but I had no idea where it came from. Amps and Volts affected by meters and feet? That's crazy!

Brian Muir, P.Eng, Muir Engineering
0 Likes
Message 5 of 5

josh_moore
Enthusiast
Enthusiast

This was a helpful post for me as I was having an issue with Wattage parameter and it is the same solution to multiple the AsDouble value by .3048^2 to get the watts readable to match the AsValueString.

0 Likes