{"id":402,"date":"2018-05-30T08:13:16","date_gmt":"2018-05-30T15:13:16","guid":{"rendered":"https:\/\/blogs.plm.automation.siemens.com\/t5\/Polarion-Blog\/Further-customization-of-the-Polarion-connector-for-Simulink\/ba-p\/495857"},"modified":"2026-03-26T05:27:59","modified_gmt":"2026-03-26T09:27:59","slug":"further-customization-of-the-polarion-connector-for-simulink","status":"publish","type":"post","link":"https:\/\/blogs.sw.siemens.com\/polarion\/further-customization-of-the-polarion-connector-for-simulink\/","title":{"rendered":"Further customization of the Polarion connector for Simulink."},"content":{"rendered":"<p><P>Several weeks ago I discussed some of the new features we added to the latest release of the Polarion connector for Simulink. In that new release, we allowed users to export and link Simulink artifacts to different Polarion servers and projects &#8220;on the fly&#8221;. This allowed users to maintain a single Simulink model and link or export those artifacts to multiple Polarion projects. Very handy indeed!<\/P><\/p>\n<p><P>For some of the more astute amongst you, I dropped&nbsp;a small &#8220;easter egg&#8221; in the last blog post. It was in Figure 5, the last screenshot of the article.<\/P><\/p>\n<p><P><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-3.jpg\" alt=\"screen4.JPG\" title=\"screen4.JPG\" \/><\/span><\/P><\/p>\n<p><P>If you notice, you will see in the description field of the Simulink link editor, not only are we showing the Polarion work-item ID, but also the title of the ID. By default, the connector will only show the ID. This was intentionally done because there are times when you might not want to publish the full title of the work-item. Perhaps the information has security classification, and you don&#8217;t want this information published outside of Polarion.<\/P><\/p>\n<p><P>However, in the case where you do &#8230; how can you change this setting in the connector to publish the work-item title? Well &#8230; its back to the &#8220;extension.m&#8221; configuration file we discussed in the last blog post. Do you remember it? We need to make a few changes. Lets see how its done &#8230;.<\/P><\/p>\n<p><P>If you goto the <STRONG>saveRequired, TargetRmiLink function<\/STRONG>, we are going to change the default setting so we update the RMI description field with the full Polarion work item-ID. Look for the comment <STRONG>%replace default title<\/STRONG> <STRONG>in the Link<\/STRONG> <STRONG>Editor<\/STRONG>, in the code snippet below. Add the two additional lines to your extension.m file and restart Simulink. Next time you create a link to Polarion, you will see the full title in the RMI description field! Its as easy as that.<\/P><\/p>\n<p><PRE>function [saveRequired, targetRmiLink] = updatePolarionFields (rmiLink, openNewSession)<br \/>\n    saveRequired = false;<br \/>\n    targetRmiLink = rmiLink;<\/p>\n<p>    fullURL = PolarionFunctions.getURLfromRMILink(rmiLink);<\/p>\n<p>    % Make sure it&#8217;s really Polarion link<br \/>\n    if regexpi(fullURL, &#8216;https?:\/\/.*\/polarion\/#\/.*\/workitem?id=.*&#8217;) == 1<br \/>\n        serverURL = PolarionFunctions.getServerURL(fullURL);<br \/>\n        if ~openNewSession || PolarionFunctions.login(serverURL)<br \/>\n            uri = PolarionFunctions.getURI(fullURL);<br \/>\n            keywords = extractPolarionFields(uri, serverURL);<br \/>\n            if ~isequal(rmiLink.keywords, keywords)<br \/>\n                % Replace default title in the Link Editor<br \/>\n                workitem = PolarionFunctions.getWorkItemByUri(uri, serverURL);<br \/>\n                rmiLink.description = char(sprintf(&#8216;Polarion: %s &#8211; %s&#8217;, workitem.getId(), workitem.getTitle()));<br \/>\n                % &#8212; end of title<br \/>\n                rmiLink.keywords = keywords;<br \/>\n                saveRequired = true;<br \/>\n                targetRmiLink = rmiLink;<br \/>\n                fprintf(&#8216;Result keywords: %sn&#8217;,keywords);<br \/>\n            end<br \/>\n        end<br \/>\n        if openNewSession<br \/>\n            PolarionFunctions.logout(serverURL);<br \/>\n        end<br \/>\n    end<br \/>\nend<\/PRE><\/p>\n<p><P>In a earlier blog article I also explained how we now write to the RMI user tag field. This is useful for publishing certain custom work-item fields to Simulink. The default settings actually writes the Polarion work item title to the user tag. For the reasons discussed earlier, you may decide you don&#8217;t want to write the title here. If thats the case, simply remove the &#8220;title&#8221; from this part of the code in the extensions file.<\/P><\/p>\n<p><PRE>        function fieldNames = polarionWIFieldList<br \/>\n            fieldNames = {&#8216;id&#8217;; &#8216;title&#8217;; &#8216;type&#8217;; &#8216;severity&#8217;};<br \/>\n        end<\/PRE><\/p>\n<p><P>For more information on publishing to the user tag field, take a look at more earlier blog post <a href=\"https:\/\/community.plm.automation.siemens.com\/t5\/Polarion-Blog\/Extensions-update-Polarion-Connector-for-Mathworks-Simulink\/ba-p\/424085\" target=\"_self\" rel=\"nofollow noopener noreferrer\">here<\/A><\/P><\/p>\n<p><P>Well, I hope you&#8217;ve enjoyed these series of short articles that talk about customizing the Polarion connector for Simulink. I&#8217;ll be back again another time with some more tips and tricks for you.<\/P><\/p>\n<p><P style=\"margin: 0px; text-align: left; color: rgb(82, 86, 88); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: SiemensSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-weight: 300; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;\">You can download the latest version of the Simulink connector for Polarion<SPAN>&nbsp;<\/SPAN><a style=\"color: rgb(2, 186, 249); font-weight: bold; text-decoration: underline; box-sizing: border-box; background-color: transparent;\" href=\"http:\/\/extensions.polarion.com\/extensions\/173-polarion-connector-for-simulink\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">here<\/A><SPAN>&nbsp;<\/SPAN>from the extension portal. If you&#8217;re new to Polarion, why not try it out for yourself with a free evaluation? For more information, please visit<SPAN>&nbsp;<\/SPAN><a style=\"color: rgb(2, 186, 249); font-weight: bold; text-decoration: underline; box-sizing: border-box; background-color: transparent;\" href=\"https:\/\/polarion.plm.automation.siemens.com\/products\/alm\/demo\" target=\"_blank\" rel=\"nofollow noopener noreferrer\"><STRONG style=\"font-weight: bold; box-sizing: border-box;\">https:\/\/polarion.plm.automation.siemens.com\/products\/alm\/demo<\/STRONG><\/A><\/P><br \/>\n<P style=\"margin: 0px; text-align: left; color: rgb(82, 86, 88); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: SiemensSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-weight: 300; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;\">&nbsp;<\/P><br \/>\n<P style=\"margin: 0px; text-align: left; color: rgb(82, 86, 88); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: SiemensSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-weight: 300; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;\"><STRONG style=\"font-weight: bold; box-sizing: border-box;\">Happy customizing!<\/STRONG><\/P><br \/>\n<P style=\"margin: 0px; text-align: left; color: rgb(82, 86, 88); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: SiemensSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-weight: 300; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;\">&nbsp;<\/P><br \/>\n<P style=\"margin: 0px; text-align: left; color: rgb(82, 86, 88); text-transform: none; text-indent: 0px; letter-spacing: normal; font-family: SiemensSans, Arial, sans-serif; font-size: 16px; font-style: normal; font-weight: 300; word-spacing: 0px; white-space: normal; box-sizing: border-box; orphans: 2; widows: 2; background-color: rgb(255, 255, 255); font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;\">AW<\/P><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Several weeks ago I discussed some of the new features we added to the latest release of the Polarion connector for Simulink. In that new release, we allowed users to export and link Simulink artifac&#8230;<\/p>\n","protected":false},"author":28546,"featured_media":403,"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-402","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-2.jpg","_links":{"self":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/402","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=402"}],"version-history":[{"count":2,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/402\/revisions"}],"predecessor-version":[{"id":407,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/402\/revisions\/407"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/media\/403"}],"wp:attachment":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/media?parent=402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/categories?post=402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/tags?post=402"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/industry?post=402"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/product?post=402"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/coauthors?post=402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}