Connecting Flex with Air Terminal

Hi, I’m trying to create a script to connect Air Terminal With Flex Duct With Take Off fitting. I cannot connect Air Terminal With Flex Duct, But Take Off is Created from the Flex duct to Duct.
Any help will be appreciated.