Ad

Thursday, July 12, 2007

Pipe Rules Fixed - I think???

I corrected the problems with the pipe rules. The corrected versions are now on the other page.
http://fredbobchris.googlepages.com/intermittentblockoftheday
Let me know if I created any other problems: fredbobchris@gmail.com

Tuesday, July 10, 2007

Pipe Rules Blues

The pipe rules I posted has some problems.

  1. For one if you are far away from zero, it may give you an overflow error. Just change the integer value to Double for all of the Dim, except i.
  2. If an start/end point doesn't project to the alignment it returns a value of zero instead of null.

I currently am looking for a solution to 2.

Sunday, July 08, 2007

Feeling Brave? Custome Pipe Rules

Have you ever wanted the assigned alignment to be relevant to where you are working at in the drawing? If you are like me you have one super duper pipe network for the sewer on your site. It can be a pain remembering to change the default Pipe Network alignment as you work to ensure that you are using the correct one, and going back and changing it can be confusing if you use the default names of Pipe - (234). These two rules will automate the process for you, somewhat. It only works if the alignments are on top of the pipe, +/- 1 unit. So if you use the center line of the road instead of the center line of the pipe it won't work.

I've written two rules for Pipe Networks. So far I haven't had any problems, but who knows what the future holds. The two rules are called Alignment and AlignmentLaterals.

Alignment: This assigns the alignment to the pipe based on the start and end stations offset values. If the start offset and end offset are +/- 1 foot away from an alignment in the drawing the alignment is set as the reference alignment.

AlignmentLateral: This assigns the alignment to the pipe based on the start and end stations offset values. If the start offset or end offset are +/- 1 foot away from an alignment in the drawing the alignment is set as the reference alignment.

The files for download have been placed here. I've only tested this in 2008 and probably doesn't work on earlier versions The file location on your computer should be in a location similar to this:

C:\Documents and Settings\All Users\Application Data\Autodesk\C3D 2008\enu\

To use the new rules, copy the existing two files with the same name to a new location as a backup. Then place the two files you downloaded into the folder you found the original two files. Restart Civil 3D, if you had it open. When you open up Civil 3D the two new rules will be available when you create rule sets, or apply it to existing pipes.

I'm not the greatest programmer so the code is probably slower than it should be. I also don't know exactly happens when you share the file with someone else who doesn't have the custom rules. I'm pretty sure it is just an error message in the event viewer.

Let me know what you think.

Friday, July 06, 2007

VBA Program

I added a vba program to this page (6-30-07). I may have not have set all of the References correctly if you are using Excel 2003 or earlier. So if you downloaded it and it didn't work this is why. I haven't fixed it, too busy trying to make it do something else related to sewer laterals.

http://fredbobchris.googlepages.com/intermittentblockoftheday

Wednesday, July 04, 2007

Custom Pipe Network Rules Part I

This is just a reminder to myself how to do the first step, adding the information to the xml file which will point to a rule in the C3DPipeRules.dvb file. I would not suggest doing this until I get more information or if you have an install that you can mess around with. I don't fully know the ramifications of this or if it actually works.

  1. Open the C:\Documents and Settings\All Users\Application Data\Autodesk\C3D 2008\enu\C3DPiperules.xml file. I prefer the XML Notepad.
  2. Expand the folder heirachy under Categories, then Category, then Tools.
  3. You should see a list of Tool under Tools.
  4. Copy any of the Tool Folders by right clicking and choosing copy.


  5. Paste the item under Tools.


  6. The first thing we need to do is give the idValue, under ItemID its own unique identifier. If I remember correctly it should be a random string of numbers, so change the numbers randomly. Hopefully I will find out where you can generate the idValues, until that time changing it should work.
  7. Next expand Properties, ItemName. The resource is how it chooses what name it uses in Civil 3D. Choose a alpha only name for the new rule, without quotes. If you put in a number such as 155, Civil 3D will give you an error message that it can't find resource 155 but will add the resource to the list of rules as 155. If you use quotes Civil 3D will also give you an error message. Leave the src alone.
  8. Next expand Data, Macro and type in a name of what you are going to call the module and routine in the VBA file. I'm going to call it SetSumpDepthCustom.SetSumpDepthCustom.
  9. Next expand the Params and rename SumpDepthValue to SumpDepthValue2
  10. Change the DisplayName under SumpDepthValue2 to Sump Depth Custom.
  11. Set the #text to 0.5
  12. Now save the XML file.
  13. Open Civl 3D and the rule will be listed in the list of rules, in this case for structures.

I haven't created the macro yet so an error message is appearing in the Panorama window stating that it can't find the macro. This is a good sign since it looks like you can create a custom pipe rule this way and have it apply to the network. The next step is creating the macro and getting that to work.

LinkWithin

Blog Widget by LinkWithin

Ad