1. A computer implemented method comprising: providing a block diagram model in a block diagram modeling and code generation system, the block diagram model being associated with a data object derived from a pre-defined data object class, the pre-defined data object class having one or more default attributes; acquiring a definition of one or more user-extended data attributes to be included in a custom data object class which is as a subclass of the pre-defined data object class; acquiring values for one or more of the user-extended data attributes from an external data source; associating the acquired values with the user-extended attributes; and incorporating the acquired values into an instance of the custom data object class, the model inheriting the default attributes and the user-extended attributes from data in the data source instead of the default attributes and the user-extended attributes being specified directly in the model.