<?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 Re: Topology clean .net in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4531577#M18184</link>
    <description>&lt;P&gt;Thank you for the sample.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tested it with your dwg it seems working fine for me. Here is what I did:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. turn off all layers except LINE-LAYER, select an edge of the squre, I can see the selection contains 2 lines, so it contains duplicated lines.&lt;/P&gt;
&lt;P&gt;2. Did the same thing with layer AAA, the lines on layer AAA is not duplicated, so I go ahead to copy it at the same position to make the lines are duplicated in layer AAA as well&lt;/P&gt;
&lt;P&gt;3. run your sample with TopologyClean.Init with following object collection, it is supposed to only clean the layer LINE-LAYER:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ObjectIdCollection retVal = null;&lt;/P&gt;
&lt;P&gt;var editor = Application.DocumentManager.MdiActiveDocument.Editor;&lt;/P&gt;
&lt;P&gt;// TypedValue array to define the filter criteria.&lt;BR /&gt; var values = new TypedValue[2];&lt;BR /&gt; var objectValue = new TypedValue((int)DxfCode.Start, "LINE");&lt;BR /&gt; var layerValue = new TypedValue(&lt;BR /&gt; (int)DxfCode.LayerName, &lt;BR /&gt; "LINE-LAYER");&lt;BR /&gt; values.SetValue(objectValue, 0);&lt;BR /&gt; values.SetValue(layerValue, 1);&lt;/P&gt;
&lt;P&gt;// Assign the filter criteria to a SelectionFilter object&lt;BR /&gt; var filter = new SelectionFilter(values);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. After cleaning, I check the layer LINE-LAYER, it does be cleaned, no duplicated lines at same postion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Check layer AAA, it is not affected, the duplicated lines are still there. That is an expected behavior for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am I missing anythig to reproduce your problem?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Oct 2013 09:21:47 GMT</pubDate>
    <dc:creator>Daniel.Du</dc:creator>
    <dc:date>2013-10-18T09:21:47Z</dc:date>
    <item>
      <title>Topology clean .net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4519607#M18180</link>
      <description>&lt;P&gt;Hello. I have problem with TopologyClean.Init(action, IdCollection). If I use ObjectIdCollection, or if I use null, I have same result. "All" object are cleaning, not only this in my ObjectIdCollection (I can't anchor objects). What I doing wrong? Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2013 09:23:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4519607#M18180</guid>
      <dc:creator>zrobert</dc:creator>
      <dc:date>2013-10-14T09:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: Topology clean .net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4524657#M18181</link>
      <description>&lt;P&gt;Do you have a buildable sample project and necessory dataset to help us to reproduce your problem?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 06:25:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4524657#M18181</guid>
      <dc:creator>Daniel.Du</dc:creator>
      <dc:date>2013-10-16T06:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Topology clean .net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4525383#M18182</link>
      <description>First of all thank you for your response.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here is sample project with simple drawing for testing.&lt;BR /&gt;&lt;BR /&gt;I want to clean for duplicate all line objects in layer "LINE-LAYER", but&lt;BR /&gt;&lt;BR /&gt;all other lines in drawing must stay intact (anchored).&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have ObjectIdCollection of lines from "LINE-LAYER", Topology.Variable and&lt;BR /&gt;then go to cleaning.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;using (var tc = new TopologyClean())&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;tc.Init(variable, ids);&lt;BR /&gt;&lt;BR /&gt;tc.Start();&lt;BR /&gt;&lt;BR /&gt;tc.GroupNext();&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;while (!tc.Completed)&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;tc.GroupFix();&lt;BR /&gt;&lt;BR /&gt;tc.GroupNext();&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;tc.End();&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;Result is that all line object in my test drawing was cleaned, not only&lt;BR /&gt;those in "ids".&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Test drawing contain 16 lines, 8 of them are in "LINE-LAYER" which i want to&lt;BR /&gt;clean for duplicate.&lt;BR /&gt;&lt;BR /&gt;I got valid SelectionSet and ObjectIsCollection of them and pass them to&lt;BR /&gt;"tc.Init(variable, ids)" .&lt;BR /&gt;&lt;BR /&gt;But, all of duplicate lines, in all drawing layers are cleaned.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in front!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards;&lt;BR /&gt;&lt;BR /&gt;Robert Zrnc</description>
      <pubDate>Wed, 16 Oct 2013 10:44:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4525383#M18182</guid>
      <dc:creator>zrobert</dc:creator>
      <dc:date>2013-10-16T10:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Topology clean .net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4525701#M18183</link>
      <description>&lt;P&gt;Here is sample project and drawing.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2013 10:57:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4525701#M18183</guid>
      <dc:creator>zrobert</dc:creator>
      <dc:date>2013-10-16T10:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Topology clean .net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4531577#M18184</link>
      <description>&lt;P&gt;Thank you for the sample.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tested it with your dwg it seems working fine for me. Here is what I did:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. turn off all layers except LINE-LAYER, select an edge of the squre, I can see the selection contains 2 lines, so it contains duplicated lines.&lt;/P&gt;
&lt;P&gt;2. Did the same thing with layer AAA, the lines on layer AAA is not duplicated, so I go ahead to copy it at the same position to make the lines are duplicated in layer AAA as well&lt;/P&gt;
&lt;P&gt;3. run your sample with TopologyClean.Init with following object collection, it is supposed to only clean the layer LINE-LAYER:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ObjectIdCollection retVal = null;&lt;/P&gt;
&lt;P&gt;var editor = Application.DocumentManager.MdiActiveDocument.Editor;&lt;/P&gt;
&lt;P&gt;// TypedValue array to define the filter criteria.&lt;BR /&gt; var values = new TypedValue[2];&lt;BR /&gt; var objectValue = new TypedValue((int)DxfCode.Start, "LINE");&lt;BR /&gt; var layerValue = new TypedValue(&lt;BR /&gt; (int)DxfCode.LayerName, &lt;BR /&gt; "LINE-LAYER");&lt;BR /&gt; values.SetValue(objectValue, 0);&lt;BR /&gt; values.SetValue(layerValue, 1);&lt;/P&gt;
&lt;P&gt;// Assign the filter criteria to a SelectionFilter object&lt;BR /&gt; var filter = new SelectionFilter(values);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;4. After cleaning, I check the layer LINE-LAYER, it does be cleaned, no duplicated lines at same postion.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Check layer AAA, it is not affected, the duplicated lines are still there. That is an expected behavior for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Am I missing anythig to reproduce your problem?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2013 09:21:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4531577#M18184</guid>
      <dc:creator>Daniel.Du</dc:creator>
      <dc:date>2013-10-18T09:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: Topology clean .net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4532019#M18185</link>
      <description>Hi;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for answer!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Yes, this approach work the same through my testing.&lt;BR /&gt;&lt;BR /&gt;But, I don't want to turn off layers in drawing manually.&lt;BR /&gt;&lt;BR /&gt;What is the purpose of ObjectIdCollection ids passed to tc.Init(variable,&lt;BR /&gt;ids) if the program behaves just the same with only null value passed.&lt;BR /&gt;&lt;BR /&gt;I thought that TopologyClean will be limited only to objects within ids. I&lt;BR /&gt;would like to clean only duplicate lines within the ids, and the other&lt;BR /&gt;duplicate lines stay untouched (without turning off layers).&lt;BR /&gt;&lt;BR /&gt;Or the only way is programmatically turning off layers and after cleaning&lt;BR /&gt;turn them back on.</description>
      <pubDate>Fri, 18 Oct 2013 10:09:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4532019#M18185</guid>
      <dc:creator>zrobert</dc:creator>
      <dc:date>2013-10-18T10:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Topology clean .net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4532085#M18186</link>
      <description>&lt;P&gt;No, I did not turn of layers then cleaning, I just turn off layers to verify the results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the misunderstanding.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2013 10:17:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4532085#M18186</guid>
      <dc:creator>Daniel.Du</dc:creator>
      <dc:date>2013-10-18T10:17:26Z</dc:date>
    </item>
    <item>
      <title>Re: Topology clean .net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4532477#M18187</link>
      <description>Thanks for the effort Mr Daniel.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;When I run ma test program, result is that I have square with for lines in&lt;BR /&gt;different layers without any duplicates.&lt;BR /&gt;&lt;BR /&gt;This means that they are cleaned "randomly". This was happen to me in Civil&lt;BR /&gt;2013, and Civil 2014.&lt;BR /&gt;&lt;BR /&gt;Probably the problem is something else.area of twilight zone. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Now at least I know that my code is ok.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Again, thank you and best regards;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Robert</description>
      <pubDate>Fri, 18 Oct 2013 11:19:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4532477#M18187</guid>
      <dc:creator>zrobert</dc:creator>
      <dc:date>2013-10-18T11:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Topology clean .net</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4539621#M18188</link>
      <description>&lt;P&gt;You are welcome Robert, please let us know if there is anything we can help.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2013 02:39:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/topology-clean-net/m-p/4539621#M18188</guid>
      <dc:creator>Daniel.Du</dc:creator>
      <dc:date>2013-10-21T02:39:19Z</dc:date>
    </item>
  </channel>
</rss>

