Announcements

Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.

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

Reported door width is not actual width of door

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
474 Views, 1 Reply

Reported door width is not actual width of door

I've been using this to get the door width:

Parameter width = door.Symbol.get_Parameter(BuiltInParameter.DOOR_WIDTH);

..It works fine for 3' doors, but still reports 3' for double wide doors, where i think it should be reporting 6'.

Is this expected behavior and/or should I be looking at the frame type or Identity data to determine if its 2x the reported width?

For these 'double wide' doors, I see the frame type is S2 ..I don't find much documentation frame types so I'm not sure if this is something I can count on in my code.

I also see the Identity data for the door has a 'Paired door' parameter, with a value of PR. That makes more sense since paired door is basically a double door. Is this the correct parameter to look at? If so, is there an easy way to get at it programatically? I don't see it showing up when  traversing the built in parameters using:

foreach (Parameter p in instance.Parameters)
{
BuiltInParameter biParam = (p.Definition as InternalDefinition).BuiltInParameter;

...

}

 

Tags (2)
1 REPLY 1
Message 2 of 2
jeremytammik
in reply to: Anonymous

Dear Rlmccorm,

 

Thank you for your query.

 

I see no error (or even the possibility of making one) in the code snippet you share.

 

My first impulse would have been to say that this is a typical case of GIGO or garbage in, garbage out:

 

https://en.wikipedia.org/wiki/Garbage_in,_garbage_out

 

Whatever the person who defined the family and its symbols put in there is what you get back in the query.

 

However, since you also point out the existence of the frame type and 'Paired door' information, these settings may be intentional, and you may need to take them into account accordingly.

 

From the API point of view, there is really no way to tell.

 

You need to determine the intention of the content creator and best usage practices for that content.

 

That, again, has nothing to do with the API, so you may be better of discussing this question further in a new thread in the architectural forum.

 

I hope this helps.

 

Good luck!

 

Best regards,

 

Jeremy

 



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

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

Post to forums  

Autodesk Design & Make Report