{"id":4696,"date":"2021-12-23T12:03:46","date_gmt":"2021-12-23T03:03:46","guid":{"rendered":"https:\/\/blogs.mathworks.com\/japan-community\/?p=4696"},"modified":"2022-01-20T09:40:53","modified_gmt":"2022-01-20T00:40:53","slug":"customtoolstrip","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/japan-community\/2021\/12\/23\/customtoolstrip\/","title":{"rendered":"\u81ea\u5206\u3060\u3051\u306e Simulink \u3092\u4f5c\u308d\u3046\uff01\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u81ea\u4f5c\u6a5f\u80fd\u306e\u7d39\u4ecb\uff01"},"content":{"rendered":"<p>\u7686\u3055\u3093\u3053\u3093\u306b\u3061\u306f\u3002\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u9060\u85e4\u3068\u7533\u3057\u307e\u3059\u3002<br \/>\n\u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001\u300cSimulink \u3068 MATLAB \u3092\u3064\u306a\u3050\u300d\u3092\u30b3\u30f3\u30bb\u30d7\u30c8\u3068\u3057\u3066\u3001\u4e3b\u306b\u6280\u8853\u7684\u306a\u5185\u5bb9\u306b\u3064\u3044\u3066\u66f8\u3044\u3066\u304a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3055\u3066\u30012021\u5e74\u3082\u3082\u3046\u6b8b\u3059\u3068\u3053\u308d\u308f\u305a\u304b\u3068\u306a\u308a\u307e\u3057\u305f\u3002\u4eca\u5e74\u3082\u30b3\u30ed\u30ca\u798d\u306e\u5f71\u97ff\u3067\u69d8\u3005\u306a\u30a4\u30d9\u30f3\u30c8\u304c\u30aa\u30f3\u30e9\u30a4\u30f3\u3067\u306e\u958b\u50ac\u3068\u306a\u308a\u3001MATLAB \u30e6\u30fc\u30b6\u30fc\u306e\u7686\u3055\u3093\u3068\u3082\u5bfe\u9762\u3067\u4f1a\u3046\u3053\u3068\u304c\u3067\u304d\u305a\u5bc2\u3057\u3044\u65e5\u3005\u304c\u7d9a\u3044\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f MathWorks \u793e\u54e1\u3068 MATLAB \u30e6\u30fc\u30b6\u30fc\u306e\u7686\u3055\u3093\u3001\u3042\u308b\u3044\u306f\u30e6\u30fc\u30b6\u30fc\u306e\u7686\u3055\u3093\u540c\u58eb\u304c\u7e4b\u304c\u308c\u308b\u3088\u3046\u306b\u3001\u4eca\u5f8c\u3082\u69d8\u3005\u306a\u60c5\u5831\u306e\u767a\u4fe1\u3092\u7d9a\u3051\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u6765\u5e74\u3082\u3069\u3046\u305e\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3057\u307e\u3059\uff01<\/p>\n<p>&nbsp;<\/p>\n<p>\u3068\u3001\u6328\u62f6\u306f\u3053\u308c\u304f\u3089\u3044\u306b\u3057\u3066\u3001\u305d\u308d\u305d\u308d\u672c\u984c\u306b\u5165\u308a\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u7686\u3055\u3093\u3001\u3082\u3046 MATLAB R2021b \u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u307e\u3057\u305f\u3067\u3057\u3087\u3046\u304b\uff1f\u5b9f\u306f\u3001R2021b \u3067\u306f\u3001\u79c1\u304c\u4ee5\u524d<a href=\"https:\/\/blogs.mathworks.com\/japan-community\/2020\/02\/19\/control-simulink-from-matlab-with-simulink-api\/?from=jp\">\u89e3\u8aac\u8a18\u4e8b<\/a>\u3092\u66f8\u3044\u305f Simulink API \u3068\u975e\u5e38\u306b\u76f8\u6027\u306e\u826f\u3044\u65b0\u6a5f\u80fd\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002\u305d\u306e\u6a5f\u80fd\u3068\u306f\u30ba\u30d0\u30ea\u3001\u300c<span style=\"color: #ff0000;\"><strong>Simulink \u306e\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u3092\u81ea\u4f5c\u3067\u304d\u308b\u6a5f\u80fd<\/strong><\/span>\u300d\u3067\u3059\uff01<\/p>\n<p>&nbsp;<\/p>\n<p>\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u3068\u306f\u3001Simulink \u306e\u4e0a\u90e8\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u69d8\u3005\u306a\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\u30a2\u30a4\u30b3\u30f3\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1917\" height=\"176\" class=\"alignnone size-full wp-image-4801\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/toolstrip.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u69d8\u3005\u306a\u6a5f\u80fd\u304c\u5099\u308f\u3063\u3066\u3044\u308b\u3053\u306e\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u3067\u3059\u304c\u3001\u8907\u6570\u306e\u30bf\u30d6\u306b\u5206\u304b\u308c\u3066\u914d\u7f6e\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u76ee\u7684\u306e\u6a5f\u80fd\u304c\u3069\u306e\u30bf\u30d6\u306b\u3042\u308b\u306e\u304b\u63a2\u3059\u306e\u304c\u5927\u5909\u3001\u8907\u6570\u306e\u30bf\u30d6\u3092\u5207\u308a\u66ff\u3048\u3066\u64cd\u4f5c\u3092\u884c\u3046\u306e\u304c\u9762\u5012\u3001\u3068\u3044\u3063\u305f\u82e6\u52b4\u3082\u3042\u308a\u307e\u3059\u3002\u300c<span style=\"color: #ff0000;\">\u81ea\u5206\u304c\u3088\u304f\u4f7f\u3046\u6a5f\u80fd\u3060\u3051\uff11\u3064\u306e\u30bf\u30d6\u306b\u307e\u3068\u3081\u3089\u308c\u306a\u3044\u304b\u306a\u3041<\/span>\u300d\u3068\u601d\u3063\u305f\u3053\u3068\u306e\u3042\u308b\u65b9\u3082\u3044\u3089\u3063\u3057\u3083\u308b\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u307e\u305f\u3001Simulink API \u3067\u4fbf\u5229\u6a5f\u80fd\u3092\u958b\u767a\u3057\u3066\u3044\u308b\u4eba\u306f\u3001\u8ab0\u3057\u3082\u304c\u300c\u81ea\u5206\u306e\u4f5c\u3063\u305f\u6a5f\u80fd\u3092\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u306b\u767b\u9332\u3057\u305f\u3044\u300d\u3068\u8003\u3048\u305f\u3053\u3068\u304c\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u30a2\u30a4\u30b3\u30f3\u3092\u62bc\u3059\u3060\u3051\u3067\u4fbf\u5229\u6a5f\u80fd\u3092\u5b9f\u884c\u3067\u304d\u308c\u3070\u3001\u308f\u3056\u308f\u3056 MATLAB \u306b\u623b\u3063\u3066\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u624b\u9593\u304c\u7701\u3051\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u4eca\u56de\u7d39\u4ecb\u3059\u308b\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u81ea\u4f5c\u6a5f\u80fd\u306f\u3001\u307e\u3055\u306b\u3053\u3046\u3044\u3063\u305f\u65b9\u3005\u306e\u5922\u3092\u304b\u306a\u3048\u308b\u305f\u3081\u306e\u6a5f\u80fd\u3067\u3059\uff01<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"634\" height=\"121\" class=\"alignnone size-full wp-image-4744\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/goals.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u3053\u306e\u753b\u50cf\u306e\u3088\u3046\u306b\u3001\u306a\u3093\u3068<strong><span style=\"color: #ff0000;\">\u65e2\u5b58\u6a5f\u80fd\u3084\u81ea\u4f5c\u6a5f\u80fd\u3092\u81ea\u4f5c\u3057\u305f\u30bf\u30d6\u306b\u307e\u3068\u3081\u308b\u3053\u3068\u304c\u3067\u304d\u308b<\/span><\/strong>\u3093\u3067\u3059\uff01\u7d20\u6674\u3089\u3057\u3044\uff01<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u65e2\u5b58\u6a5f\u80fd\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u3068\u81ea\u4f5c\u6a5f\u80fd\u3092\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u3092\u9806\u756a\u306b\u89e3\u8aac\u3057\u3066\u3044\u304d\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u203b<a href=\"https:\/\/jp.mathworks.com\/help\/releases\/R2021b\/simulink\/ug\/create-custom-simulink-toolstrip-tabs.html\">\u3053\u3061\u3089\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3082\u5408\u308f\u305b\u3066\u3054\u89a7\u3044\u305f\u3060\u304f\u3068\u8a73\u7d30\u304c\u308f\u304b\u308a\u3084\u3059\u3044\u3067\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h1><span style=\"color: #ff6600;\">0. \u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u4f5c\u6210\u306e\u305f\u3081\u306e\u6e96\u5099<\/span><\/h1>\n<p>\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u306e\u81ea\u4f5c\u3092\u884c\u3046\u305f\u3081\u306b\u306f\u3001\u4e8b\u524d\u6e96\u5099\u304c\u5fc5\u8981\u3067\u3059\u3002\u3068\u306f\u3044\u3063\u3066\u3082\u6e96\u5099\u306f\u8d85\u7c21\u5358\u3001\uff12\u3064\u306e\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u3059\u3002<\/p>\n<p>\u307e\u305a\uff11\u3064\u76ee\u306f <a href=\"https:\/\/jp.mathworks.com\/help\/releases\/R2021b\/simulink\/slref\/slcreatetoolstripcomponent.html\">slCreateToolstripComponent<\/a> \u3068\u3044\u3046\u95a2\u6570\u3067\u3059\u3002\u3053\u306e\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001\u73fe\u5728\u306e\u30d5\u30a9\u30eb\u30c0\u4e0b\u306b &#8220;resources&#8221; \u3068\u3044\u3046\u30d5\u30a9\u30eb\u30c0\u304c\u4f5c\u6210\u3055\u308c\u3001\u305d\u306e\u4e0b\u306b\u30d9\u30fc\u30b9\u3068\u306a\u308b\u30b5\u30d6\u30d5\u30a9\u30eb\u30c0\u3084\u30d5\u30a1\u30a4\u30eb\u304c\u81ea\u52d5\u3067\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002\u5b9f\u884c\u3059\u308b\u3068\u304d\u306f\u4f5c\u6210\u3059\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u540d\u524d\u3092\u5f15\u6570\u3068\u3057\u3066\u6e21\u3057\u307e\u3059\u3002<\/p>\n<p><code>&gt;&gt; slCreateToolstripComponent(<span style=\"color: #ff00ff;\">\"test\"<\/span>)<\/code><br \/>\n<span style=\"color: #ff6600;\"><img decoding=\"async\" loading=\"lazy\" width=\"455\" height=\"247\" class=\"alignnone size-full wp-image-4702\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/baseComponent.png\" alt=\"\" \/><\/span><\/p>\n<p>&nbsp;<\/p>\n<p>\uff12\u3064\u76ee\u306f <a href=\"https:\/\/jp.mathworks.com\/help\/releases\/R2021b\/simulink\/slref\/slcreatetoolstriptab.html\">slCreateToolstripTab<\/a> \u3068\u3044\u3046\u95a2\u6570\u3067\u3059\u3002\u3053\u306e\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001json \u30d5\u30a9\u30eb\u30c0\u4e0b\u306b\u30bf\u30d6\u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u81ea\u52d5\u3067\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u5b9f\u884c\u3059\u308b\u3068\u304d\u306f\u3001\u4f5c\u6210\u3059\u308b\u30bf\u30d6\u306eID\u3068\u5148\u307b\u3069\u4f5c\u6210\u3057\u305f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u540d\u524d\u3001\u305d\u3057\u3066\u30bf\u30d6\u306e\u540d\u524d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p><code>&gt;&gt; slCreateToolstripTab(<span style=\"color: #ff00ff;\">\"testTab\"<span style=\"color: #000000;\">,<\/span>\"test\"<span style=\"color: #000000;\">,Title=<span style=\"color: #ff00ff;\">\"myTab\"<\/span><\/span><\/span>)<\/code><\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"452\" height=\"279\" class=\"alignnone size-full wp-image-4705\" style=\"color: #222222; font-family: monospace;\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/testTab.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&#8220;testTab.json&#8221; \u3068\u3044\u3046\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u306e json \u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3066\u3044\u304f\u3053\u3068\u3067\u3001\u30aa\u30ea\u30b8\u30ca\u30eb\u306e\u30bf\u30d6\u3092\u4f5c\u6210\u3067\u304d\u308b\u3001\u3068\u3044\u3046\u308f\u3051\u3067\u3059\u3002\u3061\u306a\u307f\u306b\u3001\u3053\u306e\u6642\u70b9\u3067\u65e2\u306b\u30bf\u30d6\u81ea\u4f53\u306f\u4f5c\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"991\" height=\"202\" class=\"alignnone size-full wp-image-4708\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/myTab.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u3053\u308c\u3067\u4e8b\u524d\u6e96\u5099\u306f\u5b8c\u4e86\u3067\u3059\u3002\u65e9\u901f\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>&nbsp;<\/p>\n<h1><span style=\"color: #ff6600;\">1. \u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u306b\u65e2\u5b58\u6a5f\u80fd\u3092\u307e\u3068\u3081\u305f\u30bf\u30d6\u3092\u4f5c\u6210\u3059\u308b<\/span><\/h1>\n<p>\u307e\u305a\u306f\u65e2\u5b58\u6a5f\u80fd\u3092\uff11\u3064\u306e\u30bf\u30d6\u306b\u307e\u3068\u3081\u308b\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<h2><span style=\"color: #ff6600;\">1.1 \u30bf\u30d6\u306e\u968e\u5c64\u69cb\u9020\u3092\u8a2d\u8a08\u3059\u308b<\/span><\/h2>\n<p>\u521d\u3081\u306b\u3001\u30bf\u30d6\u306e\u968e\u5c64\u69cb\u9020\u3092\u4f5c\u3063\u3066\u3044\u304d\u307e\u3059\u3002\u5148\u307b\u3069\u81ea\u52d5\u3067\u4f5c\u6210\u3055\u308c\u305f json \u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u78ba\u8a8d\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>testTab.json<code>{\r\n  \"version\": <span style=\"color: #ff00ff;\">\"R2021b\"<\/span>,\r\n  \"entries\": [\r\n    {\r\n      \"type\": <span style=\"color: #ff00ff;\">\"Tab\"<\/span>,\r\n      \"id\": <span style=\"color: #ff00ff;\">\"testTab\"<\/span>,\r\n      \"title\": <span style=\"color: #ff00ff;\">\"myTab\"<\/span>\r\n    }\r\n  ]\r\n}\r\n<\/code><\/pre>\n<p>json \u30d5\u30a1\u30a4\u30eb\u3067\u306f\u3001\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3068\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u968e\u5c64\u69cb\u9020\u3067\u5b9a\u7fa9\u3057\u307e\u3059\u3002\u4eca\u4f5c\u6210\u3055\u308c\u3066\u3044\u308b\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306f\u30bf\u30d6\u3060\u3051\u306a\u306e\u3067\u3001\u305d\u306e\u30bf\u30d6\u306e type, id, title \u3068\u3044\u3063\u305f\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u5b9a\u7fa9\u3057\u3066\u3042\u308b\u3060\u3051\u3067\u3059\u3002\u3053\u306e\u30bf\u30d6\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u4e2d\u306b children \u3068\u3044\u3046\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u65b0\u305f\u306b\u4f5c\u308a\u3001\u305d\u306e\u4e0b\u306b\u65b0\u305f\u306a\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u304f\u3053\u3068\u3067\u30bf\u30d6\u3092\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u30bf\u30d6\u3092\u4f5c\u6210\u3059\u308b\u969b\u306e\u5404\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e\u968e\u5c64\u69cb\u9020\u306f\u4ee5\u4e0b\u306e\u56f3\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"484\" height=\"324\" class=\"alignnone size-full wp-image-4726\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/toolstrip-tab-hierarchy.png\" alt=\"\" \/>\u3000\u3000<img decoding=\"async\" loading=\"lazy\" width=\"300\" height=\"115\" class=\"alignnone size-medium wp-image-4729\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/componentName-300x115.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Tab -&gt; Section -&gt; Column \u3068\u30bf\u30d6\u3092\u533a\u5207\u3063\u3066\u3044\u304d\u3001\u6700\u5f8c\u306b\u5b9f\u969b\u306e\u6a5f\u80fd\u3067\u3042\u308b Control \u3092\u914d\u7f6e\u3059\u308b\u30a4\u30e1\u30fc\u30b8\u3067\u3059\u3002\u8a66\u3057\u306b json \u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u3066\u65b0\u3057\u3044 Section \u3068 Column \u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>testTab.json<code>{\r\n  \"version\": <span style=\"color: #ff00ff;\">\"R2021b\"<\/span>,\r\n  \"entries\": [\r\n    {\r\n      \"type\": <span style=\"color: #ff00ff;\">\"Tab\"<\/span>,\r\n      \"id\": <span style=\"color: #ff00ff;\">\"testTab\"<\/span>,\r\n      \"title\": <span style=\"color: #ff00ff;\">\"myTab\"<\/span>,\r\n      \"children\": [\r\n          {\r\n              \"type\": <span style=\"color: #ff00ff;\">\"Section\"<\/span>,\r\n              \"title\": <span style=\"color: #ff00ff;\">\"Test\"<\/span>,\r\n              \"children\": [\r\n                  {\r\n                      \"type\": <span style=\"color: #ff00ff;\">\"Column\"<\/span>\r\n                  }\r\n              ]\r\n          }\r\n      ]\r\n    }\r\n  ]\r\n}<\/code><\/pre>\n<p>&#8220;Test&#8221; \u3068\u3044\u3046\u30bf\u30a4\u30c8\u30eb\u306e Section \u306b 1 \u3064\u306e Column \u3092\u5b9a\u7fa9\u3057\u307e\u3057\u305f\u3002\u305f\u3060\u3057\u3001<span style=\"color: #ff0000;\">json \u30d5\u30a1\u30a4\u30eb\u3092\u7de8\u96c6\u3057\u305f\u3060\u3051\u3067\u306f\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u306f\u66f4\u65b0\u3055\u308c\u307e\u305b\u3093<\/span>\u3002\u7de8\u96c6\u3092\u9069\u7528\u3059\u308b\u306b\u306f\u3001<a href=\"https:\/\/jp.mathworks.com\/help\/releases\/R2021b\/simulink\/slref\/slreloadtoolstripconfig.html\">slReloadToolstripConfig<\/a> \u95a2\u6570\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<p><code>&gt;&gt; slReloadToolstripConfig<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>\u3082\u3057 json \u30d5\u30a1\u30a4\u30eb\u306b\u4e0d\u5099\u304c\u3042\u3063\u305f\u5834\u5408\u306f\u3001\u8b66\u544a\u3067\u6559\u3048\u3066\u304f\u308c\u307e\u3059\u3002\u4f55\u304b\u8b66\u544a\u304c\u51fa\u305f\u3089\u3001\u62ec\u5f27\u3084\u30ab\u30f3\u30de\u306a\u3069\u304c\u629c\u3051\u3066\u3044\u306a\u3044\u304b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u4fee\u6b63\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"803\" height=\"186\" class=\"alignnone size-full wp-image-4741\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/newSection.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>MYTAB \u306b\u65b0\u305f\u306b TEST \u3068\u3044\u3046 Section \u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\uff01<\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #ff6600;\">1.2 \u6a5f\u80fd\u3092\u8ffd\u52a0\u3059\u308b<\/span><\/h2>\n<p>\u6b21\u306b\u3001\u3053\u306e Section \u306b\u65e2\u5b58\u6a5f\u80fd\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304d\u307e\u3059\u3002\u6a5f\u80fd\u3092\u8ffd\u52a0\u3059\u308b\u306b\u306f\u3001Column \u306e children \u4e0b\u3067 Control \u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u306e type \u3068 action \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002type \u306f\u4ee5\u4e0b\u306e\uff14\u7a2e\u985e\u304b\u3089\u9078\u3079\u307e\u3059\u3002<\/p>\n<ul>\n<li>PushButton\uff1a\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u30a2\u30af\u30b7\u30e7\u30f3\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>DropDownButton\uff1a\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30e1\u30cb\u30e5\u30fc\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>SplitButton\uff1aPushButton \u3068 DropDownButton \u304c\u30bb\u30c3\u30c8\u3067\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/li>\n<li>EmptyControl\uff1a\u4f4d\u7f6e\u8abf\u6574\u7528\u306e\u30b9\u30da\u30fc\u30b9\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/li>\n<\/ul>\n<p>action \u306f\u65e2\u5b58\u6a5f\u80fd\u306e\u52d5\u4f5c\u306b\u305d\u308c\u305e\u308c\u5272\u308a\u5f53\u3066\u3089\u308c\u305f\u30a2\u30af\u30b7\u30e7\u30f3\u540d\u3067\u3059\u3002\u4f8b\u3048\u3070 Simulink \u306e\u300c\u958b\u304f\u300d\u30dc\u30bf\u30f3\u304c\u62bc\u3055\u308c\u305f\u6642\u306e\u52d5\u4f5c\u306f &#8220;openModelAction&#8221; \u3068\u3044\u3046\u540d\u524d\u3067\u3059\u3002\u3053\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u3063\u3066\u3001\u8a66\u3057\u306b\u30af\u30ea\u30c3\u30af\u3057\u305f\u3089\u30e2\u30c7\u30eb\u3092\u958b\u304f\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u8868\u793a\u3059\u308b\u30dc\u30bf\u30f3\u3092\u8ffd\u52a0\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>testTab.json<code>\"type\": \"Column\",\r\n\"children\": [\r\n    {\r\n        \"type\": <span style=\"color: #ff00ff;\">\"PushButton\"<\/span>,\r\n        \"action\": <span style=\"color: #ff00ff;\">\"openModelAction\"<\/span>\r\n     }\r\n]\r\n<\/code><\/pre>\n<p>\u203b\u30b3\u30fc\u30c9\u304c\u9577\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3001Column \u306e\u7de8\u96c6\u90e8\u5206\u3060\u3051\u629c\u304d\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>slReloadToolstripConfig \u95a2\u6570\u3092\u5b9f\u884c\u3057\u3066\u9069\u7528\u3057\u3066\u307f\u308b\u3068\u2026\u2026<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"947\" height=\"184\" class=\"alignnone size-full wp-image-4756\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/openButton.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u30e2\u30c7\u30eb\u3092\u958b\u304f\u30dc\u30bf\u30f3\u304c\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\uff01openModelAction \u306b\u306f\u3042\u3089\u304b\u3058\u3081\u30e2\u30c7\u30eb\u3092\u958b\u304f\u305f\u3081\u306e\u52d5\u4f5c\u304c\u3059\u3079\u3066\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u3082\u3046\u3053\u306e\u30dc\u30bf\u30f3\u3092\u62bc\u305b\u3070\u30e2\u30c7\u30eb\u3092\u958b\u304f\u6a5f\u80fd\u3092\u4f7f\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u3068\u3063\u3066\u3082\u7c21\u5358\uff01<\/p>\n<p>&nbsp;<\/p>\n<p>\u305f\u3060\u3001\u554f\u984c\u306f\u30a2\u30af\u30b7\u30e7\u30f3\u540d\u3067\u3059\u3002\u8ffd\u52a0\u3057\u305f\u3044\u6a5f\u80fd\u306b\u5bfe\u5fdc\u3059\u308b\u30a2\u30af\u30b7\u30e7\u30f3\u540d\u306f\u3069\u3046\u3084\u3063\u3066\u8abf\u3079\u308c\u3070\u3088\u3044\u306e\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>&nbsp;<\/p>\n<p>\u3053\u3053\u3067\u4fbf\u5229\u306a\u306e\u304c\u3001<a href=\"https:\/\/jp.mathworks.com\/help\/releases\/R2021b\/simulink\/slref\/sltoolstripdevelopermode.html\">slToolstripDeveloperMode<\/a>\u00a0\u3068\u3044\u3046\u95a2\u6570\u3067\u3059\u3002\u3053\u306e\u95a2\u6570\u306f\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u306e\u6a5f\u80fd\u306e\u30a2\u30a4\u30b3\u30f3\u3068\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u540d\u524d\u3092\u8abf\u3079\u308b\u305f\u3081\u306e\u958b\u767a\u8005\u30e2\u30fc\u30c9\u3092\u30aa\u30f3\u30aa\u30d5\u5207\u308a\u66ff\u3048\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u95a2\u6570\u3067\u3059\u3002<\/p>\n<p><code>&gt;&gt; slToolstripDeveloperMode(\"on\")<br \/>\nSimulink \u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u306e\u958b\u767a\u8005\u30e2\u30fc\u30c9\u304c\u6709\u52b9\u306b\u306a\u308a\u307e\u3057\u305f\u3002Simulink \u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u4e0a\u3067\u4e00\u6642\u505c\u6b62\u3057\u3066 Ctrl \u3092\u62bc\u3059\u3068\u3001MATLAB \u30b3\u30de\u30f3\u30c9 \u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u305d\u306e\u30a6\u30a3\u30b8\u30a7\u30c3\u30c8\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3068\u30a2\u30a4\u30b3\u30f3\u306e\u540d\u524d\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>\u5b9f\u884c\u5f8c\u306b\u8868\u793a\u3055\u308c\u308b\u306e\u30c6\u30ad\u30b9\u30c8\u306b\u3082\u66f8\u3044\u3066\u3042\u308b\u901a\u308a\u3001\u958b\u767a\u8005\u30e2\u30fc\u30c9\u3092\u30aa\u30f3\u306b\u3059\u308b\u3068\u3001\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u306e\u30a2\u30a4\u30b3\u30f3\u306e\u4e0a\u306b\u30de\u30a6\u30b9\u3092\u6301\u3063\u3066\u3044\u304d Ctrl \u30ad\u30fc\u3092\u62bc\u3059\u3053\u3068\u3067\u3001\u30b3\u30de\u30f3\u30c9\u30a6\u30a3\u30f3\u30c9\u30a6\u4e0a\u306b\u305d\u306e\u6a5f\u80fd\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3068\u30a2\u30a4\u30b3\u30f3\u540d\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u8a66\u3057\u306b\u30b3\u30f3\u30d5\u30a3\u30ae\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u6b6f\u8eca\u30de\u30fc\u30af\u306e\u4e0a\u3067 Ctrl \u30ad\u30fc\u3092\u62bc\u3057\u3066\u307f\u308b\u3068\u2026\u2026<\/p>\n<p><code>Action: openModelConfigParamAction<br \/>\nIcon: settings<br \/>\n-------------------<\/code><\/p>\n<p>&nbsp;<\/p>\n<p>\u30a2\u30af\u30b7\u30e7\u30f3\u540d\u3068\u30a2\u30a4\u30b3\u30f3\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u3092\u4f7f\u3048\u3070\u65e2\u5b58\u6a5f\u80fd\u3092\u7c21\u5358\u306b\u30bf\u30d6\u306b\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre>testTab.json<code>\"type\": \"Column\",\r\n\"children\": [\r\n    {\r\n        \"type\": <span style=\"color: #ff00ff;\">\"PushButton\"<\/span>,\r\n        \"action\": <span style=\"color: #ff00ff;\">\"openModelAction\"<\/span>\r\n    },\r\n    {\r\n        \"type\": <span style=\"color: #ff00ff;\">\"PushButton\"<\/span>,\r\n        \"action\": <span style=\"color: #ff00ff;\">\"openModelConfigParamAction\"<\/span>\r\n    }\r\n]\r\n<\/code><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"963\" height=\"169\" class=\"alignnone size-full wp-image-4762\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/configButton.png\" alt=\"\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>\u30b3\u30f3\u30d5\u30a3\u30ae\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u30d1\u30e9\u30e1\u30fc\u30bf\u306e\u30dc\u30bf\u30f3\u304c\u8ffd\u52a0\u3067\u304d\u307e\u3057\u305f\uff01<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001<span style=\"color: #ff0000;\">\u3088\u304f\u4f7f\u3046\u6a5f\u80fd\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u540d\u3092\u958b\u767a\u8005\u30e2\u30fc\u30c9\u3067\u8abf\u3079\u3066\u30bf\u30d6\u306b Control \u3068\u3057\u3066\u8ffd\u52a0\u3057\u3066\u304a\u3051\u3070\u3001\u5fc5\u8981\u306a\u6a5f\u80fd\u3060\u3051\u3092\u307e\u3068\u3081\u305f\u4fbf\u5229\u306a\u30bf\u30d6\u3092\u4f5c\u6210\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff01<\/span><\/p>\n<p>&nbsp;<\/p>\n<h1><span style=\"color: #ff6600;\">2. \u81ea\u4f5c\u6a5f\u80fd\u3092\u30bf\u30d6\u306b\u8ffd\u52a0\u3059\u308b<\/span><\/h1>\n<p>\u6b21\u306b\u3001\u81ea\u4f5c\u3057\u305f\u6a5f\u80fd\u3092\u30bf\u30d6\u306b\u8ffd\u52a0\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\u81ea\u4f5c\u3057\u305f\u6a5f\u80fd\u3092\u8ffd\u52a0\u3059\u308b\u5834\u5408\u306f\u3001\u305d\u306e\u6a5f\u80fd\u3092\u65b0\u3057\u3044\u30a2\u30af\u30b7\u30e7\u30f3\u3068\u3057\u3066\u5b9a\u7fa9\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u305f\u3081\u3001\u65e2\u5b58\u6a5f\u80fd\u306e\u5834\u5408\u306b\u6bd4\u3079\u3066\u8907\u96d1\u3067\u3059\u3002<\/p>\n<h2><span style=\"color: #ff6600;\">2.1 \u30a2\u30af\u30b7\u30e7\u30f3\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3059\u308b<\/span><\/h2>\n<p>\u81ea\u4f5c\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u5148\u307b\u3069\u7de8\u96c6\u3057\u3066\u3044\u305f json \u30d5\u30a1\u30a4\u30eb\u3068\u306f\u5225\u306b &#8220;\u30bf\u30d6\u540d_actions.json&#8221; \u3068\u3044\u3046\u540d\u524d\u306e\u30d5\u30a1\u30a4\u30eb\u3092 json \u30d5\u30a9\u30eb\u30c0\u4e0b\u306b\u4f5c\u6210\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u3061\u3089\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u7279\u306b\u81ea\u52d5\u3067\u4f5c\u6210\u3059\u308b\u95a2\u6570\u306a\u3069\u306f\u306a\u3044\u306e\u3067\u3001\u5148\u307b\u3069\u306e json \u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3057\u3066\u540d\u524d\u3092\u5909\u3048\u308b\u306a\u3069\u3057\u3066\u624b\u52d5\u3067\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"453\" height=\"279\" class=\"alignnone size-full wp-image-4774\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/actionjson.png\" alt=\"\" \/><\/p>\n<p>\u4e2d\u8eab\u306f version \u3068 entries \u3060\u3051\u6b8b\u3057\u3066\u524a\u9664\u3057\u3066\u3057\u307e\u3063\u3066\u5927\u4e08\u592b\u3067\u3059\u3002<\/p>\n<pre>testTab_actions.json<code>{\r\n  \"version\": <span style=\"color: #ff00ff;\">\"R2021b\"<\/span>,\r\n  \"entries\": [\r\n    {\r\n    }\r\n  ]\r\n}\r\n<\/code><\/pre>\n<p>\u3053\u306e entries \u306e\u4e2d\u306b\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u304d\u3001\u5148\u307b\u3069\u306e Control \u306e Action \u3067\u305d\u308c\u3092\u6307\u5b9a\u3059\u308b\u3001\u3068\u3044\u3046\u6d41\u308c\u306b\u306a\u308a\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u4f8b\u3068\u3057\u3066\u300c\u30e2\u30c7\u30eb\u4e0a\u306e\u30b2\u30a4\u30f3\u3092\u4e00\u62ec\u3067\u5909\u66f4\u3059\u308b\u30a2\u30af\u30b7\u30e7\u30f3\u300d\u3092\u4f5c\u3063\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h2><span style=\"color: #ff6600;\">2.2 \u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b<\/span><\/h2>\n<p>\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3059\u308b\u3068\u304d\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b type \u3084 id \u306a\u3069\u306e\u5fc5\u8981\u306a\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<pre>testTab_actions.json<code>{\r\n  \"version\": <span style=\"color: #ff00ff;\">\"R2021b\"<\/span>,\r\n  \"entries\": [\r\n    {\r\n      \"type\": <span style=\"color: #ff00ff;\">\"Action\"<\/span>,\r\n      \"id\": <span style=\"color: #ff00ff;\">\"setGains\"<\/span>,\r\n      \"text\": <span style=\"color: #ff00ff;\">\"Set Gains\"<\/span>,\r\n      \"description\": <span style=\"color: #ff00ff;\">\"Set all gain values\"<\/span>,\r\n      \"command\": <span style=\"color: #ff00ff;\">\"setAllGains\"<\/span>,\r\n      \"commandType\": <span style=\"color: #ff00ff;\">\"Script\"<\/span>\r\n    }\r\n  ]\r\n}<\/code><\/pre>\n<p>type\u00a0\u306b\u306f\u5fc5\u305a &#8220;Action&#8221; \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u305d\u306e\u4ed6\u306b\u3064\u3044\u3066\u306f\u3001id \u304c Control \u3067\u6307\u5b9a\u3059\u308b\u969b\u306b\u4f7f\u3046\u30a2\u30af\u30b7\u30e7\u30f3\u306e\u540d\u524d\u3001text \u304c\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u4e0a\u306b\u8868\u793a\u3055\u308c\u308b\u30c6\u30ad\u30b9\u30c8\u3001description \u304c\u30de\u30a6\u30b9\u3092\u304b\u3056\u3057\u305f\u3068\u304d\u306b\u8868\u793a\u3055\u308c\u308b\u8aac\u660e\u6587\u3001command \u304c\u5b9f\u884c\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u540d\u3067\u3001\u6700\u5f8c\u306e commandType \u306f &#8220;Script&#8221; \u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>\u5b9f\u884c\u3057\u305f\u3044\u30b9\u30af\u30ea\u30d7\u30c8\u306f MATLAB \u304b\u3089\u898b\u3048\u308b\u5834\u6240\u306b\u7f6e\u3044\u3066\u304a\u304d\u307e\u3059\u3002\u4eca\u56de\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u30d5\u30a1\u30a4\u30eb &#8220;setAllGains.m&#8221; \u3092\u7528\u610f\u3057\u307e\u3057\u305f\u3002<\/p>\n<pre>setAllGains.m<code>blocks = find_system(gcs,<span style=\"color: #ff00ff;\">\"BlockType\"<\/span>,<span style=\"color: #ff00ff;\">\"Gain\"<\/span>);\r\nvalues = get_param(blocks,<span style=\"color: #ff00ff;\">\"Gain\"<\/span>);\r\ngainValues = inputdlg(blocks,<span style=\"color: #ff00ff;\">\"Set gains\"<\/span>,1,values);\r\n<span style=\"color: #0000ff;\">if<\/span> ~isempty(gainValues)\r\n    <span style=\"color: #0000ff;\">for<\/span> i = 1:length(blocks)\r\n        set_param(blocks{i},<span style=\"color: #ff00ff;\">\"Gain\"<\/span>,gainValues{i});\r\n    <span style=\"color: #0000ff;\">end<\/span>\r\n<span style=\"color: #0000ff;\">end\r\n<\/span><\/code><\/pre>\n<p>\u307e\u305a\u00a0<a href=\"https:\/\/jp.mathworks.com\/help\/simulink\/slref\/find_system.html\">find_system<\/a>\u00a0\u95a2\u6570\u3067 Gain \u30d6\u30ed\u30c3\u30af\u3092\u691c\u7d22\u3057, <a href=\"https:\/\/jp.mathworks.com\/help\/simulink\/slref\/get_param.html\">get_param<\/a> \u95a2\u6570\u3067\u5024\u3092\u53d6\u5f97, <a href=\"https:\/\/jp.mathworks.com\/help\/matlab\/ref\/inputdlg.html\">inputdlg<\/a> \u95a2\u6570\u3067\u30e6\u30fc\u30b6\u30fc\u304c\u5024\u3092\u5165\u529b\u3059\u308b\u305f\u3081\u306e\u30c0\u30a4\u30a2\u30ed\u30b0\u30a6\u30a3\u30f3\u30c9\u30a6\u3092\u4f5c\u6210\u3057\u3001set_param \u95a2\u6570\u3067\u5165\u529b\u3055\u308c\u305f\u5024\u3092\u30d6\u30ed\u30c3\u30af\u306b\u8a2d\u5b9a\u3059\u308b\u3001\u3068\u3044\u3046\u3088\u3046\u306a\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002\u5404\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u306f <a href=\"https:\/\/blogs.mathworks.com\/japan-community\/2020\/02\/19\/control-simulink-from-matlab-with-simulink-api\/?from=jp&amp;doing_wp_cron=1639925713.0355079174041748046875\">Simulink API \u306e\u8a18\u4e8b<\/a>\u3084\u30ea\u30f3\u30af\u5148\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u3054\u78ba\u8a8d\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u305d\u308c\u3067\u306f\u3053\u306e\u30a2\u30af\u30b7\u30e7\u30f3\u3092 testTab.json \u30d5\u30a1\u30a4\u30eb\u306e\u65b9\u3067\u6307\u5b9a\u3057\u3001\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u304b\u3089\u547c\u3073\u51fa\u305b\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre>testTab.json<code>\"type\": <span style=\"color: #ff00ff;\">\"Column\"<\/span>,\r\n\"children\": [\r\n    {\r\n        \"type\": <span style=\"color: #ff00ff;\">\"PushButton\"<\/span>,\r\n        \"action\": <span style=\"color: #ff00ff;\">\"openModelAction\"<\/span>\r\n    },\r\n    {\r\n        \"type\": <span style=\"color: #ff00ff;\">\"PushButton\"<\/span>,\r\n        \"action\": <span style=\"color: #ff00ff;\">\"openModelConfigParamAction\"<\/span>\r\n    },\r\n    {\r\n        \"type\": <span style=\"color: #ff00ff;\">\"PushButton\"<\/span>,\r\n        \"action\": <span style=\"color: #ff00ff;\">\"setGains\"<\/span>\r\n    }\r\n]\r\n\u00a0<\/code><\/pre>\n<p>\u30b9\u30af\u30ea\u30d7\u30c8\u540d\u3067\u306f\u306a\u304f\u3001id \u3067\u8a2d\u5b9a\u3057\u305f &#8220;setGains&#8221; \u3092\u6307\u5b9a\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3053\u3068\u306b\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\u3002\u305d\u308c\u3067\u306f\u00a0slReloadToolstripConfig \u95a2\u6570\u3092\u5b9f\u884c\u3057\u3066\u5909\u66f4\u3092\u9069\u7528\u3057\u3001\u8a66\u904b\u8ee2\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1374\" height=\"684\" class=\"alignnone size-full wp-image-4777\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/setGains.png\" alt=\"\" \/><\/p>\n<p>setGains \u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\u30e2\u30c7\u30eb\u4e0a\u306e3\u3064\u306e Gain \u30d6\u30ed\u30c3\u30af\u306e\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u30a6\u30a3\u30f3\u30c9\u30a6\u304c\u958b\u304d\u307e\u3057\u305f\u3002\u5024\u3092\u5909\u66f4\u3057\u3066 OK \u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u2026\u2026<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1374\" height=\"684\" class=\"alignnone size-full wp-image-4786\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/changeValues-1.png\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"1374\" height=\"684\" class=\"alignnone size-full wp-image-4783\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/result.png\" alt=\"\" \/><\/p>\n<p>Gain \u30d6\u30ed\u30c3\u30af\u306e\u5024\u304c\u5165\u529b\u3057\u305f\u5024\u306b\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\uff01<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\u3001Simulink API \u3092\u4f7f\u3063\u3066\u30e2\u30c7\u30eb\u3092\u7de8\u96c6\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7528\u610f\u3057\u3066\u304a\u3051\u3070\u3001\u81ea\u4f5c\u3057\u305f\u30bf\u30d6\u304b\u3089\u30ef\u30f3\u30af\u30ea\u30c3\u30af\u3067\u305d\u308c\u3092\u5b9f\u884c\u3067\u304d\u3061\u3083\u3046\u3093\u3067\u3059\u3002\u3053\u308c\u306f\u4fbf\u5229\uff01<\/p>\n<h1><span style=\"color: #ff6600;\">3. \u305d\u306e\u4ed6\u306e\u6a5f\u80fd\u306e\u7d39\u4ecb<\/span><\/h1>\n<p>\u3053\u3053\u307e\u3067\u3067\u7d50\u69cb\u5206\u91cf\u304c\u591a\u304f\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u3001\u305d\u306e\u4ed6\u306e\u6a5f\u80fd\u306b\u3064\u3044\u3066\u306f\u307e\u3068\u3081\u3066\u7c21\u5358\u306b\u7d39\u4ecb\u3057\u307e\u3059\u3002\u8a73\u3057\u3044\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u306f<a href=\"https:\/\/jp.mathworks.com\/help\/releases\/R2021b\/simulink\/ug\/create-custom-simulink-toolstrip-tabs.html\">\u3053\u3061\u3089\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2><span style=\"color: #ff6600;\">3.1 \u30a2\u30a4\u30b3\u30f3\u306e\u6307\u5b9a<\/span><\/h2>\n<p>\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u5b9a\u7fa9\u3057\u305f ***_actions.json \u30d5\u30a1\u30a4\u30eb\u3067\u306f\u3001\u30a2\u30a4\u30b3\u30f3\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002\u958b\u767a\u8005\u30e2\u30fc\u30c9\u3067\u78ba\u8a8d\u3057\u305f\u30a2\u30a4\u30b3\u30f3\u540d\u3001\u307e\u305f\u306f\u81ea\u4f5c\u3057\u305f\u30a2\u30a4\u30b3\u30f3\u306e\u753b\u50cf\uff0816 x 16, 24 x 24\uff09\u3092\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u306b\u8868\u793a\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" width=\"140\" height=\"139\" class=\"alignnone size-full wp-image-4792\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/icon.png\" alt=\"\" \/><\/p>\n<h2><span style=\"color: #ff6600;\">3.2 \u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30e1\u30cb\u30e5\u30fc\u306e\u5b9a\u7fa9<\/span><\/h2>\n<p><span style=\"color: #000000;\">\u3053\u306e\u8a18\u4e8b\u3067\u306f \u30d7\u30c3\u30b7\u30e5\u30dc\u30bf\u30f3\u306e\u4f5c\u308a\u65b9\u3092\u8aac\u660e\u3057\u307e\u3057\u305f\u304c\u3001\u30c9\u30ed\u30c3\u30d7\u30c0\u30a6\u30f3\u30e1\u30cb\u30e5\u30fc\u306e\u5834\u5408\u306f\u3082\u3046\u5c11\u3057\u8907\u96d1\u3067\u3059\u3002\u30e1\u30cb\u30e5\u30fc\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3068\u304d\u306b\u8868\u793a\u3055\u308c\u308b Pop-Up List \u3092 ***_popups.json \u30d5\u30a1\u30a4\u30eb\u3067\u5b9a\u7fa9\u3057\u3001\u5404\u9805\u76ee\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3068\u304d\u306b\u5b9f\u884c\u3055\u308c\u308b\u30a2\u30af\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n<h2><span style=\"color: #ff6600;\">3.3 \u81ea\u4f5c\u30bf\u30d6\u306e\u7121\u52b9\u5316\u3001\u524a\u9664<\/span><\/h2>\n<p>slCreateToolstripComponent \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u73fe\u5728\u306e\u30d5\u30a9\u30eb\u30c0\u304c MATLAB \u306e\u30d1\u30b9\u306b\u8ffd\u52a0\u3055\u308c\u3001\u6b21\u56de\u8d77\u52d5\u4ee5\u964d\u3082\u3053\u306e\u30d1\u30b9\u306f\u8ffd\u52a0\u3055\u308c\u305f\u307e\u307e\u306b\u306a\u308a\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001MATLAB \u3092\u518d\u8d77\u52d5\u3057\u3066\u3082\u4e00\u5ea6\u4f5c\u6210\u3057\u305f\u30bf\u30d6\u306f\u8868\u793a\u3055\u308c\u7d9a\u3051\u307e\u3059\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u8a66\u3057\u306b\u4f5c\u3063\u305f\u3060\u3051\u306e\u30bf\u30d6\u3084\u4e00\u6642\u7684\u306b\u5fc5\u8981\u3060\u3063\u305f\u30bf\u30d6\u306a\u3069\u3001\u5834\u5408\u306b\u3088\u3063\u3066\u306f\u81ea\u4f5c\u3057\u305f\u30bf\u30d6\u3092\u8868\u793a\u3055\u305b\u305f\u304f\u306a\u3044\u3001\u3068\u3044\u3046\u5834\u5408\u3082\u3042\u308b\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u306f\u3001<a href=\"https:\/\/jp.mathworks.com\/help\/releases\/R2021b\/simulink\/slref\/slpersisttoolstripcomponent.html\">slPersistToolstripComponent<\/a> \u3068\u3044\u3046\u95a2\u6570\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u81ea\u4f5c\u30bf\u30d6\u3092\u30d1\u30b9\u306b\u6b8b\u3057\u305f\u307e\u307e\u306b\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u5236\u5fa1\u3067\u304d\u307e\u3059\u3002\u306a\u304a\u3001\u3082\u3057\u4f5c\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3082\u542b\u3081\u3066\u81ea\u4f5c\u3057\u305f\u30bf\u30d6\u3092\u5b8c\u5168\u306b\u524a\u9664\u3057\u305f\u3044\u5834\u5408\u306f\u3001<a href=\"https:\/\/jp.mathworks.com\/help\/releases\/R2021b\/simulink\/slref\/sldestroytoolstripcomponent.html\">slDestroyToolstripComponent<\/a> \u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<h1><span style=\"color: #ff6600;\">4. \u30c7\u30e2\u30e2\u30c7\u30eb\u306e\u3054\u7d39\u4ecb<\/span><\/h1>\n<p>\u5f0a\u793e\u30a8\u30f3\u30b8\u30cb\u30a2\u304c\u4f5c\u6210\u3057\u305f\u3001Simulink \u306e\u30e2\u30c7\u30ea\u30f3\u30b0\u696d\u52d9\u52b9\u7387\u5411\u4e0a\u306e\u305f\u3081\u306e\u30ab\u30b9\u30bf\u30e0\u30bf\u30d6\u306e\u4e00\u4f8b\u304c<a href=\"https:\/\/jp.mathworks.com\/matlabcentral\/fileexchange\/101445-simulink\">\u00a0File Exchange \u306b\u3066\u516c\u958b\u3055\u308c\u3066\u3044\u307e\u3059<\/a>\uff01<\/p>\n<p>2o\u500b\u4ee5\u4e0a\u306e\u30ab\u30b9\u30bf\u30e0\u6a5f\u80fd\u4f8b\u3084\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u30ab\u30b9\u30bf\u30e0\u30bf\u30d6\u3092\u53cd\u6620\u3055\u305b\u308b\u65b9\u6cd5\u306a\u3069\u304c\u7dba\u9e97\u306b\u307e\u3068\u307e\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u3069\u3093\u306a\u6a5f\u80fd\u304c\u4f5c\u308c\u308b\u304b\u77e5\u308a\u305f\u3044\u65b9\u3084\u3001\u958b\u767a\u306e\u8db3\u639b\u304b\u308a\u3068\u3059\u308b\u305f\u3081\u306e\u4f8b\u984c\u30d5\u30a1\u30a4\u30eb\u304c\u6b32\u3057\u3044\u65b9\u306f\u3001\u305c\u3072\u3053\u3061\u3089\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<h1><span style=\"color: #ff6600;\">5. \u307e\u3068\u3081<\/span><\/h1>\n<p>\u4eca\u56de\u306f\u3001R2021b \u3067\u65b0\u305f\u306b\u8ffd\u52a0\u3055\u308c\u305f Simulink \u306e\u30c4\u30fc\u30eb\u30b9\u30c8\u30ea\u30c3\u30d7\u3092\u81ea\u4f5c\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002\u81ea\u4f5c\u6a5f\u80fd\u3092\u958b\u767a\u3057\u3066\u3044\u306a\u3044\u65b9\u3082\u3001\u3088\u304f\u4f7f\u3046\u65e2\u5b58\u6a5f\u80fd\u3092\u307e\u3068\u3081\u3066\u304a\u304f\u3060\u3051\u3067\u3082\u65e5\u3005\u306e\u64cd\u4f5c\u304c\u4e00\u6c17\u306b\u697d\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u7686\u3055\u3093\u3082\u81ea\u5206\u5c02\u7528\u306e Simulink \u3092\u4f5c\u3063\u3066\u3001\u3088\u308a\u52b9\u7387\u7684\u306b\u30e2\u30c7\u30eb\u958b\u767a\u3092\u884c\u3063\u3066\u307f\u307e\u305b\u3093\u304b\uff1f<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/japan-community\/files\/2021\/12\/toolstrip.png\" onError=\"this.style.display ='none';\" \/><\/div>\n<p>\u7686\u3055\u3093\u3053\u3093\u306b\u3061\u306f\u3002\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u9060\u85e4\u3068\u7533\u3057\u307e\u3059\u3002<br \/>\n\u3053\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001\u300cSimulink \u3068 MATLAB \u3092\u3064\u306a\u3050\u300d\u3092\u30b3\u30f3\u30bb\u30d7\u30c8\u3068\u3057\u3066\u3001\u4e3b\u306b\u6280\u8853\u7684\u306a\u5185\u5bb9\u306b\u3064\u3044\u3066\u66f8\u3044\u3066\u304a\u308a\u307e\u3059\u3002<br \/>\n\u3055\u3066\u30012021\u5e74\u3082\u3082\u3046\u6b8b\u3059\u3068\u3053\u308d\u308f\u305a\u304b\u3068\u306a\u308a\u307e\u3057\u305f\u3002\u4eca\u5e74\u3082\u30b3\u30ed\u30ca\u798d\u306e\u5f71\u97ff\u3067\u69d8\u3005\u306a\u30a4\u30d9\u30f3\u30c8\u304c\u30aa\u30f3\u30e9\u30a4\u30f3\u3067\u306e\u958b\u50ac\u3068\u306a\u308a\u3001MATLAB&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/japan-community\/2021\/12\/23\/customtoolstrip\/\">read more >><\/a><\/p>\n","protected":false},"author":169,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[65,61],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/japan-community\/wp-json\/wp\/v2\/posts\/4696"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/japan-community\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/japan-community\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/japan-community\/wp-json\/wp\/v2\/users\/169"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/japan-community\/wp-json\/wp\/v2\/comments?post=4696"}],"version-history":[{"count":65,"href":"https:\/\/blogs.mathworks.com\/japan-community\/wp-json\/wp\/v2\/posts\/4696\/revisions"}],"predecessor-version":[{"id":5080,"href":"https:\/\/blogs.mathworks.com\/japan-community\/wp-json\/wp\/v2\/posts\/4696\/revisions\/5080"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/japan-community\/wp-json\/wp\/v2\/media?parent=4696"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/japan-community\/wp-json\/wp\/v2\/categories?post=4696"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/japan-community\/wp-json\/wp\/v2\/tags?post=4696"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}