AutoCAD Civil 3D Customization

AutoCAD Civil 3D Customization

Reply
Contributor
Geurt
Posts: 24
Registered: ‎11-04-2008
Message 1 of 12 (404 Views)

Programmatically accessing pipe data

404 Views, 11 Replies
11-20-2012 09:36 PM

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
Valued Mentor
ralstogj
Posts: 607
Registered: ‎10-01-2006
Message 2 of 12 (399 Views)

Re: Programmatically accessing pipe data

11-21-2012 01:04 AM 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/
Contributor
Geurt
Posts: 24
Registered: ‎11-04-2008
Message 3 of 12 (395 Views)

Re: Programmatically accessing pipe data

11-21-2012 01:32 AM 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
ADN Support Specialist
Partha.Sarkar
Posts: 543
Registered: ‎06-09-2009
Message 4 of 12 (375 Views)

Re: Programmatically accessing pipe data

11-22-2012 02:48 AM 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

Contributor
Geurt
Posts: 24
Registered: ‎11-04-2008
Message 5 of 12 (373 Views)

Re: Programmatically accessing pipe data

11-22-2012 03:07 AM 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
ADN Support Specialist
Partha.Sarkar
Posts: 543
Registered: ‎06-09-2009
Message 6 of 12 (350 Views)

Re: Programmatically accessing pipe data

11-26-2012 09:40 PM 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

*Expert Elite*
mikeevans
Posts: 760
Registered: ‎09-29-2008
Message 7 of 12 (315 Views)

Re: Programmatically accessing pipe data

12-07-2012 12:22 AM 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 2013 / 2014 British UK
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

Contributor
Geurt
Posts: 24
Registered: ‎11-04-2008
Message 8 of 12 (312 Views)

Re: Programmatically accessing pipe data

12-07-2012 12:36 AM in reply to: mikeevans

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
Active Member
Eli_Bro
Posts: 6
Registered: ‎07-29-2011
Message 9 of 12 (222 Views)

Re: Programmatically accessing pipe data

04-02-2013 09:45 AM 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?

*Expert Elite*
Jeff_M
Posts: 4,310
Registered: ‎07-22-2003
Message 10 of 12 (218 Views)

Re: Programmatically accessing pipe data

04-02-2013 10:06 AM 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
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.