Add Structural Beam Component

Hi all,
I am trying to use the “Add Structural Beam” Component to add the sub-frame to a curtain wall.
When I test the GH definition in an new blank Revit file, it works well(as shown below)

But when I use exactly the same GH definition to my project file, it doesn’t create any instance of the sub-frame. And the component turns red, I wonder why…



Does anyone know what is “RevitAPI: The parameter is read-only” and “Transaction RollBack and aborted” mean?
If I unchecked the level picker, the component turns to black but still no beam created…
I wonder why this definition works in an empty Revit file but doesn’t work in my project file…
Using Beam System to Add Subframe - WIP.gh (16.5 KB)

Many thanks

Try testing in the blank file with the same Family.