.AsDouble() returns value in feet

.AsDouble() returns value in feet

adkaJK5HX
Participant Participant
1,165 Views
2 Replies
Message 1 of 3

.AsDouble() returns value in feet

adkaJK5HX
Participant
Participant

Hello!

 

I wanted to adjust the ceilings in my project, decrease the offset from level by 3 mm. I wrote a simple script in RPS in order to do that quickly. I have checked the storage type of the parameter "Height Offset From Level" and it said "double", so regarding the docs if I would like to set new value I will use .Set(Double). However, when I am checking the current value of the parameter it returns me value in feet. Could someone guide how I should approach it? How to set the parameter by using mm? The project units are in metric system. Thank you!

 

adkaJK5HX_0-1704288701139.png

 

0 Likes
Accepted solutions (1)
1,166 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni
Accepted solution

I am not aware of any method named AsDobule. Please spell check your question, especially its title.

  

That aside, the internal Revit database unit for lengths is imperial feet: 

  

  

To convert to some different unit, please make use of the appropriate methods provided by the Revit API, or simply DIY by multiplying with a suitable factor.

  

A rather large number of articles in The Building Coder discuss various aspects of unit handling:

  

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

adkaJK5HX
Participant
Participant

Edit: Sorry, I posted the topic in a rush. It was just a typo. I will look into the resources you have sent

0 Likes