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: 

Is there a way to create a sloped buildingpad programmatically?

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
1008 Views, 6 Replies

Is there a way to create a sloped buildingpad programmatically?

Hello everyone, I'm trying to create a sloped building pad but unfortunatelly I couldn't find a way to pass the line arrow like the we can do on floors. And I couldn't find a way to edit the pad so I could inject slope information as well. Is there a way to do that?

 

Thanks in advance,

Thiago Almeida.

6 REPLIES 6
Message 2 of 7
jeremytammik
in reply to: Anonymous

Dear Thiago,

 

Happy New Year to you!

 

I cannot answer your question offhand, so I passed it on to the development team.

 

Cheers,

 

Jeremy



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

Message 3 of 7
jeremytammik
in reply to: Anonymous

Dear Thiago,

 

I heard back from the development team. They say:

 

As the owner of Site, I don’t think we provide the API functions for sloped building pad yet, including creation and edit.

 

So, right now, I am not sure there is a way to do that…

 

Sorry for the bad news.

 

Cheers,

 

Jeremy



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

Message 4 of 7
FAIR59
in reply to: Anonymous

As there is no direct way to create a sloped buildingpad, you could go the indirect route by copying a buildingpad from an existing document.

 

The drawback is that you have to know the shape of the buildingpad  in advance, as you cant change it using the API. (setBoundery will remove the slopearrow!)

 

workflow:

 

preparation:

create helperDocument manualy (containing 1 toposurface and 1 sloped buildingpad)

 

programming:

load helperDocument

find modellines of the boundery  and the slope arrow using the delete and rollback trick.   (   List<ElementId> _Ids = doc.Delete(buildingpad.Id)  )

the slope arrow is the modelline with name "Slope Arrow".

 

reposition the modellines to new positions.

reposition the slope arrow  to new position.

set slope arrow heights (BuiltInParameter.SLOPE_START_HEIGHT & BuiltInParameter.SLOPE_END_HEIGHT)

 

copy to Target document

ElementTransformUtils.CopyElements(helperDocument, new List( buildingpad.Id) , target, Transform.Identity, opt);

 

 

 

Message 5 of 7
t.almeidaeng
in reply to: jeremytammik

Hi Jeremy , happy new year to you
I thought I was missing a method or a Util class. It is unfortunate that we don't have it at all , but let's hope it gets implemented in the future.

 

Thanks for your efforts,
Cheers,
Thiago Almeida.

 

 

 

Message 6 of 7
Anonymous
in reply to: jeremytammik

Hi Jeremy , happy new year to you
I thought I was missing a method or a Util class. It is unfortunate that we don't have it at all , but let's hope it gets implemented in the future.

 

Thanks for your efforts,
Cheers,
Thiago Almeida.

Message 7 of 7
Anonymous
in reply to: FAIR59

Hi FAIR59, Thank you for the hint, but unfortunately I am trying to create Building pad based on different scenarios and shape. I appreciate you help anyways.

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

Post to forums  

Autodesk Design & Make Report