We are still working on migrating to the new Bosch Connected Industry Online Portal. Stay tuned! Click here for the latest updates.
08-07-2024 11:39 AM
Hallo,
i have a problem with the export code of an self dev Addon:
The Addon has a codeTemplate for export:
The template looks like this:
If i have just this addon on the ModeHandler-Level, the code looks like this:
So the extends Code is missing!
If I add another Addon (e.g. NxDataSetManagerAddon) with an export, that the Extend code is there!
After Removing the other Addon (NxDataSetManagerAddon), the export code is still working!
So what could be the problem? Could somebody help me?
08-07-2024 12:32 PM
If a add a SequenceEnum to the OOD than it will work at every use case!
Is this needed at every time? What is the connection here?
08-08-2024 05:21 PM
Due to holiday season in Germany it will take some time until this can be checked by a developer.
09-02-2024 05:01 PM
The reason for this behavior is that the name of the base FB "AeMesFu_xAddon" is identical to the default name of the derived FB created in your project. When the type definition in the project is created, it looks for its base type by name and finds itself. As circular base type references are impossible, the property for the base type remains empty. After renaming the instance to AeMesFu_1Addon, the names are not ambiguous anymore. When the object is reloaded now, the base type will be correctly set. (This can be triggered either by reloading all object definitions or by changing an object parameter of the addon, e.g. FuNo.)
That means it's not the export that is not working correctly, but the base type is really not set in the project data when instantiating the addon the first time.
A possible solution for this problem: Change the name of the addon to AeMesFu_x (whithout the Addon suffix). This is used as default instance name, so the name is not the same as the base class anymore and everything should work. Most other addons don't have that suffix in the name, anyway.