Is there a way to create a sloped buildingpad programmatically?

Anonymous

Is there a way to create a sloped buildingpad programmatically?

Anonymous
Not applicable

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.

0 Likes
Reply
1,024 Views
6 Replies
Replies (6)

jeremytammik
Autodesk
Autodesk

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

0 Likes

jeremytammik
Autodesk
Autodesk

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

FAIR59
Advisor
Advisor

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);

 

 

 

t.almeidaeng
Contributor
Contributor

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.

 

 

 

0 Likes

Anonymous
Not applicable

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.

0 Likes

Anonymous
Not applicable

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.

0 Likes