ModelGen working with macros