{"id":352,"date":"2018-05-14T14:58:11","date_gmt":"2018-05-14T21:58:11","guid":{"rendered":"https:\/\/blogs.plm.automation.siemens.com\/t5\/Polarion-Blog\/Mathworks-Simulink-Connector-Update\/ba-p\/491663"},"modified":"2026-03-26T05:27:48","modified_gmt":"2026-03-26T09:27:48","slug":"mathworks-simulink-connector-update","status":"publish","type":"post","link":"https:\/\/blogs.sw.siemens.com\/polarion\/mathworks-simulink-connector-update\/","title":{"rendered":"Mathworks Simulink Connector Update"},"content":{"rendered":"<p><P>We recently updated the Mathworks Simulink Connector for Polarion to <a href=\"http:\/\/extensions.polarion.com\/extensions\/173-polarion-connector-for-simulink\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">version 2.2<\/A>. This version contains some new and exciting capabilities that I wanted to share with you.<\/P><\/p>\n<p><P>Last year, we introduced a new concept to the connector that allowed anyone to extend out its functionality. We have used that functionality ourselves to introduce a number of new features in version 2.2.<\/P><\/p>\n<p><P>These being:<\/P><br \/>\n<OL><br \/>\n<LI>An ability to either link or publish the Simulink model artifacts to <STRONG>multiple Polarion servers<\/STRONG> on the fly<\/LI><br \/>\n<LI>An ability to either link or publish the Simulink model artifacts to <STRONG>multiple Polarion projects<\/STRONG> on the fly.<\/LI><br \/>\n<LI>An ability to publish the Simulink model artifacts to <STRONG>different Polarion Work-items<\/STRONG> on the fly.<\/LI><br \/>\n<LI>Specify a <STRONG>different Polarion search query<\/STRONG> (used when linking) on the fly.<\/LI><br \/>\n<\/OL><br \/>\n<P>&nbsp;<span class=\"lia-inline-image-display-wrapper lia-image-align-inline\" style=\"width: 999px;\"><img decoding=\"async\" src=\"http:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/4\/2019\/09\/Capture2-1.jpg\" alt=\"Capture2.JPG\" title=\"Capture2.JPG\" \/><\/span><\/P><br \/>\n<P>&nbsp;Figure 1: New menu options available in Simulink<\/P><\/p>\n<p><P>This is very helpful, as it allows a Simulink user to support multiple Polarion projects from the same Mathwork Simulink model. One can quickly create links and publish models on the fly, rather than having to reconfigure the Polarion settings window for each Polarion project.<\/P><\/p>\n<p><P>Before we see how you set up these different configurations, let me start by saying that the Polarion connector settings inside Simulink remain unchanged. As a refresher, here is where we specify the <STRONG><EM>default<\/EM><\/STRONG> Polarion server, project, work-item creation type and work-item search query. In addition, we also specify the username and password for the Polarion server we have defined. We will refer to these as the default settings.<\/P><\/p>\n<p><P>&nbsp;<span class=\"lia-inline-image-display-wrapper lia-image-align-inline\" style=\"width: 605px;\"><img decoding=\"async\" src=\"http:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/4\/2019\/09\/Capture-1.jpg\" alt=\"Capture.JPG\" title=\"Capture.JPG\" \/><\/span><\/P><br \/>\n<P>&nbsp;Figure 2: Default settings window for the Polarion connector<\/P><\/p>\n<p><P>As you can see in Figure 1, the Simulink user now has multiple options available to them for linking Simulink model artifacts to existing Polarion work-items. There is the option to use the <STRONG>default<\/STRONG> settings. Those that are found in the Polarion settings window (see figure 2), or they have the option to link to 3 other \u201cconfigurations\u201d.<\/P><\/p>\n<p><P>&nbsp;<span class=\"lia-inline-image-display-wrapper lia-image-align-inline\" style=\"width: 494px;\"><img decoding=\"async\" src=\"http:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/4\/2019\/09\/Capture6-1.jpg\" alt=\"Capture6.JPG\" title=\"Capture6.JPG\" \/><\/span><\/P><br \/>\n<P>&nbsp;Figure 3: New menu options available to the Simulink user<\/P><\/p>\n<p><P>To define these different menu options, you need to open the \u201cextension.m\u201d file, located in the Polarion Simulink connector installation folder, using your favorite text editor. Locate the ProjectsConfigurations function (normally at the start of the file) which defines a menu label, project name, workitem type used creation, search query and server URL.<\/P><\/p>\n<p><P><span class=\"lia-inline-image-display-wrapper lia-image-align-inline\" style=\"width: 999px;\"><img decoding=\"async\" src=\"http:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/4\/2019\/09\/Capture1-1.jpg\" alt=\"Capture1.JPG\" title=\"Capture1.JPG\" \/><\/span><\/P><br \/>\n<P>Figure 4: Snapshot of extension.m<\/P><\/p>\n<p><P>In the example above, I\u2019ve used the following definition.<\/P><\/p>\n<p><PRE>function result = ProjectsConfiguration<\/p>\n<p>result = {<\/p>\n<p>   % Label %ProjectID %WIType for creation %Default Query   %Base Server URL (default if not specified)<\/p>\n<p>        &#8216;Simulink_Demo_2(localhost)\/SimulinkObject2\/System Requirement&#8217;, &#8216;Simulink_Demo_2&#8217;, &#8216;simulinkObject2&#8217;, &#8216;type:systemRequirement&#8217;, &#8221;;<\/p>\n<p>        &#8216;Simulink_Demo_3(localhost)\/SimulinkObject3\/Task&#8217;, &#8216;Simulink_Demo_3&#8217;, &#8216;simulinkObject3&#8217;, &#8216;type:task&#8217;, &#8221;;<\/p>\n<p>         &#8216;MyPolarionWhitfield(my_polarion_server.com)\/Task\/Task&#8217;, &#8216;MyPolarionWhitfield&#8217;, &#8216;task&#8217;, &#8216;type:task&#8217;, &#8216;https:\/\/my_polarion_server.com&#8217;;<\/p>\n<p>       };<\/p>\n<p>end<br \/>\n<\/PRE><\/p>\n<p><P>If we take the first definition as an example:<\/P><\/p>\n<p><P><STRONG>&#8216;Simulink_Demo_2(localhost)\/SimulinkObject2\/System Requirement&#8217;<\/STRONG> is the label that will be used in the Polarion menu name.<\/P><br \/>\n<P><STRONG>&#8216;Simulink_Demo_2&#8217;<\/STRONG> is the polarion project ID used for linking or publishing<\/P><br \/>\n<P><STRONG>&#8216;simulinkObject2&#8217;<\/STRONG> is the work-item type used for publishing<\/P><br \/>\n<P><STRONG>&#8216;type:systemRequirement&#8217;<\/STRONG> is the Work-item used for query search<\/P><br \/>\n<P>&#8216; &#8216; = we will use default Polarion server URL specified in the connector settings window (see Figure 2).<\/P><\/p>\n<p><P>You can specify as many combinations of these configurations as you wish in the extension.m file. I would strongly recommend you use descriptive names for your labels however. This will then prevent accidental publishing or linking to Polarion. Note that for each project and Polarion server you specify, the connector will use you\u2019re default user name and password. Therefore, you will need to make sure you have the correct logins for all the Polarion servers and projects you intent to either publish or link too. In addition the extension.m file can be moved from the default installation folder, however ensure it is properly defined in your Matlab path definition, with appropriate priority.<\/P><\/p>\n<p><P>Simulink supports the ability to link a model artifact to multiple end points. So in the example below (See figure 5), the integrator block has 3 outgoing Polarion links. Two of which, link to two different Polarion projects on the default Polarion server. The third links to a Polarion project on a different server to the default.<\/P><\/p>\n<p><P>&nbsp;<span class=\"lia-inline-image-display-wrapper lia-image-align-inline\" style=\"width: 609px;\"><img decoding=\"async\" src=\"http:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/4\/2019\/09\/screen4-1.jpg\" alt=\"screen4.JPG\" title=\"screen4.JPG\" \/><\/span><\/P><br \/>\n<P>&nbsp;Figure 5: Simulink link editor<\/P><\/p>\n<p><P>That\u2019s it for now, please be sure to check back on this blog in the coming weeks, as I will be providing more tips and tricks on how you can customize the Simulink connector for Polarion even further!<\/P><\/p>\n<p><P>You can download the latest version of the Simulink connector for Polarion <a href=\"http:\/\/extensions.polarion.com\/extensions\/173-polarion-connector-for-simulink\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">here<\/A> from the extension portal which includes these enhancements discussed.<\/P><\/p>\n<p><P>If you&#8217;re new to Polarion, why not try it out for yourself with a free evaluation? For more information, please visit <a href=\"https:\/\/polarion.plm.automation.siemens.com\/products\/alm\/demo\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><STRONG>https:\/\/polarion.plm.automation.siemens.com\/products\/alm\/demo<\/STRONG><\/A><\/P><\/p>\n<p><P><STRONG>Happy customizing!<\/STRONG><\/P><\/p>\n<p><P>AW<\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We recently updated the Mathworks Simulink Connector for Polarion to version 2.2. This version contains some new and exciting capabilities that I wanted to share with you. <\/p>\n<p> Last year, we in&#8230;<\/p>\n","protected":false},"author":28546,"featured_media":368,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spanish_translation":"","french_translation":"","german_translation":"","italian_translation":"","polish_translation":"","japanese_translation":"","chinese_translation":"","footnotes":""},"categories":[1],"tags":[],"industry":[],"product":[],"coauthors":[],"class_list":["post-352","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"featured_image_url":"https:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/4\/2019\/09\/screen4-1.jpg","_links":{"self":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/352","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/users\/28546"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/comments?post=352"}],"version-history":[{"count":6,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/352\/revisions"}],"predecessor-version":[{"id":369,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/352\/revisions\/369"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/media\/368"}],"wp:attachment":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/media?parent=352"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/categories?post=352"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/tags?post=352"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/industry?post=352"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/product?post=352"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/coauthors?post=352"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}