Hi Aharon,
If your need is to add or remove measure via script, it can be realized by setFilter method.
The idea behind is that [Measure] is a special dimension whose members are those measures.
So for example, DS_1.setFilterExt("[Measures]", "REVENUE;COST;PROFIT;");
Best regards,
Alfred