{"id":2231,"date":"2018-02-11T16:44:43","date_gmt":"2018-02-11T16:44:43","guid":{"rendered":"https:\/\/max-drake.cc\/?p=2231"},"modified":"2018-02-17T14:44:28","modified_gmt":"2018-02-17T14:44:28","slug":"how-to-validate-cad-data","status":"publish","type":"post","link":"https:\/\/max-drake.cc\/?p=2231","title":{"rendered":"How to validate CAD Data after its exported"},"content":{"rendered":"<p>Following on from&nbsp; <a href=\"https:\/\/max-drake.cc\/2018\/02\/11\/cad-data-to-excel-for-asset-management\/\" target=\"_blank\" rel=\"noopener\"><strong>CAD Data to Excel for Asset Management <\/strong><\/a>where I created a BLOCK with ATTRIBUTES and exported that information from a CAD file to a TXT file which was then viewed in Excel.<\/p>\n<p>I altered the CASE on a couple of items and deleted one cell so its blank.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-2233 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im10-300x129.jpg\" alt=\"\" width=\"1428\" height=\"614\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im10-300x129.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im10-768x331.jpg 768w\" data-sizes=\"(max-width: 1428px) 100vw, 1428px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1428px; --smush-placeholder-aspect-ratio: 1428\/614;\" \/><\/p>\n<p>I then looked at using a <a href=\"https:\/\/www.knime.com\/\" target=\"_blank\" rel=\"noopener\">KNIME<\/a> process to try and validate the Substrate &amp; Finishes strings in the text file, looking to do this outside of the Drawing Environment (<em>as we cannot push the text file data back into the Drawing with the Free Version of DraftSight (But you can with most of the paid CAD programmes<\/em>))<\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-2237 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im11-300x191.jpg\" alt=\"\" width=\"1440\" height=\"917\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im11-300x191.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im11-768x490.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im11-1024x653.jpg 1024w\" data-sizes=\"(max-width: 1440px) 100vw, 1440px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1440px; --smush-placeholder-aspect-ratio: 1440\/917;\" \/><\/p>\n<p>In the process above:<\/p>\n<p>1- We read the text file<\/p>\n<p>2- We have&nbsp; a Library File (<em>see image below<\/em>)<\/p>\n<p>3-which we use to compare a column against a list of &#8220;strings&#8221; (words), if the string is in the first column, it is replaced with the string in the 2nd column.<\/p>\n<p>4. We then chop off all the other columns<\/p>\n<p>5- We then join all the columns together in the same order as the original<\/p>\n<p>6-We then export to an Excel File (which in turn can be saved as a text file<\/p>\n<p><img decoding=\"async\" class=\"wp-image-2240 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im13-181x300.jpg\" alt=\"\" width=\"302\" height=\"501\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im13-181x300.jpg 181w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im13.jpg 541w\" data-sizes=\"(max-width: 302px) 100vw, 302px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 302px; --smush-placeholder-aspect-ratio: 302\/501;\" \/><\/p>\n<p>The resulting file looks like this:<\/p>\n<h3>EXPORTED FILE<\/h3>\n<p><img decoding=\"async\" class=\"wp-image-2232 aligncenter lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im12-1024x449.jpg\" alt=\"\" width=\"1463\" height=\"641\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im12-1024x449.jpg 1024w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im12-300x131.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im12-768x337.jpg 768w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im12.jpg 1652w\" data-sizes=\"(max-width: 1463px) 100vw, 1463px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1463px; --smush-placeholder-aspect-ratio: 1463\/641;\" \/><\/p>\n<p>You see that the correct referencing has been included for all the elements (note, there is an error, line 6 for Ceilingfin where the PAINT has been substituted by BLANK. This would need to be checked to see why this occured, all part of the validation checking procedure)<\/p>\n<h3>ORIGINAL FILE<\/h3>\n<p><img decoding=\"async\" class=\"alignnone wp-image-2233 lazyload\" data-src=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im10-300x129.jpg\" alt=\"\" width=\"1416\" height=\"609\" data-srcset=\"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im10-300x129.jpg 300w, https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im10-768x331.jpg 768w\" data-sizes=\"(max-width: 1416px) 100vw, 1416px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1416px; --smush-placeholder-aspect-ratio: 1416\/609;\" \/><\/p>\n<h3>Comments<\/h3>\n<p>After the last post, I felt I needed to check to see if I could set up a validation process on the data.<\/p>\n<p>This was a little BURR that was bothering me. Simon from RTV Tools set up a validation process in the RTV Reporter Pro tool that he built for BIM, so I wanted to just see if I could do a simple validation check on CAD Attribute Data.<\/p>\n<p>This is a very quick\/crude example to show how you can search\/replace poor quality &#8220;STRINGS&#8221;&nbsp; with clean data with consistent terminology for the Database for the Asset Management Information System (AMIS).<\/p>\n<p>Obviously there is missing data, this sheet can be sent back to contractor with <strong>REQUEST TO FIX<\/strong> and then it can be processed again.<\/p>\n<p>That was one process. A run through to check that the &#8220;<strong>Naming Convention<\/strong>&#8221; was correct, and if not, can be corrected if the terminology is within the library file.<\/p>\n<p>Next, there could be another pass over the data looking at<strong> &#8220;*&#8221;<\/strong> where data has not been included. These could be highlighted.<\/p>\n<p>Next there could be a check on numbers to see that they were roughly of the order of magnitude that they need to be , ie&#8221; &gt;0&#8243; and &#8220;&lt;&#8220;less than total area of space (getting Global Block with rough overall space dimensions such as total Area, Height , max length &amp; max width can give you simple figures to compare to.<\/p>\n<p>All you need to do is plug the output of one process and make it the input of the next process.<\/p>\n<p>I&#8217;m not sure if Knime can colour code output, but you could always do a macro in Excel for Conditional formatting to highlight Empty Cells &amp; others with &#8220;placemarkers&#8221; (Such as &#8220;*&#8221;, or &#8220;x&#8221;) and colour them a strong colour to highlight that that particular cell needs to be checked.<\/p>\n<p>So a 2 stage process to check the data would most probably meet most needs, using KNIME &amp; Excel Macros. (Or pay lots of money &amp; get a copy of FME).<\/p>\n<p>The nice thing with KNIME is you set up the process and you can distribute a particular process as a file to others, so that contractors can validate their own work. You would still run the validation in-house as a Quality Assurance (QA) check.<\/p>\n<p>After the data is cleaned, you&#8217;d plug it back into the Drawing so that the Attributes were up to date, then use that drawing as the <strong>source of data capture for that asset<\/strong>, and that would then be distributed to designers\/contractors when there was refurbishment work to be done, so they could update the file to keep the data relevant.<\/p>\n<p>Here are links to files:<\/p>\n<ol>\n<li>If you go to <a href=\"https:\/\/max-drake.cc\/2018\/02\/11\/cad-data-to-excel-for-asset-management\/\" target=\"_blank\" rel=\"noopener\"><strong>THIS POST<\/strong><\/a> you can download the CAD file with the BLOCK inserted.<\/li>\n<li>If you go to <a href=\"https:\/\/max-drake.cc\/2018\/02\/10\/how-to-show-cad-drawings-on-a-web-page\/\" target=\"_blank\" rel=\"noopener\"><strong>THIS POST<\/strong><\/a> you will see download for DraftSight to get the CAD programme for free.<\/li>\n<\/ol>\n<p>If you just want to explore the output, here are the files:<\/p>\n<ol>\n<li>The output file (with a few text changes) from DraftSight- Main input file for Knime Validate Process.&nbsp; <a href=\"https:\/\/max-drake.cc\/data\/cad\/BARDATA.txt\"><strong>BARDATA.txt<\/strong><\/a><\/li>\n<li>The Compare Library File , for comparing the column entry&#8217;s against the selected naming convention. <a href=\"https:\/\/max-drake.cc\/data\/cad\/FloorSSCompare.txt\"><strong>FloorSSCompare.txt<\/strong><\/a><\/li>\n<li>The output Excel File where the validate process exports the data to. <a href=\"https:\/\/max-drake.cc\/data\/cad\/Out.xlsx\"><strong>Out.xlsx<\/strong><\/a><\/li>\n<li>The Knime workflow, you will have to download Knime, install it and then upload this workflow. <a href=\"https:\/\/max-drake.cc\/data\/cad\/ValidateCAD.knwf\"><strong>ValidateCAD.knwf<\/strong><\/a><\/li>\n<li>You can download Knime for Free from <a href=\"https:\/\/www.knime.com\/\" target=\"_blank\" rel=\"noopener\"><strong>HERE<\/strong><\/a>.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Following on from&nbsp; CAD Data to Excel for Asset Management where I created a BLOCK with ATTRIBUTES and exported that information from a CAD file to a TXT file which was then viewed in Excel. I altered the CASE on a couple of items and deleted one cell so its blank. I then looked at [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2237,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,4,12],"tags":[],"class_list":["post-2231","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-extraction","category-drawings","category-visualisation"],"featured_image_src":"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im11.jpg","featured_image_src_square":"https:\/\/max-drake.cc\/wp-content\/uploads\/2018\/02\/im11.jpg","author_info":{"display_name":"Max Drake","author_link":"https:\/\/max-drake.cc\/?author=1"},"_links":{"self":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/2231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2231"}],"version-history":[{"count":0,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/2231\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/media\/2237"}],"wp:attachment":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}