Creating Projects from X++

Hi, Can anybody please let me know how is the correct way to use the Ax. classes for Projects manipulation? I am trying to create a project by code but for eg. when using some base methods like ProjectNode.addUtilNode(UtilElementType::Form,formstr(CustTable)), it issues Axapta crash error. Also, when using the same from ProjectGroupNode it does not raise error but simply doesn’t do anything. I mainly work on SP2, but also run some tests on SP4 with same results. Thank you. Ciprian