Can a parameter in the workspace use a type definition the Data Dictionary?

3 次查看(过去 30 天)
Hi everyone,
I have tried to create a paramater in the workspace which makes use of a bus definition in the Data Dictionary. However, it does not seem that the workspace can "see" the dd by default and thus when trying to use the parameter, Matlab throws an error stating that the bus definition is undefined in the workspace.
Is there a way to set the workspace to have access to the dictionary? Essentially, to allow it to see and the use the definitions in it?

采纳的回答

Dhruv
Dhruv 2023-9-21
I understand that you are trying to access the Data Dictionary from the base workspace through a parameter.
Data Dictionaries are designed to provide a centralized and controlled way to manage model-related data, and they operate independently of the base workspace.
As a workaround to your use case, I suggest you to:
  1. Export data from Data Dictionary: There are certain ways you can export the data dictionary and then use it in the base workspace, refer to the following link for detailed guidance: https://in.mathworks.com/help/releases/R2022b/simulink/ug/import-and-export-dictionary-data.html
  2. Make some variables access from workspace: You can employ variables in both the base workspace and the Data Dictionary simultaneously. Even when model is linked to Data Dictionary, you can use ‘evalin’ function to access variables which are defined in base workspace. You may want to refer to the documentation: https://in.mathworks.com/help/releases/R2022b/matlab/ref/evalin.html
I hope the above suggestions will help you in achieving your desired outcome!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Variables 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by