The number of attributes that can be added to a structured UDT per ALTER TYPE … ADD ATTRIBUTE request varies between 300 and 512, depending on the platform. The limit is imposed because of restrictions on the availability of the Parser memory that is required to register the autogenerated observer and mutator methods for a structured type, not because of the limit on the total number of attributes that can be defined per structured type, which is roughly 4,000.
The workaround for this is just to submit as many individual ALTER TYPE … ADD ATTRIBUTE requests, each having an upper limit of 512 attributes, as required to define the desired total number of attributes for the structured UDT.