Revit Python Shell

Hi. I was wondering if someone could help me with the Revit Python shell. I need to create a new pipe in using revit python shell. I am using this code :

import clr
clr.AddReference(“RevitAPI”)
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

a = XYZ(0,0,0)
b = XYZ(100,0,0)
levels = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Levels).WhereElementIsNotElementType().ToElements()
level = levels[1]
pipetype = id(Plumbing.PipeType)

t = Transaction(doc,“p”)
t.Start()
pipe = Plumbing.PipingSystemType.Create(doc,MEPSystemClassification.OtherPipe,“Cold water”)

BIP = BuiltInParameter.MATERIAL_ID_PARAM
Mtr = pipe.get_Parameter(BIP)

matFilter = FilteredElementCollector(doc).OfClass(Material).ToElements()
pipeMat = [m.Id for m in matFilter if m.Name == “Copper”][0]

Plumbing.Pipe.Create(doc, id(system), Plumbing.PipeType.Id, level.Id, a, b)Mtr.Set(pipeMat)

t.Commit()

OUT= pipe

But I can get the pipe type set to specific diameter. How can I write a code code defingin custom size? Could anybody help with this? Thank you!

This is a pretty specific question. Did you try any of the “how to get support” suggestions in the Revit Python Shell readme?

Scanning the Revit API docs, I think a pipe is made up of segments, and the segments have a size. So maybe your question has more to do with the Revit API than with the Revit Python Shell?