Im starting to dive into Dynamo. To start off, I’m looking for a way to rename the pipes in my drawing. I currently have a network with structures which I manually named as CB 1, MH 1, CB 2, etc. I want to rename the pipes in between the structures to say the start structure to the end structure (for example, CB 1 TO MH 1).
Any tips on how to do this?
Here you are. Thanks to @mzjensen 's camber package. Make sure to download it for this to work.
Update Pipe Names - Post-Script.dwg
Update Pipe Names - Pre-Script.dwg
Thanks for the solution, it worked well. Curious what this node means; what does writing x in code block do?
Is there a way to return a pipe network by name instead of the order it appears in the list? For example, if I currently just have one pipe network (storm) in this drawing and set it to x, dynamo will work fine. But if I later add another network, say sanitary, then storm will be pushed down in the list and I’ll have to renumber it to say x.
Sure. You can use the “PipeNetwork.GetPipeNetworkByName” node in the camber package and pass it the name of your pipe network as a string (use either a string node or text in a code block node in quotes).
But I imagine it will be easiest for your needs to simply click on a pipe to select the network to update. If that is the case you can do something like this:
Thanks, I think clicking the pipe to select the network would be the best option since I wouldn’t have to modify anything in the code and then can be used for any drawing.
The one caveat with that approach is that the script will break if anything other than a pipe is selected. But if you’re the only one using it, then it might not be a concern!