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: 

door host wall

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
sonicer
1798 Views, 5 Replies

door host wall

I have door instance(q) and then I want get a wall host.

Need get a width of this wall.

 

what is wrong?

 

Element wallhost = q.Host;
 double width = wallhost.get_Parameter(BuiltInParameter.WALL_ATTR_WIDTH_PARAM).AsDouble();
5 REPLIES 5
Message 2 of 6
jeremytammik
in reply to: sonicer

Nothing. Looks perfectly fine to me.



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

Message 3 of 6
sonicer
in reply to: jeremytammik

don't know where is problem

 

also

this work .....but don't know after wrote symbol. the visual studio 2015 offer me get_Parameter function.....in sharpdevelop doesn't...

 

 double sirka = q.Symbol.get_Parameter(BuiltInParameter.DOOR_WIDTH).AsDouble();

Message 4 of 6
FAIR59
in reply to: sonicer

the Wall-instance doesn't have a BuiltInParameter.WALL_ATTR_WIDTH, but the WallType does.

 

                            Wall wallhost = q.Host as Wall;
                            WallType wallType = wallhost.WallType;
                            double width = wallType.get_Parameter(BuiltInParameter.WALL_ATTR_WIDTH_PARAM).AsDouble();

 

 

 

Message 5 of 6
sonicer
in reply to: FAIR59

thanks ...that work..

 

Btw....where can I find this information-  what is instance(familyinstance)  and what not ?

 

thx.

Message 6 of 6
FAIR59
in reply to: sonicer

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community