Creating static variables

I am developing a C++.NET model using SDE.NET Pro and I would like to know how I can make my variables be shown as static in my model and then generate them into static variables in code.

For ex. Class Cat has an attribute named age of type int. I would like it to show “age: static int” in the model and produce the following C++ code: “static int age;”.

How can this be done?


Dear Brian,

Thank you for your message. To create static variables, you can right click on the attribute and select Scope > classifier. After that you should see the attribute was underlined. When you update the model to code, it will be generated as static variable. If you have any further questions, please feel free to contact us again.

Best regards,

Thanks, that was easy.