{"id":558,"date":"2017-11-26T15:19:18","date_gmt":"2017-11-26T15:19:18","guid":{"rendered":"http:\/\/endrekatona.eu\/tech\/?p=558"},"modified":"2017-11-26T15:28:05","modified_gmt":"2017-11-26T15:28:05","slug":"bulk-editing-the-image-names-in-opm","status":"publish","type":"post","link":"http:\/\/endrekatona.eu\/tech\/2017\/11\/26\/bulk-editing-the-image-names-in-opm\/","title":{"rendered":"Bulk editing the image names in OPM"},"content":{"rendered":"<p>The\u00a0<strong>Bulk edit\u00a0<\/strong>tool is probably the mostly used instrument in OPM, no TOOLBOXer can live without it. Though powerful when it comes to managing image parameters, it still has an unpleasant weakness: image names cannot be edited with it.<\/p>\n<p>We all know those situations when in the middle of the commissioning phase the client comes with some special change requests, like making a global change in the image naming system. Though making these image name changes inside OPM can be only done one by one, there is a way to do quick, bulk edit style changes, if that change can be described with some kind of algorithm.<\/p>\n<p>Let me lead you through this process using the following example:<\/p>\n<p>1. Let&#8217;s suppose you have a substation where many measured values must be monitored. Let&#8217;s name the images of the voltages simply\u00a0<strong>Voltage_I02 &#8211;&gt; Voltage_I14<\/strong>\u00a0and the images of the currents\u00a0<strong>Current_I00\u00a0<\/strong>and\u00a0<strong>Current_I01<\/strong>.<\/p>\n<div id=\"attachment_562\" style=\"width: 761px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/main_pic.png\"><img aria-describedby=\"caption-attachment-562\" loading=\"lazy\" class=\"wp-image-562 size-full\" src=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/main_pic.png\" alt=\"\" width=\"751\" height=\"451\" srcset=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/main_pic.png 751w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/main_pic-300x180.png 300w\" sizes=\"(max-width: 751px) 100vw, 751px\" \/><\/a><p id=\"caption-attachment-562\" class=\"wp-caption-text\">The initial data model in OPM<\/p><\/div>\n<p>2. Now, let&#8217;s suppose that at the end of the engineering phase, the client comes to you, and asks, that you make a global change in the image naming system. For example, he wants that the images are named in German not in English. Instead of doing this change one by one (in the actual example it wouldn&#8217;t take so much time, but this is not the case if you have thousands of images), let&#8217;s export the images, that must be changed, into a CSV file (as a matter of fact OPM will create a semicolon separated values file).<\/p>\n<p>2.1. Select the images and go to the bulk editing.<\/p>\n<div id=\"attachment_584\" style=\"width: 1566px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/enter_bulk_edit.png\"><img aria-describedby=\"caption-attachment-584\" loading=\"lazy\" class=\"wp-image-584 size-full\" src=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/enter_bulk_edit.png\" alt=\"\" width=\"1556\" height=\"835\" srcset=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/enter_bulk_edit.png 1556w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/enter_bulk_edit-300x161.png 300w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/enter_bulk_edit-768x412.png 768w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/enter_bulk_edit-1024x550.png 1024w\" sizes=\"(max-width: 1556px) 100vw, 1556px\" \/><\/a><p id=\"caption-attachment-584\" class=\"wp-caption-text\">Select the images to be changed, and enter the bulk edit tool<\/p><\/div>\n<p>2.2. Select one parameter to be &#8220;edited&#8221;. It is not important, which parameter you take, as this is only necessary to open the bulk editing.<\/p>\n<div id=\"attachment_586\" style=\"width: 1044px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/select_one_parameter.png\"><img aria-describedby=\"caption-attachment-586\" loading=\"lazy\" class=\"wp-image-586 size-full\" src=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/select_one_parameter.png\" alt=\"\" width=\"1034\" height=\"620\" srcset=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/select_one_parameter.png 1034w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/select_one_parameter-300x180.png 300w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/select_one_parameter-768x461.png 768w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/select_one_parameter-1024x614.png 1024w\" sizes=\"(max-width: 1034px) 100vw, 1034px\" \/><\/a><p id=\"caption-attachment-586\" class=\"wp-caption-text\">Select one parameter to be &#8220;edited&#8221; (e.g. Lk_Prep)<\/p><\/div>\n<p>2.3. Export the list of images into a CSV file using the export function of the Source Data Management.<\/p>\n<div id=\"attachment_587\" style=\"width: 1220px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_export.png\"><img aria-describedby=\"caption-attachment-587\" loading=\"lazy\" class=\"wp-image-587 size-full\" src=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_export.png\" alt=\"\" width=\"1210\" height=\"766\" srcset=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_export.png 1210w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_export-300x190.png 300w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_export-768x486.png 768w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_export-1024x648.png 1024w\" sizes=\"(max-width: 1210px) 100vw, 1210px\" \/><\/a><p id=\"caption-attachment-587\" class=\"wp-caption-text\">Use the Source data management to export the list into a CSV file<\/p><\/div>\n<p>3. Open the newly created .CSV file with some kind of table editor (e.g. Microsoft Excel).<\/p>\n<p>3.1. Delete the unnecessary columns. The only columns that should remain in the table are the columns FUNC, the names of the defined levels, and the columns NEWNAME and DEFAULT.<\/p>\n<div id=\"attachment_605\" style=\"width: 1107px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_1.png\"><img aria-describedby=\"caption-attachment-605\" loading=\"lazy\" class=\"wp-image-605 size-full\" src=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_1.png\" alt=\"\" width=\"1097\" height=\"644\" srcset=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_1.png 1097w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_1-300x176.png 300w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_1-768x451.png 768w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_1-1024x601.png 1024w\" sizes=\"(max-width: 1097px) 100vw, 1097px\" \/><\/a><p id=\"caption-attachment-605\" class=\"wp-caption-text\">Delete the unnecessary columns<\/p><\/div>\n<p>3.2 Clear all content from the table after the column you want to change. E.g.: if you want to change the image names at\u00a0<strong>SIG\u00a0<\/strong>level, you should clear the content of the\u00a0<strong>LNK\u00a0<\/strong>column.<\/p>\n<div id=\"attachment_608\" style=\"width: 1264px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_2.png\"><img aria-describedby=\"caption-attachment-608\" loading=\"lazy\" class=\"wp-image-608 size-full\" src=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_2.png\" alt=\"\" width=\"1254\" height=\"809\" srcset=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_2.png 1254w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_2-300x194.png 300w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_2-768x495.png 768w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_2-1024x661.png 1024w\" sizes=\"(max-width: 1254px) 100vw, 1254px\" \/><\/a><p id=\"caption-attachment-608\" class=\"wp-caption-text\">Clear the content (excep the headers) of the table after the column you want to change<\/p><\/div>\n<p>3.3. Generate the new image names in the column NEWNAME. In this particular example I have copy-pasted the old names into the NEWNAME column and replaced the text &#8220;Voltage&#8221; with &#8220;Spannung&#8221; and &#8220;Current&#8221; with &#8220;Strom&#8221;.<\/p>\n<div id=\"attachment_622\" style=\"width: 966px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_3.png\"><img aria-describedby=\"caption-attachment-622\" loading=\"lazy\" class=\"wp-image-622 size-full\" src=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_3.png\" alt=\"\" width=\"956\" height=\"607\" srcset=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_3.png 956w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_3-300x190.png 300w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/prepare_table_3-768x488.png 768w\" sizes=\"(max-width: 956px) 100vw, 956px\" \/><\/a><p id=\"caption-attachment-622\" class=\"wp-caption-text\">Type in the new names into the NEWNAME column. (use some formula to generate them)<\/p><\/div>\n<p>3.4 Save this new document as a CSV file. Remember: OPM works with semicolon separated values, so you will have to change manually the commas with semicolons.<\/p>\n<div id=\"attachment_623\" style=\"width: 879px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/Change_comma_with_semicolon.png\"><img aria-describedby=\"caption-attachment-623\" loading=\"lazy\" class=\"wp-image-623 size-full\" src=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/Change_comma_with_semicolon.png\" alt=\"\" width=\"869\" height=\"406\" srcset=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/Change_comma_with_semicolon.png 869w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/Change_comma_with_semicolon-300x140.png 300w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/Change_comma_with_semicolon-768x359.png 768w\" sizes=\"(max-width: 869px) 100vw, 869px\" \/><\/a><p id=\"caption-attachment-623\" class=\"wp-caption-text\">Change commas with semicolons<\/p><\/div>\n<p>4. Now you are ready to import your source data into the OPM.<\/p>\n<p>4.1. Simply choose\u00a0<em>Tools&#8211;&gt;Source data management&#8211;&gt;Import\u00a0<\/em>from the menu.<\/p>\n<div id=\"attachment_625\" style=\"width: 915px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_import.png\"><img aria-describedby=\"caption-attachment-625\" loading=\"lazy\" class=\"wp-image-625 size-full\" src=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_import.png\" alt=\"\" width=\"905\" height=\"422\" srcset=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_import.png 905w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_import-300x140.png 300w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_import-768x358.png 768w\" sizes=\"(max-width: 905px) 100vw, 905px\" \/><\/a><p id=\"caption-attachment-625\" class=\"wp-caption-text\">Import your new source data<\/p><\/div>\n<p>4.2. Check the checkbox to get a change report, before your OPM data-model is changed.<\/p>\n<div id=\"attachment_626\" style=\"width: 470px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_import_settings.png\"><img aria-describedby=\"caption-attachment-626\" loading=\"lazy\" class=\"wp-image-626 size-full\" src=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_import_settings.png\" alt=\"\" width=\"460\" height=\"468\" srcset=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_import_settings.png 460w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/source_data_management_import_settings-295x300.png 295w\" sizes=\"(max-width: 460px) 100vw, 460px\" \/><\/a><p id=\"caption-attachment-626\" class=\"wp-caption-text\">A change-report can be of great help<\/p><\/div>\n<p>4.3. Hit the import button, and check your change report. Only accept it, if it contains exactly those changes you wanted. Be careful, you may damage the result of several week&#8217;s work.<\/p>\n<div id=\"attachment_627\" style=\"width: 897px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/change_report.png\"><img aria-describedby=\"caption-attachment-627\" loading=\"lazy\" class=\"size-full wp-image-627\" src=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/change_report.png\" alt=\"\" width=\"887\" height=\"538\" srcset=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/change_report.png 887w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/change_report-300x182.png 300w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/change_report-768x466.png 768w\" sizes=\"(max-width: 887px) 100vw, 887px\" \/><\/a><p id=\"caption-attachment-627\" class=\"wp-caption-text\">Check the change-report carefully<\/p><\/div>\n<p>4.4. If everything seems to be all right, hit the\u00a0<em>Import\u00a0<\/em>button&#8230; and there you have your renamed images.<\/p>\n<div id=\"attachment_629\" style=\"width: 708px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/name_change_complete.png\"><img aria-describedby=\"caption-attachment-629\" loading=\"lazy\" class=\"size-full wp-image-629\" src=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/name_change_complete.png\" alt=\"\" width=\"698\" height=\"424\" srcset=\"http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/name_change_complete.png 698w, http:\/\/endrekatona.eu\/tech\/wp-content\/uploads\/2017\/11\/name_change_complete-300x182.png 300w\" sizes=\"(max-width: 698px) 100vw, 698px\" \/><\/a><p id=\"caption-attachment-629\" class=\"wp-caption-text\">Name changing procedure complete<\/p><\/div>\n <script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- Tech.endrekatona.eu postokban -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7338992055785819\"\r\n     data-ad-slot=\"2603531820\"\r\n     data-ad-format=\"auto\"><\/ins>\r\n<script>\r\n(adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>The\u00a0Bulk edit\u00a0tool is probably the mostly used instrument in OPM, no TOOLBOXer can live without it. Though powerful when it comes to managing image parameters, it still has an unpleasant weakness: image names cannot be edited with it. We all know those situations when in the middle of the commissioning phase the client comes with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":562,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[8],"tags":[23,25,19,24,10],"_links":{"self":[{"href":"http:\/\/endrekatona.eu\/tech\/wp-json\/wp\/v2\/posts\/558"}],"collection":[{"href":"http:\/\/endrekatona.eu\/tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/endrekatona.eu\/tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/endrekatona.eu\/tech\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/endrekatona.eu\/tech\/wp-json\/wp\/v2\/comments?post=558"}],"version-history":[{"count":60,"href":"http:\/\/endrekatona.eu\/tech\/wp-json\/wp\/v2\/posts\/558\/revisions"}],"predecessor-version":[{"id":632,"href":"http:\/\/endrekatona.eu\/tech\/wp-json\/wp\/v2\/posts\/558\/revisions\/632"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/endrekatona.eu\/tech\/wp-json\/wp\/v2\/media\/562"}],"wp:attachment":[{"href":"http:\/\/endrekatona.eu\/tech\/wp-json\/wp\/v2\/media?parent=558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/endrekatona.eu\/tech\/wp-json\/wp\/v2\/categories?post=558"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/endrekatona.eu\/tech\/wp-json\/wp\/v2\/tags?post=558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}