Recently, I'm trying to build mep system using API in revit mep. When I try to create transition using Document.Create.newTransitionfitting() method, I get an unexpect result - there is a gap between transition fitting an duct. (See the picture below). Does anyone know how to fix this problem. Thanks !
fg1. before add transition fitting
fg2. with transition fitting
Solved! Go to Solution.
I think you just have to move the connector of the desired duct before creating the reducer. I you move it to same position than other duct's connector, I think API manages to shorten the duct correctly.
Thank you for your advice!
I try your method, but it didn't work for me, the gap still there.
Fortunatly, I fix this problem finily. Here is what I do.
First, create new transition fitting normaly.
///===================code I used======================
conn1 = ((DxfLine)bj.Line.Nodes.Linelist).Conns;
conn2 = ((DxfLine)bj.Line.Nodes.Linelist).Conns;
Fi = doc.Create.NewTransitionFitting(conn1, conn2); //Create a transition fitting using two connector
cs = Fi.MEPModel.ConnectorManager.Connectors;
foreach (Connector c in cs)
if (c.Origin.DistanceTo(conn1.Origin) < 0.001)
if (!c.IsConnected) c.ConnectTo(conn1);
c.Width = conn1.Width;
c.Height = conn1.Height;
if (!c.IsConnected) c.ConnectTo(conn2);
c.Width = conn2.Width;
c.Height = conn2.Height;
//=================end of create transition fitting=================
Then, commits current transaction, using Transaction.Commit() method.
Finily, set the Parameter("offset") of one connect on transition fitting to 0.0;
//==================code I use===============
Here is the picture of the result. Gap seamed.
Great that you managed to get it work. Also very nice that you posted the solution here too...maybe it helps someone else in the future. Kudos form that :-)
Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register
Start with some of our most frequented solutions to get help installing your software.