NewFlexDuct Method bugs

NewFlexDuct Method bugs

frederic.lecuyer
Explorer Explorer
262 Views
1 Reply
Message 1 of 2

NewFlexDuct Method bugs

frederic.lecuyer
Explorer
Explorer

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

 

0 Likes
263 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk

Dear Fred,

 

Thank you for your report.

 

It sounds as if this problem should be easy to reproduce reliably in a minimal test model.

 

Can you please provide a complete minimal reproducible case for the development team to analyse?

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#1b

 

Thank you!

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes