How to specify the Base name parameter for Codegen?

Is it possible to set the Base name property with xmlrpc connection from python script?

I need a better description of what exactly you are trying to change. Can you clarify what the “Base Name” property is? Can you show where this setting exists in the context of a PLECS menu or in the generated code?

it is located in the Coder options window, under the General Tab, Ouput options section. See attached file for reference.

Thank you for clarifying. Out of curiosity, why would you like to change this parameter?

You cannot change that parameter directly through XML-RPC. When left empty the base name field is derived from the model or subsystem same. You can use the plecs.set() command to change the subsystem name by changing the “Name” parameter of the subsystem to the desired value.

plecs.set(‘componentPath’, ‘parameter’, ‘value’)

If you want a name independent of the subsystem name, then the only workaround that comes to mind is to use string replacemet to edit the value saved in the *.plecs file using python.

Thank you for your reply, I have a model that I compile into 6 different variants, right now they would all show with the base model name on the RTBox HTML dashboard, I was hoping I can change the name programmatically during the build process for easier identification, of which model is currently flashed to the RTBox.

I have included an image for clarification.

If you are generating code for the top-level model, then you should change the name of the model file just prior to code generation. If you are generating code for just a subsystem, then you can change the name of the subsystem. Either method should have the desired result.

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