Create mass in place using Dynamo

Is this possible???

doing the same thing you have in mind here, but in a conceptual mass family, may be the better option. In the family you have the option to make parameters.

Thanks Marcel, but I need to have the flexibility of the in-place mass, unfurtonatelly that is not an option for us