How to read/write to Catchment Properties using .Net API?

How to read/write to Catchment Properties using .Net API?

soonhui.ngu
Enthusiast Enthusiast
1,090 Views
3 Replies
Message 1 of 4

How to read/write to Catchment Properties using .Net API?

soonhui.ngu
Enthusiast
Enthusiast

For a catchment, I want to be able to read/write the catchment properties such as runoff coefficient, Referenced Pipe Network Structure programmatically, for interoperability with other software:

catchment properties.png

 

However, it seems that there are no relevant properties under Autodesk.Civil.DatabaseServices.Catchment. And there is a post that somehow manages to export the referenced structure, by somehow exploiting the CatchmentLabel property ( which to me seems very brittle). But I doubt whether the code will work for all properties, under both read/write condition ( not just read).

 

Anyway to do this?

0 Likes
1,091 Views
3 Replies
Replies (3)
Message 2 of 4

soonhui.ngu
Enthusiast
Enthusiast

An additional question. How to create a Catchment using .Net API?

 

There exists two overloads for Catchment.Create(), but one returns RXObject and another DisposableWrapper, instead of the usual ObjectId, so I'm quite unsure how to use them.

Message 3 of 4

augusto.goncalves
Alumni
Alumni

Unfortunate the Catchment feature is not fully exposed on the API, you can see a few methods at http://docs.autodesk.com/CIV3D/2019/ENU/API_Reference_Guide/html/54440d04-8d43-9df3-bdd3-d5993aa9c27...

 

Also the constructor you mentioned are intended for internal (reason why it doesn't return the ObjectId expected)

Regards,



Augusto Goncalves
Twitter @augustomaia
Autodesk Developer Network
Message 4 of 4

soonhui.ngu
Enthusiast
Enthusiast

@augusto.goncalves , in that case, how can I workaround and still retrieve the catchment property via .Net API?

0 Likes