# How to specify the Base name parameter for Codegen?

**URL:** <https://forum.plexim.com/t/how-to-specify-the-base-name-parameter-for-codegen/1058>\
**Category:** Coder\
**Tags:** codegen, xml-rpc\
**Created:** [September 15, 2021, 3:40pm UTC](https://forum.plexim.com/t/how-to-specify-the-base-name-parameter-for-codegen/1058 "2021-09-15T15:40:56Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![abugabma](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@abugabma](https://forum.plexim.com/u/abugabma)\
**Post date:** [September 15, 2021, 3:40pm UTC](https://forum.plexim.com/t/how-to-specify-the-base-name-parameter-for-codegen/1058/1 "2021-09-15T15:40:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Bryan\_Lieblick](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/bryan_lieblick/32/10_2.png) [@Bryan\_Lieblick](https://forum.plexim.com/u/Bryan_Lieblick)\
**Post date:** [September 16, 2021, 11:34am UTC](https://forum.plexim.com/t/how-to-specify-the-base-name-parameter-for-codegen/1058/2 "2021-09-16T11:34:53Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![abugabma](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@abugabma](https://forum.plexim.com/u/abugabma)\
**Post date:** [September 17, 2021, 10:45am UTC](https://forum.plexim.com/t/how-to-specify-the-base-name-parameter-for-codegen/1058/3 "2021-09-17T10:45:36Z")

</div>

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

 ![PlecsCodegen.PNG](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/1X/18ff723cebed33c86c00d2b5e03b7cd786e7040c.png)

---

<div class="post-metadata">

**Author:** ![Bryan\_Lieblick](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/bryan_lieblick/32/10_2.png) [@Bryan\_Lieblick](https://forum.plexim.com/u/Bryan_Lieblick)\
**Post date:** [September 17, 2021, 1:45pm UTC](https://forum.plexim.com/t/how-to-specify-the-base-name-parameter-for-codegen/1058/4 "2021-09-17T13:45:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![abugabma](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@abugabma](https://forum.plexim.com/u/abugabma)\
**Post date:** [September 17, 2021, 2:22pm UTC](https://forum.plexim.com/t/how-to-specify-the-base-name-parameter-for-codegen/1058/5 "2021-09-17T14:22:17Z")

</div>

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.

 ![ModelName.PNG](https://europe1.discourse-cdn.com/flex006/uploads/plecs/original/1X/a6b51bec08b60c2c2e16f4f15b7b1a1044553853.png)

---

<div class="post-metadata">

**Author:** ![Bryan\_Lieblick](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/bryan_lieblick/32/10_2.png) [@Bryan\_Lieblick](https://forum.plexim.com/u/Bryan_Lieblick)\
**Post date:** [September 20, 2021, 9:51am UTC](https://forum.plexim.com/t/how-to-specify-the-base-name-parameter-for-codegen/1058/6 "2021-09-20T09:51:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Oliver\_Schwartz](https://dub1.discourse-cdn.com/flex006/user_avatar/forum.plexim.com/oliver_schwartz/32/6_2.png) [@Oliver\_Schwartz](https://forum.plexim.com/u/Oliver_Schwartz)\
**Post date:** [September 26, 2021, 9:19am UTC](https://forum.plexim.com/t/how-to-specify-the-base-name-parameter-for-codegen/1058/7 "2021-09-26T09:19:16Z")

</div>

This is not officially supported, but the Base name property is stored in a parameter named ‘CodeGenBaseName’.

```auto
plecs.set('<ModelName>','CodeGenBaseName','Value')

```

should do the trick (or ‘\<ModelName/Subsystem\>’ when code is generated for a subsystem).Kind regards,Oliver Schwartz
