How to change AR-PACKAGE(Components) name

Hi!
I want to change AUTOSAR Package Name.
I made AUTOSAR Options using AUTOSAR Architecture and Data dictionary.
I could check all of options in AUTOSAR Dictionary of Model previous version.
How to Change AR-PACKAGE Tag Name?

Answers (1)

Hi @선주,
As I see, you are looking to change the AUTOSAR package tag name using the properties object. You can achieve this by setting the respective package path using the AUTOSAR properties object. Here's a code snippet from an example:
% change from Component to MyGround
arProps = autosar.api.getAUTOSARProperties(hModel);
set(arProps,'XmlOptions','ConstantSpecificationPackage','/pkg/misc/MyGround',...'MoveElements','None');
You can also modify it in the "XmlOptions" tab under the "AUTOSAR Dictionary" from the UI. For more information, refer to the "Configure AUTOSAR Packages and Paths" section at the following link:

3 Comments

Thank you for reply.
I got Error command.
Please, Check this command
How to solve that problem?
--------------------------------------------------------------------------------
Error using autosar.api.internal.M3IModelSLModelContext
Invalid Simulink object name: 'SWC_App'.
Error in autosar.api.internal.M3IModelContext.createContext
Error in autosar.api.getAUTOSARProperties - Show complete stack trace
Caused by:
Error using autosar.api.internal.M3IModelSLModelContext
The block diagram 'SWC_App' is not loaded. - Show complete stack trace
Displaying stack trace:
Error using autosar.api.internal.M3IModelSLModelContext>M3IModelSLModelContext.M3IModelSLModelContext
• In autosar.api.internal.M3IModelSLModelContext>M3IModelSLModelContext.M3IModelSLModelContext
• In autosar.api.internal.M3IModelContext>M3IModelContext.createContext
• In autosar.api.getAUTOSARProperties>getAUTOSARProperties.getAUTOSARProperties
@선주, it seems like the Simulink model or data dictionary named 'SWC_App' is not found in your current working directory. Please check if it exists.
Follow the example in the "Control AUTOSAR Elements Affected by Package Path Modifications" section, which uses the following model:
openExample('autosar_swc_expfcns');
선주
선주 on 6 Nov 2024
Edited: 선주 on 6 Nov 2024
I found Error reason.
And I had another issue.
I use AUTOSAR Interface Dictionary. So I need to set XML Options in 'Architectural Data Editor'.
I want to set other ARPackage name each component .
-----------------------------------------------------------------------
Error using autosar.api.getAUTOSARProperties/set
To modify AUTOSAR properties defined in Architectural Data section of dictionary referenced by
'SWC_App', use autosar.api.getAUTOSARProperties(dictName).

Sign in to comment.

Products

Release

R2024b

Tags

Asked:

on 5 Nov 2024

Edited:

on 6 Nov 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!