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: 

Custom connected pipe parameters

6 REPLIES 6
Reply
Message 1 of 7
dave.middleZX7S8
415 Views, 6 Replies

Custom connected pipe parameters

Thank you for sparing time to read this post.

 

I have been working through a few queries regarding labels and the data that our engineers want to have on the labels. To add a bit of context to the query, I have created and published pipes which have a custom parameter (Status). For pipe labels I can use this custom perimeter, which isn't needed as the pipe style line color refers the the status of the pipe. However, when labeling the structures with the connected pipes, or creating the manhole schedule, they want to see Pipe Name - IL In/Out (Status). Most of which is easy, however in the connected pipes properties does not show the custom property.

 

Is there a way of adding to the connected pipe properties to include the pipe status (i.e. Connected Pipe Status)?

Labels (5)
6 REPLIES 6
Message 2 of 7

Hi there are two ways of doing this,

Through property sets or through pipe contexts.

 

To add a pipe context you need to amend the C:\ProgramData\Autodesk\C3D 20XX\enu\Pipes Catalog\Aecc Shared Content\AeccPartParamCfg.xml file.

 

To add a new context, look for a similar context and copy it to the end of the <AeccParamDeclaration> section.

 

<AeccDfParameter name="Mat" desc="Material" context="Material_Type" index="0" datatype="String" usage="String_General" managelist="True" unit="" visible="True" internal="True"/> seems to be a match as its for strings. Managelist allows saving of the entries, change to false if not needed.

 

Paste at the end of the section and change the Name, Desc and Context accordingly to suit your needs ensuring no duplications.

 

Next you need to add this into the relevant section later in the document.  For pipes see below.

</AeccParamDeclaration>
<AeccParamUsage>
<AeccPartDomainCfg domain="Pipe_Domain">

 

As this is an optional parameter we would add as;

<AeccOptParam context="RefContext"/>

 

To enable this you need to save the changes and restart Civil3d.

To edit the files I would use NotePad++ or similar as these show the formatting.

 

Mike

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 3 of 7

@MikeEvansUK thank you for the message, this has all been done. I can see the parameter in the Pipe Data Properties and when creating a Pipe Label I can choose the custom parameter.

 

The problem comes in the connected pipes, it shows virtually all the properties from the pipe data with the pre-fix Connected Pipe, however it doesn't show the custom parameter, for instance Connected Pipe Status.

Message 4 of 7

Sorry I misunderstood this Dave.
ConnectedPipe is hardwired by Autodesk to look for only certain contexts and as such would not reveal custom ones.

So this is currently impossible via a structure text label. You could add the label to the pipe label instead.

Mike
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 5 of 7
MikeEvansUK
in reply to: MikeEvansUK

This is possible with property sets but complicated.

 

First you need the handle of the structure then you need to cycle through the structures connected pipes and get the handle of the in or outflow pipe as the result.

 

this handle can then be used in another calc to find by context the item you’re after adding as a result.

 

the final result can be added to the label under the property data.

 

it’s a little trick but I’ll see if I can post something to help understand..

m

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 6 of 7

@MikeEvansUK Thank you for your response. If I read your message correctly this would need to be a property set for each structure, and each pipe that is connecting to it?

 

I'm not sure if this would be feasible as the team do not necessarily have that level of experience, I was hoping to create a label that could be added to the shared template. Its a shame that they have hard coded connected pipe parameters, would have been so easy if we could just create custom properties similar to creating an expression.

Message 7 of 7

Sorry yes through property sets and not that simple but with some help..

Create a new Object: [OutFlowPipeObjectId]

Code,

RESULT="-"

On Error Resume Next

Set oApp=GetObject(, "AutoCAD.Application")

Set oCivilApp=oApp.GetInterfaceObject("[_XUILand]")
Set aec = oApp.GetInterfaceObject("[_AecVal]")

aec.Init oApp

Set obj=oCivilApp.ActiveDocument.ObjectIdToObject("[ObjectID]")

Brk=0
Pip
i=0
PipId

For i = 0 To obj.ConnectedPipesCount - 1
Set Pip=Obj.ConnectedPipe(i)

If obj.IsConnectedPipeFlowingOut(i) then 'This should work? not checked .com
PipId = i
end if
Next

Result = Obj.ConnectedPipe(PipId).Objectid

 

Using that object..

[UserVariable]

Code,

RESULT="-"

On Error Resume Next

Set oApp=GetObject(, "AutoCAD.Application")

Set oCivilApp=oApp.GetInterfaceObject("[_XUILand]")
Set aec = oApp.GetInterfaceObject("[[_AecVal]")

aec.Init oApp

Set obj=oCivilApp.ActiveDocument.ObjectIdToObject("[ObjectID]")

Set Pip = oCivilApp.ActiveDocument.ObjectIdToObject("[OutFlowPipeObjectId]")

RESULT=obj.PartDataRecord.FindByContext("Material_Type").Tag

 

Change Material_Type to the relevant Contect string you want..

 

Search for how to use Property sets, as I said it's simppler via pipes as this is directly open to the label.

 

Mike

 

 

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

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

Post to forums  

Rail Community


 

Autodesk Design & Make Report