Ad

Showing posts with label Pipe Network. Show all posts
Showing posts with label Pipe Network. Show all posts

Friday, April 29, 2016

Band Aid BIM–Structures in Profile Views

Ever want to show structures in profile views? Ever notice how if you have a non-symmetric structure it doesn’t show correctly? If so then go vote for this idea over in the forums.

Evidently having crappy BIM is “as designed” over at Autodesk. From a company that is constantly cramming BIM down our throats through marketing you’d think they would at least have the common courtesy to show structures properly in profile view regardless of their wonky geometry.

Tuesday, September 01, 2015

Pipe Network Layer Blues

Why is Civil 3D hard to use? Well I’m guessing it’s because Autodesk user’s identify issues and then see them not resolved. One such issue I came across is data shortcut layers for pipe networks.

So what is wrong with data shortcut layers for pipe networks? Well you only get once chance to get the data shortcutted pipes and structures on the correct layer. For when you import a datashortcut Civil 3D will assign the layer that is in the Object Layers in Drawing Settings. Don’t waste your time hitting the layers button on the pipe network data shortcut dialog box, because while Civil 3D will set the correct value on creation, on a Synchronize magically they will be reset back to the layer in the Object Layers and wipe out all of that hard work you just did. Half way through your project and you realize you didn’t put them on the correct layer? Well your out of luck because in order to get them updated you have to:

  • Delete them,
  • change the Object Layer,
  • import the pipe network as a data shortcut, then
  • add the pipes and structures to the profile views, and then
  • add/update the labels.

Wow, that seems like a ton of unnecessary rework when the steps should be to select the pipe and structures and use the Layer Drop Down in AutoCAD properties or on the ribbon.

Why is Civil 3D hard to use? Because Autodesk doesn’t care about you the user to fix these issues. It has little to do with user interface, but that seems to be where Autodesk focuses their attention on. I think since Civil 3D 2007 the Pipe Network Icon has been changed at least 5 times. How many times has this issue been fixed? None.

http://forums.autodesk.com/t5/autocad-civil-3d-general/pipe-network-layers/td-p/2955268http://forums.autodesk.com/t5/autocad-civil-3d-general/data-shortcut-pipe-networks-layer-issue/td-p/2449831?nobounce=

The help file doesn’t even let you know of this issue: http://help.autodesk.com/view/CIV3D/2015/ENU/?guid=GUID-C01C190F-D744-48DB-8ACF-EDB21DEC7DAA

If you don’t believe this, here is a video showing the results I’m seeing.

I’m sure we’ll see this fixed between 6 months and never. I’d bet the answer is closer to never since I’m sure the UI will need to be redone first for 2017, 2018, 2019 ….

Tuesday, August 18, 2015

Pipe Label–Dimension Look

A long time ago I did this post about getting a pipe label to look like a dimension.

It works as long as the pipe is on the alignment or equidistant from the alignment. If it isn’t then the dimension lines don’t match. In order to fix this we can modify the expression listed in the other post to:

ABS(({Pipe Start Station}-{Pipe End Station})/2/{Drawing Scale Conversion})

The rest of label is the same. Here is a link to the drawing.

Thursday, August 21, 2014

Floor Hatch Blues

Do you have to show a solid floor width on your structures in profile view? Well if you do, this is imageone way to accomplish the feat.

Unfortunately Civil 3D sucks as a BIM product, so we are going to have to do a work around in order to get this to work. The first step is to create a hatch, or hatches, representing the floor of the structures we have to show. Once we have this we can then create blocks for each one, making sure to give them a adequate name. Next create a label for each size having the hatch as it’s component. Make sure to rotate the block so it points up. Now adjust the attachment point for the structure labels to the bottom of the structure.

If you live in the real world, and not some fantasy world of Autodesk’s developers, user interface designers and the like, then you will probably have requirements to place labels at the top, middle, and/or bottom of the structure in one plan set. I know crazy thing we plan producing people have been doing for decades is beyond the comprehension of people who don’t put together plans. For this label you will want to anchor to the bottom of the structure. You do this by going into Toolspace, Settings, and adjusting the attachment point for the structure. Once you add the labels make sure you go back and adjust it to the correct location on the structure for your other labels. You’ll be glad to know that changing the color of the user interface to dark is more important then making it easier to change the location of the structure labels.

Here is a file showing it in action.

Wednesday, January 27, 2010

Updated Civil 3D Reminders Pack

I’ve made some improvements to the Civil 3D Reminders Pack 2010 and I am looking for beta testers to try it out. The new features include linking a MLeader to a crossing pipe in profile and linking laterals to main line pipes.  I’m sure there are some bugs or situations I haven’t thought of happening which could cause unexpected results, which is why I’m looking for Beta testers.

The video below shows the commands in action.

If you are interested in beta testing these new features, send me an email (the link is on the right side of the page).

The relevant commands are:

C3DRLinkCrossingProfileViewLabel – Links a MLeader to a Pipe crossing a profile. The station and elevation of the pipe is updated when the pipe is moved.

C3DRUpdateSewerLaterals – Creates a link between a mainline pipe and a lateral pipe. If the mainline pipe is modified the laterals will update accordingly. The user is given an option to have the other end adjust or have it stay in place.

C3DRTurnOnAutoUpdateSewerLaterals – Turns back on the link between the mainline pipe and lateral if it has been disabled. The laterals do not update automatically, the mainline pipe would need to be updated.

C3DRTurnOffAutoUpdateSewerLaterals – Turns off the link between the mainline pipe and a lateral.

Wednesday, December 09, 2009

Dynamic Crossing Pipe Label

While I’m waiting on feedback for the dynamic sewer lateral program I thought I’d start on a new project, creating a dynamic profile view label for crossing pipes. Currently you are not able to label a crossing pipe were it crosses a profile in a dynamic manner. The method I currently use utilizes a profile view label. When the pipe imagechanges location I have to manually adjust the profile view label. I’d prefer to not have to do that and just have the label update automatically.

The general steps I’m thinking of using are below:

  1. Select Profile View
  2. Select Crossing Pipe
  3. Have the user use the default label style (first one on the list) or select a profile view label style from a list of available styles.
  4. Get the alignment associated with the profile view.
  5. Check to make sure the pipe crosses the profile view’s alignment.
  6. Get the station/elevation of the pipe crossing point.
  7. Create the label and put it at the correct location.
  8. Turn on dynamic code.

Got any ideas to improve my plans? If so leave a comment.

Tuesday, December 08, 2009

Dynamic Sewer Lateral Program

I spent some time at AU working on the Civil 3D Reminders Pack. Mainly creating a command that provides a dynamic link between in the sewer lateral and the main line pipe. In order to get some feedback I’m looking for Alpha testers to provide feedback, error reporting and suggested improvements. The program is built for Civil 3D 2010 only.

The program currently only works when the mainline pipe is moved vertically, the sewer laterals don’t currently move when the main line is moved horizontally. The sewer laterals will need to be in a separate pipe network from the mainlines for optimum performance.

I don’t have an installer (haven’t learned how to create one yet) so you’ll have to NETLOAD the program. To turn on the dynamic link you will have to turn it on by typing a command each time you open the file.

Here’s a brief screencast showing the laterals adjusting with the main line.

Once in the Beta stages I’ll be offering the program for sale.

Monday, December 07, 2009

Civil 3D 2010 Swap Parts Part III

This post will show how to add the capability to swap parts in a profile view to the Swap Parts command in the Civil 3D Reminders Pack, see the previous post here. The code addition is pretty small. All that is needed is to check to see if the selected entity is a ProfileViewPart and if it is convert the entity to the corresponding pipe or structure entity. The code then runs like it did before.

            ' Add code to support profile view parts
If TypeOf ent Is Autodesk.Civil.PipeNetwork.DatabaseServices.ProfileViewPart Then
' Convert the profile view part to it's corresponding pipe or structure part.
Dim oProfileViewPart As Autodesk.Civil.PipeNetwork.DatabaseServices.ProfileViewPart
oProfileViewPart = ent
ent = DirectCast(tr.GetObject(oProfileViewPart.ModelPartId, OpenMode.ForWrite), Entity)
End If



Add the code right before it checks to see if the ent is a Pipe.

Wednesday, November 25, 2009

Rotate Headwall

When you move or adjust a location of a headwall it doesn’t remain perpendicular to a pipe like you may want. This post will create a quick VBA macro to rotate the headwall back into place. The code has the user select a structure and then rotates it depending on if it is attached to the start of the pipe or the end of the pipe. The rotation is done in radians, so the rotation is pi.

Option Explicit


' Command to rotate headwall to be 90 degrees from pipe.
Sub RotateHeadwall()
' Always get the objects again since MDI is supported.
If (GetBasePipeObjects = False) Then
MsgBox "Error accessing base civil objects."
Exit Sub
End If

On Error Resume Next

' Select headwall
Dim oStructure As AeccStructure
Dim vPoint As Variant
Dim oAcadObj As AcadObject

ThisDrawing.Utility.GetEntity oAcadObj, vPoint, "Select Headwall to rotate: "

If (TypeOf oAcadObj Is AeccStructure) Then
Set oStructure = oAcadObj
If oStructure.ConnectedPipesCount = 0 Then
' THe structure is not connected to a pipe.
MsgBox "The structure is not connected to a pipe."
End If

Dim oPipe As AeccPipe
Set oPipe = oStructure.ConnectedPipe(0)
Dim dRotation As Double
Dim dStartPt(0 To 2) As Double
Dim dEndPt(0 To 2) As Double
dStartPt(0) = oPipe.StartPoint.X: dStartPt(1) = oPipe.StartPoint.Y
dEndPt(0) = oPipe.EndPoint.X: dEndPt(1) = oPipe.EndPoint.Y

If oPipe.StartStructure.ObjectID = oStructure.ObjectID Then
dRotation = ThisDrawing.Utility.AngleFromXAxis(dStartPt, dEndPt) + (4 * Atn(1)) ' Added 180 degrees to the value
Else
dRotation = ThisDrawing.Utility.AngleFromXAxis(dStartPt, dEndPt)
End If
oStructure.Rotation = dRotation
End If

End Sub



Once compiled you can then add the command to the cui and add it to the right click menu for a structure. Here’s a short video showing the command in action and added to the shortcut menu for a structure object.





It could use some improvement by allowing it to use an already selected object. The code may be found here: http://style.civil3dreminders.com/rotateheadwall



More information on creating a command in the cui may be found in this previous post.

Monday, October 12, 2009

Civil 3D 2010 Swap Parts Part II

In a previous post I introduced the ability to swap parts for pipe objects. It is also possible to swap structures. The structure of the code is almost exactly the same as the swapping pipes as shown below.

image

In the above case I’ve gone through and moved the code to vb.net. I’ve also added coded to allow the user to select multiple pipes and structures and added a dialog box to have the user select the pipe and/or structure from a dialog box (most of the code is not shown), no more having to change pipes or structures one at a time.

This short video shows it in action: http://screencast.com/t/MksgtRgeBuHS

If you want to try it on for size you may find the compiled project here: http://style.civil3dreminders.com/C3DRemindersPack2009-10-12.zip

Instructions on how to load it may be found here:

http://style.civil3dreminders.com/civil3dreminderspack

Thursday, August 06, 2009

Pipe Info

In a previous post I created a Custom Pipe oSnap, unfortunately I wasn’t able to figure out a way to show the invert or slope information in the toolbar. After searching the internet for a while trying to find a solution I came across a site that pointed me to an ADN class that covered AutoCAD: TransientGraphics API from May of 08. I downloaded the class information and started modifying the code to work with pipes. The original code took lines, arcs and polylines and divided them up showing points.

Transient graphics allows you to show temporary objects on the screen rather easily. You essentially create objects such as text or points and it draws it on the screen. Using that plus tracking the cursor location you are able to show information on the screen for the user. In this case I wanted to show pipe specific information while I moved the mouse around the screen. Since the code is quite lengthy I’ll let you explore it on your own. I added it to the Civil 3D Reminders Pack and after you netload the dll you can type PipeInfo at the command line and hover over a pipe. Depending on where you are on the pipe will determine if you get an invert or the slope of the pipe. I didn’t spend much time on this to make it look pretty, I don’t have a usability group like Autodesk has, but provides the information. Here’s a quick screencast showing what it does do: http://screencast.com/t/jZxZ9DKFXV4

To end the command type EndPipeInfo. The code is in the QuickEditPipes.vb file. The compiled dll and code may be downloaded at the Civil 3D Reminders Pack webpage.

I’m not sure if I’m going to take this any further at this point. If I add quick edit capabilities I’m not sure how to handle what happens to upstream/downstream pipes. Do you have any ideas?

Tuesday, April 14, 2009

Pipe Networks – Readme File

After installing Civil 3D 2010 make sure to read the ReadMe file. There is some documented bugs and/or pitfalls that you can avoid. One of them is plotting to a DWF when a Pipe Network is data shortcutted into the drawing. The ReadMe file states:

“Pipe networks referenced into a drawing using data shortcuts may not appear in a DWF. This can occur if the drawing is not saved before creating the DWF. To avoid this situation, save the drawing before creating the DWF.”

So read the ReadMe and you may save yourself some time trying to figure out why something doesn’t work.

Monday, April 13, 2009

Pipe Network As-Builts – Pipe Rules

A few weeks ago I mentioned some ideas that I had for creating pipe networks for as-builts. Justin Ralston had already done some work in creating the pipe rules that would do just that and posted them to the Civil 3D Customization Discussion Group. I added some code to the rule that helped it somewhat, but didn’t fix it all. Unfortunately I deleted the modified files when I uninstalled Civil 3D 2009, so if you want the change to the custom rule you’ll have to add the change to the code.

Tuesday, April 07, 2009

Pipe Network - Custom Parameters

Sometimes you want additional information included in a pipe or structure object. Maybe the velocity of the material flowing in the pipe or the quantity of material flowing in the pipe per unit of time. There is a way using programming to add information to a pipe or structure that will show up in labels. Here’s a shot of a structure the way it’s provided.

image

And here’s a shot showing the custom data added to the structure.

image

And here’s a screen shot of the label options in the Text Component Editor.

image

So how do you do this? You add a Pipe Network Catalog Definition to the drawing. The catalog definition is then available to all of the structures or pipes within in the drawing. A code examples are available in Civil 3D Developer’s help or in the Civil 3D 2009 VBA Customization vBook. The name can be anything that you want, it doesn’t have to be Custom Part Data. One could couple this will reactors and store the velocity or Q in the pipe, when the pipe changes the data held in the pipe would also change. I’d do an example, but I haven’t figured out reactors yet.

Thursday, April 02, 2009

Pipe Rule Numbers

If you plan on doing your own pipe rules you may want to use a particular format that shows when you set a parameter for a rule in the C3DPiperules.xml file. I was unsuccessful in getting an official list from Autodesk, but here is what I deduced by going through each number. The numbers correspond to a format type in the edit feature settings and that is the precision/format is used when you see the rule.

1-5 Unitless?

6-7 Station?

8 Grade/Slope

9 Grade

10 Slope

11 Direction

12 Lat Long?

13 Lat Long?

14 Angle

15 ???

16 Distance

17 Dimension

18 Coordinate

19 Coordinate

20 Area

21 Elevation

22 Elevation

23 Dimension

24 Volume

25 Distance

26 Degrees

27-30 Unitless

Sunday, March 22, 2009

Pipe Network As-Builts

I’ve read some posts in the discussion groups about wanting to do pipe as-builts from survey shots taken in the field or plans. While it is easy enough to layout pipes in Civil 3D its not always easy to enter data at an exact elevation or slope. It gets a bit frustrating going into each pipe or structure and change the information. I was thinking about this for a local project that we didn’t get, I thought I’d share some of my thoughts on ways I was thinking about:

  1. Create a tool for editing pipes and structures similar to the Quick Elevation Edit tool for feature lines. This wouldn’t be that hard, depending on the complexity wanted. I may do a rudimentary post on how to do it at a later date.
  2. Create a program that imports the pipe network from an Excel spreadsheet. I guess you could also use a third party software. I haven’t used it, but I understand Steltman Software Solutions provides such a product.
  3. Create a Custom Pipe Rule that prompts you to enter the pipe slope, invert, rim elevation, etc. as you layout the pipe network. You could also use a cover value to set the invert of the pipe, if needed. You can check out the AU session I did in 2007, the various posts I’ve done or my VBA book for Civil 3D for the steps on how to create your own custom rules to do this.
  4. Use the pipe list and structure list in Prospector. I find this difficult since I don’t always know which pipe/structure I’m changing.

Sunday, February 15, 2009

Raising a Pipe Run

Sometimes it's interesting, to me at least, where this blog site is linked from. Recently I saw a link coming from ww3.cad.de, which is the "largest and most active German-speaking community for CAD-CAM-CAE and EDM / PDM / PLM and other interested users on the Internet." It also hosts the AUGCE message board. The question one user had was how to raise (or lower) a run of pipes based on the ending invert elevation. In the list of options on how to accomplish the task was a link to the Pipe Slope Along a Run post and creating your own program to do it.

This post will take the post referenced and modifying it to raise the pipe run a set amount. It won't affect any branch runs, so you will have to adjust them by running the command again. If you want to follow along download the previous code at this link. Type VBALOAD at the command line to load the file and VBAIDE to open the Visual Basic Editor, enable Macros if it asks. Next create a new module and name it PipeAdjustRun (you can do that in the Properties Window).

image

Next copy the code from the Sub PipeSlopeRun and paste it into the new module, adding Option Explicit to the top of the code and renaming the sub PipeAdjustRun.

image

Next change the dSlope to something that makes more sense for this code, such as dElevDiff. Do a find and replace for the current module and it will change all of the instances of dSlope to dElevDiff.

We want the code to work in the same manner so most of the code will remain the same, but we do want the user to tell us what elevation difference they want to apply. So change the user prompt to ask for the elevation change.

image

Now the math portion of the code needs to be revised to adjust the pipe's elevation values. The portion of code that needs to be revised is shown below:

image

And the revised code is shown below:

image

And that should raise or lower a selected pipe run a specific amount. This code revisions comes with the usual disclaimers, not a whole lot of error checking has been done, check the program to make sure it is working as you expect and if you want some basic error catching add On Error Resume Next at the top of Sub, otherwise an error message will pop. You may have noticed I added the modified code at this link to save you some typing.

Monday, January 12, 2009

VBA - Add Pipes to a Profile View

The API for Civil 3D, as far as I know, doesn't have way to add pipes or structures to a profile view. There is a possible workaround using AutoCAD's SendCommand. The code would look something like this:

ZoomExtents
ThisDrawing.SendCommand ("AddNetworkPartsToProf " & "3741.54989837,3396.84999773 " & " " & _
"4077.571130249153,3497.898627605000 ")
ZoomExtents

The first ZoomExtents is to refresh model space because if the graphics aren't current AutoCAD won't recognize the newly created pipe/structure or profile view. The next part sends the commands to the command line. The AddNetworkPartsToProf is the command to in Civil 3D to add pipe/structures to a profile view. The next part is the coordinate location of where a pipe/structure is located in the drawing and the last part is the point in the drawing where a profile view may be selected. The last ZoomExtents is just for show. The & symbol joins text strings together.

Thursday, January 08, 2009

Pipe Slope Along a Run

Civil 3D provides several ways to change the slope of pipes. You can use Prospector, right clicking and viewing the pipe's properties, grip editing the pipe or using pipe rules. Apart from the rules there is a limited number of ways to adjust the slope of a pipe run. The pipe rules, Cover and Slope, may be problematic for a run of pipes since the cover makes it difficult to get a slope at a constant grade. I did post about the availability of a Slope Only rule that I came up with for a coworker in Colorado, but nobody seemed interested in it. I'm just glad no one has asked for it recently because I think I misplaced the rule. For this post I'm going to be working outside of the rules and going with VBA.

I've covered on how to set up the VBA in pasts posts, so I'll skip it here. Once you have the VBA project set up we can go ahead and start programming. The first thing we need to do is get some information from the user.

image

So now that we have the pipes or structures and required slope we can modify the pipe slopes. The first thing we need to do is get the pipe application which is the AutoCAD object that contains all of the pipe information, which is borrowed from the sample file that comes with Civil 3D.

image

Now we need to get the pipe networks of the pipe parts selected to make sure the pipes/structures are in the same pipe network. Since we need to find it for each structure we'll use a separate Function to find the pipe network names. When using the Functions you can pass objects from the Sub to the Function and then return the value. The arrows are trying to illustrate what is being passed and where they are placed.

image

The code goes through all of the pipe networks in the drawing and then checks to see if the pipe or structure is included in the pipe network. So now that the pipe networks are known we can see if they are in the same network, if not the program will end using the Exit Sub.

image

So now we need to get all of the pipes and structures from the first pipe/structure selected and the second pipe/structure selected. To do that use the FindShortestNetworkPath method of the pipe network of the selected pipes/structures. The code below sets the pipe network and then creates an array based on what type of objects where selected (hopefully I covered all of the scenarios).

image

So now that we have the pipes/structures in an array the code will go through and change the slopes and elevations of the pipes. The code uses the first pipe's start elevation for the beginning elevation and then apply the elevations and slopes to the pipes. The structure's won't be changed, although they probably should be updated after adjusting the slopes and elevations. The last object selected, if it is a pipe, needs to be calculated separately since it is not included in the array for some reason.

image

So that's the code to do it. It could use some more code, maybe for recognizing that the pipes are going the opposite direction, but hey you don't pay for this. Here's a page that has the code as it is now: http://style.civil3dreminders.com/setpipeslopeonrun

Tuesday, November 04, 2008

Pipe Rules - Making the Pipe BySlope

When laying out pipes you can choose the slope method with the slope button to make the pipe's flow direction to go from Start To End or End To Start, you don't have the option to have it use the By Slope flow direction. You can set up a custom pipe rule to accomplish this task and that is what I am covering in this post. I'm not going to cover all of the steps, for the steps I don't cover you can get from my AU 2007 paper or from previous posts regarding pipe rules.

To start you will need to decide, at least for Civil 3D 2009, to choose what programming language to work in. I'm going to use VBA, though you can use vb.net to accomplish the same task. This first step is to open the C3DPipeRules.dvb file using VBAMan and then do a SaveAs of the file. I'm going to call the file C3DCustomPipeRules.dvb. Next I'm going to rename the PipeLength module to PipeBySlope.

image

Next go to the edit menu and choose Replace. Replace all of the instances of PipeLength to PipeBySlope. This will rename all of the macros to match the name of the Module. Next move the highlighted text to the location indicated below.

image

Next add code to make the to set the flow direction of the pipe. The highlighted code below.

image

Next delete the code in the validate section. The code should be as shown below.

image

Next delete the Modules that aren't needed.

image

Next modify the C3DPiperules.xml file to add the pipe rule to Civil 3D and your done.

image

LinkWithin

Blog Widget by LinkWithin

Ad