<?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: Model space showing entity which are not sure how to tell visibility in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/model-space-showing-entity-which-are-not-sure-how-to-tell/m-p/7984357#M26069</link>
    <description>&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you be able to clarify your question because I didn't undersetand. best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 07 May 2018 11:22:04 GMT</pubDate>
    <dc:creator>BKSpurgeon</dc:creator>
    <dc:date>2018-05-07T11:22:04Z</dc:date>
    <item>
      <title>Model space showing entity which are not sure how to tell visibility</title>
      <link>https://forums.autodesk.com/t5/net-forum/model-space-showing-entity-which-are-not-sure-how-to-tell/m-p/7982209#M26068</link>
      <description>&lt;P&gt;I am using realDwg to fetch 2d shape form a dwg file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found I get too much geom which is not showing in the autoCAD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found the problem is that the&amp;nbsp;BlockTableRecord contains too many useless&amp;nbsp;BlockReferences.&lt;/P&gt;&lt;P&gt;Each one has its own entity of Curves and shapes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;foreach (ObjectId id in ms)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Entity ent = (Entity)tr.GetObject(id, OpenMode.ForRead);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &lt;STRONG&gt;//if entity is text polyline, or other stuff, just save them and show them in svg later&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; if(ent is BlockReference) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BlockReference br = (BlockReference)mBlockReferenceList[i];&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BlockTableRecord blockRecord = (BlockTableRecord)tr.GetObject(br.BlockTableRecord, OpenMode.ForRead);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (ObjectId subId in blockRecord)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;//get text, curve, splines and so on&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dwg file showing in the AUTOCAD is like the image of AutoCAD.PNG, what I did is now showing like MyFetch.PNG.&lt;/P&gt;&lt;P&gt;Apparently I get too much useless stuff. But I don't know how to filter them. And I&amp;nbsp;think the problem is caused by the&amp;nbsp;BlockReference or the entity is invisible or hidden, but i tried to compare all the properties they all seems like same no matter the entity should show or should not show.&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help is appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks a huge!&lt;/P&gt;</description>
      <pubDate>Sat, 05 May 2018 14:47:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/model-space-showing-entity-which-are-not-sure-how-to-tell/m-p/7982209#M26068</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-05T14:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: Model space showing entity which are not sure how to tell visibility</title>
      <link>https://forums.autodesk.com/t5/net-forum/model-space-showing-entity-which-are-not-sure-how-to-tell/m-p/7984357#M26069</link>
      <description>&lt;P&gt;Hi there&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you be able to clarify your question because I didn't undersetand. best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 11:22:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/model-space-showing-entity-which-are-not-sure-how-to-tell/m-p/7984357#M26069</guid>
      <dc:creator>BKSpurgeon</dc:creator>
      <dc:date>2018-05-07T11:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: Model space showing entity which are not sure how to tell visibility</title>
      <link>https://forums.autodesk.com/t5/net-forum/model-space-showing-entity-which-are-not-sure-how-to-tell/m-p/7989001#M26070</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3011731"&gt;@BKSpurgeon&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to extract all the geoms in the model space, there are two attachments I uploaded, the autocad.png is how it looks in Autocad2018, the other one is the svg I exported, i found that i exported a lot of more stuff which is not showing in the autocad,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/net/how-to-get-the-blockreference-s-clip-range/td-p/7988972" target="_blank"&gt;https://forums.autodesk.com/t5/net/how-to-get-the-blockreference-s-clip-range/td-p/7988972&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Please check this question too, that I found it's because of the blockreference is been clipped, but I dont know how to get the clip range now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 04:57:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/model-space-showing-entity-which-are-not-sure-how-to-tell/m-p/7989001#M26070</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-09T04:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Model space showing entity which are not sure how to tell visibility</title>
      <link>https://forums.autodesk.com/t5/net-forum/model-space-showing-entity-which-are-not-sure-how-to-tell/m-p/7989077#M26071</link>
      <description>&lt;P&gt;Your code doesn't account for visibility of entity layers and viewport-layer overrides (layer frozen globally or layer frozen in viewport).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to check the layer of every entity to ensure that it is on and not frozen globally, and in the viewport.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You also have to check to see if an object is within a viewport's field of view&amp;nbsp;(clipped or not clipped), which is not a simple process.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymouswrote:&lt;BR /&gt;&lt;P&gt;I am using realDwg to fetch 2d shape form a dwg file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found I get too much geom which is not showing in the autoCAD.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I found the problem is that the&amp;nbsp;BlockTableRecord contains too many useless&amp;nbsp;BlockReferences.&lt;/P&gt;&lt;P&gt;Each one has its own entity of Curves and shapes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;foreach (ObjectId id in ms)&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; Entity ent = (Entity)tr.GetObject(id, OpenMode.ForRead);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &lt;STRONG&gt;//if entity is text polyline, or other stuff, just save them and show them in svg later&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; if(ent is BlockReference) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BlockReference br = (BlockReference)mBlockReferenceList[i];&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; BlockTableRecord blockRecord = (BlockTableRecord)tr.GetObject(br.BlockTableRecord, OpenMode.ForRead);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; foreach (ObjectId subId in blockRecord)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt;//get text, curve, splines and so on&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The dwg file showing in the AUTOCAD is like the image of AutoCAD.PNG, what I did is now showing like MyFetch.PNG.&lt;/P&gt;&lt;P&gt;Apparently I get too much useless stuff. But I don't know how to filter them. And I&amp;nbsp;think the problem is caused by the&amp;nbsp;BlockReference or the entity is invisible or hidden, but i tried to compare all the properties they all seems like same no matter the entity should show or should not show.&lt;/P&gt;&lt;P&gt;Any ideas ?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any help is appreciated!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks a huge!&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 05:58:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/model-space-showing-entity-which-are-not-sure-how-to-tell/m-p/7989077#M26071</guid>
      <dc:creator>ActivistInvestor</dc:creator>
      <dc:date>2018-05-09T05:58:37Z</dc:date>
    </item>
    <item>
      <title>Re: Model space showing entity which are not sure how to tell visibility</title>
      <link>https://forums.autodesk.com/t5/net-forum/model-space-showing-entity-which-are-not-sure-how-to-tell/m-p/7994330#M26072</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4476837"&gt;@ActivistInvestor&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thx a lot, that's right to add visible and layer logic and so on, which I did later, and has some effects now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The last problem is the clip stuff you mentioned, I do find this link :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://through-the-interface.typepad.com/through_the_interface/2012/10/querying-for-xclip-information-inside-autocad-using-net.html" target="_blank"&gt;http://through-the-interface.typepad.com/through_the_interface/2012/10/querying-for-xclip-information-inside-autocad-using-net.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;very helpful to check the XClip stuff.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the question now is, if you check the link carefully, you can see it is only used as a simple rectangle clipping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is , if I do clip the mode with some range, like the rectangle range. &lt;STRONG&gt;THEN I ROTATE THE BLOCKREFERENCE AND MOVE THE BLOCK A LITTLE,&amp;nbsp; &lt;/STRONG&gt;then I found the control points mentioned in this link is never changed. But the &lt;SPAN&gt;fil.GetQueryBounds still gives me a new bounds, since it's been rotated, this new bounds is not what I am looking for now.&amp;nbsp;&lt;/SPAN&gt;Which means I LOST the correct clipping range.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to solve this? Did I discribe the question clearly?&lt;/P&gt;</description>
      <pubDate>Fri, 11 May 2018 02:21:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/model-space-showing-entity-which-are-not-sure-how-to-tell/m-p/7994330#M26072</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-11T02:21:30Z</dc:date>
    </item>
  </channel>
</rss>

