This is not officially supported, but the Base name property is stored in a parameter named 'CodeGenBaseName'.
plecs.set('<ModelName>','CodeGenBaseName','Value')
should do the trick (or '<ModelName/Subsystem>' when code is generated for a subsystem).
Kind regards,
Oliver Schwartz