My requirement is to place a tube family instance in any orientation.

For example, I should be able to place along the 3 axes.

I tried the following manually

1. Create a line based family
2. Create a reference plane as required and named it
3. Set the created work plane as active work plane by choosing using the name given
4. load family
5. specify placement options as 'Place on Work plane'
6. place the family instance on the reference

By this I am able to place a tube in whatever orientation I want.

However if I want to do this programatically without any prompt.
I am not able to do it. I am not able to specify placement option programatically.

Whats the best way to achieve this?