NewFlexDuct Method bugs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I wanted to create a code to quickly connect air terminal to a duct using a flexduct because it is a task i was going to repeat often in the next few days. I figured I would use the NewFlexDuct method taking 2 connectors and a FlexDuctType as arguments : http://www.revitapidocs.com/2017/0910f241-d976-2ee8-496d-268a44725d13.htm
While writing my code I made a mistake, trying to connect a flexduct to the same connector, as follow
Transaction t1 = new Transaction(doc,"Add Round Flex Duct");
t1.Start();
try
{
doc.Create.NewFlexDuct(conn1,conn1,flexDuctType);
}
catch
{
}
t1.Commit();
I was expecting nothing to happen because the method would throw an exception.
However the Revit Application crashed without any notification. In my opinion it is a bug that should be corrected by throwing an exception.
Also I noted that the flex duct is not connected on both ends. The end connecting with the air terminal is not physically connected so I have to add additionnal lines of code to use the method ConnectTo of the Connector Class : http://www.revitapidocs.com/2017.1/04ee99c9-f411-aabe-7b87-013a6f9adb1d.htm
Can anyone try it and validate if it's a Revit bug or a bug with my air terminal family?
Thank you,
Fred