<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cleaning up cross section display of IFC imported objects in Collaboration with other software</title>
    <link>https://community.graphisoft.com/t5/Collaboration-with-other/Cleaning-up-cross-section-display-of-IFC-imported-objects/m-p/202225#M25148</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I recently did some troubleshooting &amp;amp;  discovered why IFC files from Engineers look so bad in cross section, and so figured out a workaround for anyone who needs it:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;The problem&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
IFC Files brought in to ArchiCAD by the IFC translator file often generate objects formed from many co-planar polygons.  Hundreds of meaningless &amp;amp; unwanted diagonal lines then display in cross section views, making them all but useless for production drawings.&lt;BR /&gt;
&lt;BR /&gt;
I found the problem is caused by the way the  object GDL 3D script is being auto coded during import. &lt;BR /&gt;
There is already a parameter in most (but not all) auto created objects that allows user to switch off display of the extraneous polygons - but only for the 3D window. Not hard to extend this 'contours only' display mode functionality to cross sections as well  if you are happy tinkering with the GDL, but manually opening, editing GDL scripts, then resaving hundreds or even thousands of library objects every time an Engineer sends you an updated IFC file is not feasible.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Here is how to fix them en masse: (this is a far faster workaround than anything else I have yet found, avoids the need to convert everything to morphs … and is much easier than it sounds!)&lt;BR /&gt;
&lt;BR /&gt;
Prerequisite – ensure you have download &amp;amp; installed ‘Useful File Utilities’ &lt;A href="http://www.replsoft.com/ufusetup.exe" target="_blank"&gt;http://www.replsoft.com/ufusetup.exe&lt;/A&gt; and the ‘Batch Replacer’ plugin for this software &lt;A href="http://www.replsoft.com/batchreplacer.zip" target="_blank"&gt;http://www.replsoft.com/batchreplacer.zip&lt;/A&gt;&lt;BR /&gt;
(or could use any other text editor that can do batched file search &amp;amp; replace operations)  &lt;BR /&gt;
&lt;BR /&gt;
** EDIT just found  NotePad+ is actually better &amp;amp; more reliable with search &amp;amp; replace &lt;A href="http://portableapps.com/apps/development/notepadpp_portable" target="_blank"&gt;&lt;LINK_TEXT text="http://portableapps.com/apps/developmen ... p_portable"&gt;http://portableapps.com/apps/development/notepadpp_portable&lt;/LINK_TEXT&gt;&lt;/A&gt; **&lt;BR /&gt;
&lt;BR /&gt;
Note: the Useful File Utilities software can only be used 15 times for free before it requires purchase.&lt;BR /&gt;
&lt;BR /&gt;
1.	From ArchiCAD , Import your IFC file(s) into a new empty ArchiCAD file&lt;BR /&gt;
&lt;BR /&gt;
2.	Go to library manager, and save all the embedded objects created to an external folder&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Now we need to convert these objects into XML text file format.&lt;BR /&gt;
&lt;BR /&gt;
3.	Open a command line window (e.g. from Windows start  , click  the ‘run’ icon and type ‘cmd’)  Note :Ensure you run CMD window as an administrator&lt;BR /&gt;
&lt;BR /&gt;
4.	Paste in the following command:&lt;BR /&gt;
&lt;BR /&gt;
"C:\Program Files\GRAPHISOFT\ArchiCAD 17"\LP_XMLConverter l2x "[source]" "[destination]"   &lt;BR /&gt;
&lt;BR /&gt;
Where [source] = full path to the library folder you just made, [destination]=full path to a preferred destination folder - these can be the same. &lt;BR /&gt;
Note: you need to include the quote marks for all paths with spaces.&lt;BR /&gt;
Note: probably best to paste these paths in too – just cut the path text required from your windows explorer address bar.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
5.	Hit enter - This should initiate the translation.  If not, you probably made a typo (or a paste-o).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Now we need to replace the offending 3D script text in each xml file.&lt;BR /&gt;
&lt;BR /&gt;
6.	Open ‘Useful File Utilities’.&lt;BR /&gt;
&lt;BR /&gt;
7.	Browse to and select the [destination] folder.&lt;BR /&gt;
&lt;BR /&gt;
8.	Click Operations/Send to basket – this will find all the XML files in all the subfolders in that directory and make them available for the replacement operation.&lt;BR /&gt;
&lt;BR /&gt;
9.	Click Plug-ins/Batch Replacer.&lt;BR /&gt;
&lt;BR /&gt;
10.	Use the “Load from File” button to load the attached file (which I prepared earlier)  – this will set these up all the requred ‘search and replace’ settings for you&lt;BR /&gt;
            &lt;BR /&gt;
11.	Click the ‘Start Replace’ button.&lt;BR /&gt;
&lt;BR /&gt;
12.	XML files should all be modified automatically.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Now we need to covert these files back into ordinary library objects&lt;BR /&gt;
&lt;BR /&gt;
13.	Go back to the Comand Line window.&lt;BR /&gt;
&lt;BR /&gt;
14.	Past in the following command: &lt;BR /&gt;
&lt;BR /&gt;
"C:\Program Files\GRAPHISOFT\ArchiCAD 17"\LP_XMLConverter x2l "[source]" "[destination]" &lt;BR /&gt;
&lt;BR /&gt;
Where [source] = full path to the XML folder you just converted, [destination]=full path to the original archicad library folder.  Note: probably best to paste these paths in too – just cut path text from windows explorer address bar as before.&lt;BR /&gt;
&lt;BR /&gt;
15.	Hit enter - This should initiate the translation and overwrite the original IFC  objects. If not, again you probably made a typo.&lt;BR /&gt;
&lt;BR /&gt;
16.	Now, from your archiCAD file, open library manager again&lt;BR /&gt;
&lt;BR /&gt;
17.	Add the folder of updated objects to loaded libraries, and delete the embedded library equivalents.  Reload Libraries&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
You should now be up &amp;amp; running, now with the ability to just switch off unwanted polygons displaying in sections.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Notes:&lt;BR /&gt;
&lt;BR /&gt;
•	If you do this with a test ArchiCAD file – and confirm it works, you can then just replace the library objects in a real working file with the ones you just created.&lt;BR /&gt;
•	For minor IFC updates  similarly you may not need to repeat the whole process – can again just replace the embedded objects with the library from previous version.&lt;BR /&gt;
•	Switching off display of the polygons in 3D also switches them off in plan view, due to the way 2D view is scripted.&lt;BR /&gt;
•	With certian objects it seems the contours can not be properly defined in 3D or section views what ever you do (eg inclined square hollow section members with rounded corners rather than sharp corners), so you may need to toggle display of contours only mode to ‘off’ within ArchiCAD, accepting the excess polygons displaying in section (and plan view).  Or you could covert just these objects to morphs and try to manipulate their display from there.   &lt;BR /&gt;
•	Certain objects may need to have their ‘Show Only Contours in 3D’ parameter toggled off and back on to reset the display mode. &lt;BR /&gt;
•	This method *should* in theory work for any IFC import project, and can be adapted for imports from other sources, or in fact any other situation where there are multiple objects all needing the same changes made (object materials, new parameters, rotations, scale, 2D display method  etc).&lt;BR /&gt;
&lt;BR /&gt;
Anyone wanting to know the GDL changes involved , these are&lt;BR /&gt;
&lt;BR /&gt;
                To sort out the display context problem in 3D script:&lt;BR /&gt;
&lt;BR /&gt;
Find this string :   IF (GLOB_CONTEXT - 3) % 10 = 0 AND gs_ifc_showOnlyContourEdgesIn3D &amp;lt;&amp;gt; 0 THEN hiddenEdge = 1&lt;BR /&gt;
and Replace with:   IF (GLOB_CONTEXT - 3) % 10 &amp;lt;=1 AND gs_ifc_showOnlyContourEdgesIn3D &amp;lt;&amp;gt; 0 THEN hiddenEdge = 1&lt;BR /&gt;
&lt;BR /&gt;
To sort out certain random objects created with the required display parameter hidden from user, and set to ‘off’&lt;BR /&gt;
&lt;BR /&gt;
Find this string: &amp;lt;ParFlg_Hidden/&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
and Replace with:   [nothing]&lt;BR /&gt;
&lt;BR /&gt;
Any suggestions/improvements, let me know.&lt;BR /&gt;
&lt;BR /&gt;
Cheers&lt;BR /&gt;
Paul King&lt;/R&gt;&lt;/DIV&gt;</description>
    <pubDate>Sat, 05 Oct 2013 01:00:23 GMT</pubDate>
    <dc:creator>Paul King</dc:creator>
    <dc:date>2013-10-05T01:00:23Z</dc:date>
    <item>
      <title>Cleaning up cross section display of IFC imported objects</title>
      <link>https://community.graphisoft.com/t5/Collaboration-with-other/Cleaning-up-cross-section-display-of-IFC-imported-objects/m-p/202225#M25148</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;I recently did some troubleshooting &amp;amp;  discovered why IFC files from Engineers look so bad in cross section, and so figured out a workaround for anyone who needs it:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;The problem&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
IFC Files brought in to ArchiCAD by the IFC translator file often generate objects formed from many co-planar polygons.  Hundreds of meaningless &amp;amp; unwanted diagonal lines then display in cross section views, making them all but useless for production drawings.&lt;BR /&gt;
&lt;BR /&gt;
I found the problem is caused by the way the  object GDL 3D script is being auto coded during import. &lt;BR /&gt;
There is already a parameter in most (but not all) auto created objects that allows user to switch off display of the extraneous polygons - but only for the 3D window. Not hard to extend this 'contours only' display mode functionality to cross sections as well  if you are happy tinkering with the GDL, but manually opening, editing GDL scripts, then resaving hundreds or even thousands of library objects every time an Engineer sends you an updated IFC file is not feasible.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Here is how to fix them en masse: (this is a far faster workaround than anything else I have yet found, avoids the need to convert everything to morphs … and is much easier than it sounds!)&lt;BR /&gt;
&lt;BR /&gt;
Prerequisite – ensure you have download &amp;amp; installed ‘Useful File Utilities’ &lt;A href="http://www.replsoft.com/ufusetup.exe" target="_blank"&gt;http://www.replsoft.com/ufusetup.exe&lt;/A&gt; and the ‘Batch Replacer’ plugin for this software &lt;A href="http://www.replsoft.com/batchreplacer.zip" target="_blank"&gt;http://www.replsoft.com/batchreplacer.zip&lt;/A&gt;&lt;BR /&gt;
(or could use any other text editor that can do batched file search &amp;amp; replace operations)  &lt;BR /&gt;
&lt;BR /&gt;
** EDIT just found  NotePad+ is actually better &amp;amp; more reliable with search &amp;amp; replace &lt;A href="http://portableapps.com/apps/development/notepadpp_portable" target="_blank"&gt;&lt;LINK_TEXT text="http://portableapps.com/apps/developmen ... p_portable"&gt;http://portableapps.com/apps/development/notepadpp_portable&lt;/LINK_TEXT&gt;&lt;/A&gt; **&lt;BR /&gt;
&lt;BR /&gt;
Note: the Useful File Utilities software can only be used 15 times for free before it requires purchase.&lt;BR /&gt;
&lt;BR /&gt;
1.	From ArchiCAD , Import your IFC file(s) into a new empty ArchiCAD file&lt;BR /&gt;
&lt;BR /&gt;
2.	Go to library manager, and save all the embedded objects created to an external folder&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Now we need to convert these objects into XML text file format.&lt;BR /&gt;
&lt;BR /&gt;
3.	Open a command line window (e.g. from Windows start  , click  the ‘run’ icon and type ‘cmd’)  Note :Ensure you run CMD window as an administrator&lt;BR /&gt;
&lt;BR /&gt;
4.	Paste in the following command:&lt;BR /&gt;
&lt;BR /&gt;
"C:\Program Files\GRAPHISOFT\ArchiCAD 17"\LP_XMLConverter l2x "[source]" "[destination]"   &lt;BR /&gt;
&lt;BR /&gt;
Where [source] = full path to the library folder you just made, [destination]=full path to a preferred destination folder - these can be the same. &lt;BR /&gt;
Note: you need to include the quote marks for all paths with spaces.&lt;BR /&gt;
Note: probably best to paste these paths in too – just cut the path text required from your windows explorer address bar.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
5.	Hit enter - This should initiate the translation.  If not, you probably made a typo (or a paste-o).&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Now we need to replace the offending 3D script text in each xml file.&lt;BR /&gt;
&lt;BR /&gt;
6.	Open ‘Useful File Utilities’.&lt;BR /&gt;
&lt;BR /&gt;
7.	Browse to and select the [destination] folder.&lt;BR /&gt;
&lt;BR /&gt;
8.	Click Operations/Send to basket – this will find all the XML files in all the subfolders in that directory and make them available for the replacement operation.&lt;BR /&gt;
&lt;BR /&gt;
9.	Click Plug-ins/Batch Replacer.&lt;BR /&gt;
&lt;BR /&gt;
10.	Use the “Load from File” button to load the attached file (which I prepared earlier)  – this will set these up all the requred ‘search and replace’ settings for you&lt;BR /&gt;
            &lt;BR /&gt;
11.	Click the ‘Start Replace’ button.&lt;BR /&gt;
&lt;BR /&gt;
12.	XML files should all be modified automatically.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Now we need to covert these files back into ordinary library objects&lt;BR /&gt;
&lt;BR /&gt;
13.	Go back to the Comand Line window.&lt;BR /&gt;
&lt;BR /&gt;
14.	Past in the following command: &lt;BR /&gt;
&lt;BR /&gt;
"C:\Program Files\GRAPHISOFT\ArchiCAD 17"\LP_XMLConverter x2l "[source]" "[destination]" &lt;BR /&gt;
&lt;BR /&gt;
Where [source] = full path to the XML folder you just converted, [destination]=full path to the original archicad library folder.  Note: probably best to paste these paths in too – just cut path text from windows explorer address bar as before.&lt;BR /&gt;
&lt;BR /&gt;
15.	Hit enter - This should initiate the translation and overwrite the original IFC  objects. If not, again you probably made a typo.&lt;BR /&gt;
&lt;BR /&gt;
16.	Now, from your archiCAD file, open library manager again&lt;BR /&gt;
&lt;BR /&gt;
17.	Add the folder of updated objects to loaded libraries, and delete the embedded library equivalents.  Reload Libraries&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
You should now be up &amp;amp; running, now with the ability to just switch off unwanted polygons displaying in sections.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Notes:&lt;BR /&gt;
&lt;BR /&gt;
•	If you do this with a test ArchiCAD file – and confirm it works, you can then just replace the library objects in a real working file with the ones you just created.&lt;BR /&gt;
•	For minor IFC updates  similarly you may not need to repeat the whole process – can again just replace the embedded objects with the library from previous version.&lt;BR /&gt;
•	Switching off display of the polygons in 3D also switches them off in plan view, due to the way 2D view is scripted.&lt;BR /&gt;
•	With certian objects it seems the contours can not be properly defined in 3D or section views what ever you do (eg inclined square hollow section members with rounded corners rather than sharp corners), so you may need to toggle display of contours only mode to ‘off’ within ArchiCAD, accepting the excess polygons displaying in section (and plan view).  Or you could covert just these objects to morphs and try to manipulate their display from there.   &lt;BR /&gt;
•	Certain objects may need to have their ‘Show Only Contours in 3D’ parameter toggled off and back on to reset the display mode. &lt;BR /&gt;
•	This method *should* in theory work for any IFC import project, and can be adapted for imports from other sources, or in fact any other situation where there are multiple objects all needing the same changes made (object materials, new parameters, rotations, scale, 2D display method  etc).&lt;BR /&gt;
&lt;BR /&gt;
Anyone wanting to know the GDL changes involved , these are&lt;BR /&gt;
&lt;BR /&gt;
                To sort out the display context problem in 3D script:&lt;BR /&gt;
&lt;BR /&gt;
Find this string :   IF (GLOB_CONTEXT - 3) % 10 = 0 AND gs_ifc_showOnlyContourEdgesIn3D &amp;lt;&amp;gt; 0 THEN hiddenEdge = 1&lt;BR /&gt;
and Replace with:   IF (GLOB_CONTEXT - 3) % 10 &amp;lt;=1 AND gs_ifc_showOnlyContourEdgesIn3D &amp;lt;&amp;gt; 0 THEN hiddenEdge = 1&lt;BR /&gt;
&lt;BR /&gt;
To sort out certain random objects created with the required display parameter hidden from user, and set to ‘off’&lt;BR /&gt;
&lt;BR /&gt;
Find this string: &amp;lt;ParFlg_Hidden/&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
and Replace with:   [nothing]&lt;BR /&gt;
&lt;BR /&gt;
Any suggestions/improvements, let me know.&lt;BR /&gt;
&lt;BR /&gt;
Cheers&lt;BR /&gt;
Paul King&lt;/R&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 05 Oct 2013 01:00:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Collaboration-with-other/Cleaning-up-cross-section-display-of-IFC-imported-objects/m-p/202225#M25148</guid>
      <dc:creator>Paul King</dc:creator>
      <dc:date>2013-10-05T01:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Cleaning up cross section display of IFC imported object</title>
      <link>https://community.graphisoft.com/t5/Collaboration-with-other/Cleaning-up-cross-section-display-of-IFC-imported-objects/m-p/202226#M25149</link>
      <description>Hi Paul,&lt;BR /&gt;
&lt;BR /&gt;
I have not tried this out now, but I think this will be a very, very useful workaround for this situation.&lt;BR /&gt;
&lt;BR /&gt;
Do you think this could also work for SketchUp imports? I suppose it would although in case of SketchUp one would probably do this by one SketchUp element at a time. But you may have more experience with it.</description>
      <pubDate>Mon, 07 Oct 2013 09:54:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Collaboration-with-other/Cleaning-up-cross-section-display-of-IFC-imported-objects/m-p/202226#M25149</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2013-10-07T09:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Cleaning up cross section display of IFC imported object</title>
      <link>https://community.graphisoft.com/t5/Collaboration-with-other/Cleaning-up-cross-section-display-of-IFC-imported-objects/m-p/202227#M25150</link>
      <description>&lt;BLOCKQUOTE&gt;laszlonagy wrote:&lt;BR /&gt;Hi Paul,&lt;BR /&gt;
&lt;BR /&gt;
I have not tried this out now, but I think this will be a very, very useful workaround for this situation.&lt;BR /&gt;
&lt;BR /&gt;
Do you think this could also work for SketchUp imports? I suppose it would although in case of SketchUp one would probably do this by one SketchUp element at a time. But you may have more experience with it.&lt;/BLOCKQUOTE&gt;

Hi Laszlo&lt;BR /&gt;
&lt;BR /&gt;
I don't see why a similar process would not work for any imported objects.&lt;BR /&gt;
The idea is that it edits a whole library of objects at once, assuming the same thing needs to be done to all - and imported dumb objects that display too many polygons would fit this category. You would probably start with one object to check what ArchiCAD import forgets to do automatically, then adjust the search &amp;amp; replace criteria accordingly for the XML file representing the whole library</description>
      <pubDate>Mon, 07 Oct 2013 11:16:38 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Collaboration-with-other/Cleaning-up-cross-section-display-of-IFC-imported-objects/m-p/202227#M25150</guid>
      <dc:creator>Paul King</dc:creator>
      <dc:date>2013-10-07T11:16:38Z</dc:date>
    </item>
  </channel>
</rss>

