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: 

New Sloped roof not visible

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
newbieng
830 Views, 3 Replies

New Sloped roof not visible

Hi, I have a problem creating a new sloped roof using code.

I use the basic sample shown in the guide (and in Jeremy's blog http://thebuildingcoder.typepad.com/blog/2015/09/revit-answer-day-and-creating-a-roof.html), so first I create a new FootPrintRoof and then I set the DefinesSlopes to true for each model curve and I set a SlopeAngle.

My macro doesn't have errors, but I can't see the new roof in any view, I can find it only in a Roof schedule but I cannot see the 3d element.

I have tried to refresh the view in the code and I have noticed that the roof appears on the screen only for one second and than it disappears again.

I have tried using Basic roof and Sloped glazing, but it doesn't work.

If I don't set the sloping, I can create a planar roof without any issue... I don't know what is the problem with the slope angle. How can I solve that and make the sloped roof visible?

 

Many thanks

 

Tags (1)
3 REPLIES 3
Message 2 of 4
jeremytammik
in reply to: newbieng

Reproduce the exact same roof manually and see what happens.

 

If there is an error, fix it and determine the difference.

 

If there is no error, you are doing something different programmatically than the manual approach.

 

Find the difference and fix that.

 

Cheers,

 

Jeremy



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

Message 3 of 4
newbieng
in reply to: jeremytammik

Hi Jeremy, thanks for answering me. As you suggested, I tried to create the roof manually and I didn't find any issue, so I came back to the code and cleaned it up and made some more test.

 

I can create a sloped Basic Roof and it appears correctly on the screen. The problem is limited to the Sloped Glazing: it doesn't appear on the screen, until I make a change on the schedule. If I manually change from the schedule its level, or its type it appears on the screen.

 

I'll keep on trying to understand how optimize that, any help is appreciated.

 

Thanks!

Message 4 of 4
newbieng
in reply to: newbieng

I would recap my trick, just to solve the problem I had.

What I'm doing now is create my sloped glazing and than simply set one of its parameters using API. I've tried many different parameters, using either parameters connected to the UI and descriptive parameters: all of them are ok to regenerate the correct visualization of the sloped glazing.

 

This is my trick, I hope it is useful! If anyone has a better way please let me know.

 

Regards 

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