A place to put reminders on how to do things or commands that I will use rarely, but are useful to know.
Ad
Thursday, July 12, 2007
Pipe Rules Fixed - I think???
http://fredbobchris.googlepages.com/intermittentblockoftheday
Let me know if I created any other problems: fredbobchris@gmail.com
Tuesday, July 10, 2007
Pipe Rules Blues
- 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.
- 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
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
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.
- Open the C:\Documents and Settings\All Users\Application Data\Autodesk\C3D 2008\enu\C3DPiperules.xml file. I prefer the XML Notepad.
- Expand the folder heirachy under Categories, then Category, then Tools.
- You should see a list of Tool under Tools.
- Copy any of the Tool Folders by right clicking and choosing copy.
- Paste the item under Tools.
- 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.
- 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.
- 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.
- Next expand the Params and rename SumpDepthValue to SumpDepthValue2
- Change the DisplayName under SumpDepthValue2 to Sump Depth Custom.
- Set the #text to 0.5
- Now save the XML file.
- 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.