In the 'Custom Edit' mode, an interface named 'trees' is accessible via MaxScript. You can use the following functions for these purposes (you can check all available functions with showinterfaces($)). However, please note that performance may vary when operating with many items:
$.trees.create
$.trees.setPosition
$.trees.setRotation
I hope this helps.
Best regards,