Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Programmatically accessing pipe data

21 REPLIES 21
Reply
Message 1 of 22
Geurt
2037 Views, 21 Replies

Programmatically accessing pipe data

Okay, I know this is the Discussion Group for customisation but the .Net group proposed this must be mentioned/asked here as well, so here goes.

 

In C3D (2012 or 2013), the Pipe Properties Dialog reports "Hydraulic Properties" of a pipe section. Through .Net (C#), I can access part data such as Hydraulic gradient etc but I cannot seem to find any reference to three members I see on the mentioned dialog aka "Flow Rate", "Junction loss" and "Return period".

 

I have "fudged" a term "Flow Rate" into the pipe part parameter definition file (AeccPartParamCfg.xml) and can access that programmatically but I think this "Flow Rate" in the Pipe Properties Dialog" is part of the Auotcad database and I cannot seem to find a route to get hold of it.

 

Anyone out there that can shed more light on this issue?

 

Thanks

Geurt

Geurt Bloem Pr Eng
Autocad C3D
21 REPLIES 21
Message 2 of 22
ralstogj
in reply to: Geurt

This code snippet my help

http://adndevblog.typepad.com/infrastructure/2012/09/how-to-set-pipe-network-parts-data-fields-partd...

 

Regards

Justin Ralston
http://c3dxtreme.blogspot.com/
Message 3 of 22
Geurt
in reply to: Geurt

Thanks Justin, I have seen this and tried it. If you have a look at the "PartContextType" in the VS broser, you will see that the "flow rate" element is not listed there.

 

Cheers

Geurt Bloem Pr Eng
Autocad C3D
Message 4 of 22
Partha.Sarkar
in reply to: Geurt

Hi Geurt,

 

Looks like these three ( "Flow Rate", "Junction Loss", "Return Period"   ) hydraulic properties are not yet exposed in API. Please let me know if they are important to you. I will log a wish list for the same.

 

Thanks,



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Message 5 of 22
Geurt
in reply to: Partha.Sarkar

Partha

Thanks for coming back and the answer is what I started to suspect.

 

I'd guess it will be crucial for any user of the network and pressure pipe sections. Flow rate and inside diameter (and velocity) is critical data for assessment or future changes. I will address this with adapting the pipe config files to have an optional data set for flow and velocity available anyway.

 

For me, I am busy with an interface to write a network to EPANET (finished that part) and to bring the final design back to the Autocad's networks (working, but I need to put flows to a pipe and therefor my question)

 

MODS, I pressume we can see this thread as answered then.

 

Cheers

Geurt

.

Geurt Bloem Pr Eng
Autocad C3D
Message 6 of 22
Partha.Sarkar
in reply to: Geurt

Hi Geurt,

 

Thanks for the update. Yes, I understand the need to expose these properties in .NET API. I have now logged a wish list for the same.

 

Cheers,
Partha



Partha Sarkar
Developer Technical Services
Autodesk Developer Network

Message 7 of 22
MikeEvansUK
in reply to: Geurt

You may have replicated the flow rate context so won't see it. Until avaliable adjust the context to be slightly different, the description will be the same. I have added a few new contexts and can iterate through them using. Net / com. Will this work for now?
Mike Evans

Civil3D 2022 English
Windows 7 Professional 64-bit
Intel(R) Core(TM) i7-3820 CPU @ 3.60GHz (8 CPUs), ~4.0GHz With 32768MB RAM, AMD FirePro V4900, Dedicated Memory: 984 MB, Shared Memory: 814 MB

Message 8 of 22
Geurt
in reply to: MikeEvansUK

Mike

No, I did not replicate and can iterate through what I have added, no problem. The issue brought to attention was more towards being able to use existing elements as incorporated by Autocad rather than "editing" stuff to suite.

 

Thanks for contribution!

Geurt Bloem Pr Eng
Autocad C3D
Message 9 of 22
Eli_Bro
in reply to: Geurt

I understand that this is a very old discussion.  But, I'm trying to write out properties to a file to run an EPANET model of the network that is layed out in Civil 3d 2013.  I'm having trouble getting the pressure pipe lengths.  Whether I use the Length2DCenterToCenter or the Length3DCenterToCenter property of the PressurePipe class I get an error "Retrieve Attribute Failed." Has anyone encountered this problem before? And what if any was the solution?

Message 10 of 22
Jeff_M
in reply to: Eli_Bro


@Eli_Bro wrote:

I understand that this is a very old discussion.  


It's not that old, but it is talking about the regular Pipes (gravity) not the Pressure PIpes that you are looking for answers to. You should start a new thread, and it would help us to help you if you could provide some sample code that exhibits the issues you are asking about. 

Jeff_M, also a frequent Swamper
EESignature
Message 11 of 22
Eli_Bro
in reply to: Jeff_M

Thank you.  I see now that there were more recent posts. I was particularly interested in the post from 11-4-2008 because EPANET was mentioned...  That seemed like a long time ago.  I've started a new thread. I appreciate any suggestions.

Message 12 of 22
Geurt
in reply to: Geurt

Eli-bro

Due to pressure pipe API not fully functional and not fully exposed as yet, I utilise gravity pipes as a "pressurised" pipe system that I can use in EPANET.

 

Cheers

Geurt Bloem Pr Eng
Autocad C3D
Message 13 of 22
mtryer
in reply to: Partha.Sarkar

 

This is quite an old post, however I'm in Civil3D 2018, and the "Flow Rate" is still not exposed to the API.  Is there an ETA on that?  

Message 14 of 22
hippe013
in reply to: mtryer

 


@mtryer wrote:

 

This is quite an old post, however I'm in Civil3D 2018, and the "Flow Rate" is still not exposed to the API.  Is there an ETA on that?  


Is there something that I am missing in this conversation? 

 

Pipe Object Browser.JPG

Message 15 of 22
mtryer
in reply to: hippe013

I must be accessing pipes in a different way than you are.  Also, I am actually getting a request to put a flow rate on a regular gravity pipe, not a pressure pipe.

image.png

Message 16 of 22
hippe013
in reply to: mtryer


@mtryer wrote:

I must be accessing pipes in a different way than you are.  Also, I am actually getting a request to put a flow rate on a regular gravity pipe, not a pressure pipe.

image.png


Yeah, It looks like you are accessing the pipe via the COM (Interop). I am using the managed .NET API. 

Autodesk.Civil.DatabaseServices.Pipe

Try accessing your pipe using the managed API and you will find that property available.

Message 17 of 22
soonhui
in reply to: Partha.Sarkar


@Partha.Sarkar wrote:

Hi Geurt,

 

Thanks for the update. Yes, I understand the need to expose these properties in .NET API. I have now logged a wish list for the same.

 

Cheers,
Partha


@Partha.Sarkar , are these properties already exposed in the latest .Net API?

Message 18 of 22
Jeff_M
in reply to: soonhui

@soonhui , a quick look at the .NET API documentation says Yes those properties asked for in the OP are now available.

http://docs.autodesk.com/CIV3D/2019/ENU/API_Reference_Guide/html/edfbbd8b-ed89-6a90-951c-fc447bf4887...

 

Jeff_M, also a frequent Swamper
EESignature
Message 19 of 22
john.klinke
in reply to: Jeff_M

oops, last thread was old. Meant this to go here.

 

I find VBA a much quicker development strategy for most of the things I want to do.  Will the ActiveX environment ever show these hydraulic features?

Message 20 of 22
Jeff_M
in reply to: john.klinke

I highly doubt it, @john.klinke Autodesk mentioned quite some time ago that only the .NET API would be updated/added to going forward.
Jeff_M, also a frequent Swamper
EESignature

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report