You can generate code for a package and all its classes, or generate code for selected classes within a package. You can generate code from the Code menu, the browser, or an object model diagram.
Before you generate code for a class or package, you must set the active configuration, as if you were generating the executable file for the entire model. For more information, see Setting the active configuration.