Create pipe fitting or split pipe command not working

Hi, I have made this revit file for sample pipe.

In revit, im using split command to split pipe and a pipe fitting comes.
Similarly im trying to split this pipe. One error came “Attempt to modify the model outside of transaction”
Not sure how to proceed further. :thinking: Any help please

package: Clockwork and Dynatools
Dynamo 2.0.2
coupling pipe fitting 1.dyn (14.4 KB)

Looks like you need to start a transaction before using the SplitPipeByPoints node.

. I would probably feed the List.GetItemAtIndex node into a Transaction.Start node and then feed the resulting elements into a Transaction.End node.

Thank you @cgartland It worked. well one thing how did you came to the conclusion of using Transaction.Start and End. (Still wondering)

And how transaction actually works here? :thinking:

Dear Nissal,

How is you script looking with the transaction node in it. I’m also busy with something like this but i won’t get it working.

Please can you show me the complete code for it. I don’t understand exactly what you mean with this node and how it must look.

This is how my script looks like now.

But it won’t work in my project. Who can help me.

I don’t know where the Tools.SplitPipeByPoints node is coming from so I can’t actually test this myself, but here’s how I would have it set up:

What’s important is that you start a transaction before the Tools.SplitPipeByPoints node executes, since it will be modifying the document and presumably does not perform any transactions internally.

I have change the script but i still get an error in the Tools.SplitPipebyPoints node thats in the Dynatools package.

Could it be an issue with the segmentlength because we are working with metric instead of imperial.

Otherwise i don’t know what the parameter ptBreak is and where it has to be.

Can some one help