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: 

Picking roof face

1 REPLY 1
Reply
Message 1 of 2
TomD43
394 Views, 1 Reply

Picking roof face

I am having trouble with a piece of code where I pick the face of a simple sloped roof, and then place a family instance on the face.

 

Everything seems to work fine, the family instance(roof hosted) attaches to the correct side of the roof, but it's position is a little lower then the upper most edge of the roof face, where it is meant to be. I investigated and it seems that this lower position corresponds to the uppermost edge of the reverse face of the roof! Any ideas why this is? In the picking, it is the front face that is highlighted, I'm not accidently picking the wrong face (or so it appears).

1 REPLY 1
Message 2 of 2
saikat
in reply to: TomD43

Hi:

 

I am not completely sure what the reason is, but can you probably see if this is related to flipping of the workplane. After you use the NewFamilyInstance() method to create the new instance, you can try flipping the family instance using familyinstance.IsWorkPlaneFlipped = true;

 

I am not sure if this will be of help, but worth a try. Also, can you provide a minimal buildable VS project using which I can try to reproduce the behavior at my end. If it helps, please include the minimal RVT too. Please make sure that the code in the VS project is minimal and buildable.

 

Thanks

Saikat

 



Saikat Bhattacharya
Senior Manager - Technology Consulting

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