<?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: Extended Entity Data Filter in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259489#M45796</link>
    <description>TomD wrote:
&amp;gt; Could you explain a little further, please?
&amp;gt; 
&amp;gt; I've run some successful, albeit early, testing on some lightweight 
&amp;gt; polylines this way, seemingly working fine.
&amp;gt; 
&amp;gt; Any hard-learned lessons appreciated. ;)

What version of Autocad are you using ?
I would have told you that you could never filter based on 
anything other than Application Name, but apparently that is not true.

I am surprised ! Have you successfully filtered on all datatypes ? 
(strings, ...)</description>
    <pubDate>Wed, 02 Mar 2005 07:56:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2005-03-02T07:56:11Z</dc:date>
    <item>
      <title>Extended Entity Data Filter</title>
      <link>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259485#M45792</link>
      <description>Is it possible to filter for specific extended entity data beyond just the 
application name?

(I've tried several times before and haven't had any success beyond the app 
name, so thought I'd post the question here before I try again.)</description>
      <pubDate>Tue, 01 Mar 2005 20:21:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259485#M45792</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-01T20:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Extended Entity Data Filter</title>
      <link>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259486#M45793</link>
      <description>Scratch that last question, I think I just figured out why it didn't work 
for me, before.

Sample of successful filter variants, for anyone who may be wondering....

  vCod(0) = 1001: vVal(0) = kAppName
  vCod(1) = 1002: vVal(1) = "{"
  vCod(2) = 1040: vVal(2) = 54#
  vCod(3) = 1002: vVal(3) = "}"

....in previous attempts, I had neglected to put in the 1002/brackets

"TomD" &lt;TDIVITTIS.NO&gt; wrote in message 
news:4224ced2$1_3@newsprd01...
&amp;gt; Is it possible to filter for specific extended entity data beyond just the 
&amp;gt; application name?
&amp;gt;
&amp;gt; (I've tried several times before and haven't had any success beyond the 
&amp;gt; app name, so thought I'd post the question here before I try again.)
&amp;gt;&lt;/TDIVITTIS.NO&gt;</description>
      <pubDate>Tue, 01 Mar 2005 20:46:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259486#M45793</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-01T20:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Extended Entity Data Filter</title>
      <link>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259487#M45794</link>
      <description>You should be aware that it won't work for simpler (older?) entities: point, line, text, circle, arc, ... maybe others.</description>
      <pubDate>Tue, 01 Mar 2005 21:03:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259487#M45794</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-01T21:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Extended Entity Data Filter</title>
      <link>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259488#M45795</link>
      <description>Could you explain a little further, please?

I've run some successful, albeit early, testing on some lightweight 
polylines this way, seemingly working fine.

Any hard-learned lessons appreciated. ;)

"fantum" &lt;NOSPAM&gt; wrote in message 
news:27634982.1109711055606.JavaMail.jive@jiveforum1.autodesk.com...
&amp;gt; You should be aware that it won't work for simpler (older?) entities: 
&amp;gt; point, line, text, circle, arc, ... maybe others.&lt;/NOSPAM&gt;</description>
      <pubDate>Wed, 02 Mar 2005 02:57:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259488#M45795</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-02T02:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Extended Entity Data Filter</title>
      <link>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259489#M45796</link>
      <description>TomD wrote:
&amp;gt; Could you explain a little further, please?
&amp;gt; 
&amp;gt; I've run some successful, albeit early, testing on some lightweight 
&amp;gt; polylines this way, seemingly working fine.
&amp;gt; 
&amp;gt; Any hard-learned lessons appreciated. ;)

What version of Autocad are you using ?
I would have told you that you could never filter based on 
anything other than Application Name, but apparently that is not true.

I am surprised ! Have you successfully filtered on all datatypes ? 
(strings, ...)</description>
      <pubDate>Wed, 02 Mar 2005 07:56:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259489#M45796</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-02T07:56:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extended Entity Data Filter</title>
      <link>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259490#M45797</link>
      <description>Documentation and received wisdom notwithstanding, it is possible to filter a selection based on extended entity data beyond the appname in versions 2000 through at least 2005 for some entity types.  These types include lightweight polyline, mtext, ellipse, etc. but do not include line, text, circle, etc.</description>
      <pubDate>Wed, 02 Mar 2005 12:37:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259490#M45797</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-02T12:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Extended Entity Data Filter</title>
      <link>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259491#M45798</link>
      <description>"Arnaud Lesauvage" &lt;THEWILD_NOSPAM&gt; wrote in message 
news:4225719b$1_2@newsprd01...
&amp;gt; TomD wrote:
&amp;gt;&amp;gt; Could you explain a little further, please?
&amp;gt;&amp;gt;
&amp;gt;&amp;gt; I've run some successful, albeit early, testing on some lightweight 
&amp;gt;&amp;gt; polylines this way, seemingly working fine.
&amp;gt;&amp;gt;
&amp;gt;&amp;gt; Any hard-learned lessons appreciated. ;)
&amp;gt;
&amp;gt; What version of Autocad are you using ?
&amp;gt; I would have told you that you could never filter based on anything other 
&amp;gt; than Application Name, but apparently that is not true.
&amp;gt;
&amp;gt; I am surprised ! Have you successfully filtered on all datatypes ? 
&amp;gt; (strings, ...)

I've only tested with 2005, but could try 2004 if it would be helpful for 
you.

The only successful filtering was by a 1010 3d point, so far.  I plan to do 
some other testing, relatively soon, though, on something different that I 
already have XData in use with.

I should clarify that I'm not doing anything too high end with it, so there 
could certainly be caveats.  (I'm a "cad guy/designer" first, programming is 
an advanced hobby, I guess you could say.)

Some of the code follow.  It's simple enough that anyone following this 
thread could likely figure it out, fairly quickly, so I'm skipping that. 
(Also, if you're thinking that I shouldn't be finding a drainage area by a 
point stored in XData, I'd normally agree with you....lol......don't 
ask.....just testing an idea.)

Function TagDrainageArea(oEnt As AcadEntity, vXyz As Variant, dCw As Double) 
As Boolean
Dim vCod(5) As Integer, vVal(5) As Variant
Dim dPnt(2) As Double
  dPnt(0) = vXyz(0): dPnt(1) = vXyz(1): dPnt(2) = vXyz(2)
  vCod(0) = 1001: vVal(0) = kAppName
  vCod(1) = 1002: vVal(1) = "{"
  vCod(2) = 1000: vVal(2) = "DrainageArea"
  vCod(3) = 1011: vVal(3) = dPnt   'World Space Position...moves with 
entity!
  vCod(4) = 1040: vVal(4) = dCw    'Weighted C
  vCod(5) = 1002: vVal(5) = "}"
  oEnt.SetXData vCod, vVal
End Function

When I ran the initial tests with the following function, I did get the 
appropriate entities returned.....at least it appears that I did.  Again, 
the testing has not been thorough, by any means.

Function GetAreasForPosition(vXyz As Variant) As AcadSelectionSet
Dim vCod(4) As Integer, vVal(4) As Variant
Dim dFocusPoint(2) As Double
Dim oSet As AcadSelectionSet
  dFocusPoint(0) = vXyz(0): dFocusPoint(1) = vXyz(1): dFocusPoint(2) = 
vXyz(2)
  vCod(0) = 1001: vVal(0) = kAppName
  vCod(1) = 1002: vVal(1) = "{"
  vCod(2) = 1000: vVal(2) = "DrainageArea"
  vCod(3) = 1011: vVal(3) = dFocusPoint
  vCod(4) = 1002: vVal(4) = "}"
  Set oSet = SelSetInit("CEC-SD-STORM-ObjectCollector")
  oSet.Select acSelectionSetAll, , , vCod, vVal
  Set GetAreasForPosition = oSet
End Function&lt;/THEWILD_NOSPAM&gt;</description>
      <pubDate>Wed, 02 Mar 2005 16:37:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259491#M45798</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-02T16:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: Extended Entity Data Filter</title>
      <link>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259492#M45799</link>
      <description>I certainly don't dispute what you're saying, I'm just basically confused as 
to why that would be.  It wouldn't seem to matter (based solely on my 
experience or lack thereof).

Where did you find documentation on this topic?  The documentation I've 
found, to this point, regarding XData in VBA, is very limited, at best.

Thanks for the info, in any case.

"fantum" &lt;NOSPAM&gt; wrote in message 
news:15457196.1109767070041.JavaMail.jive@jiveforum1.autodesk.com...
&amp;gt; Documentation and received wisdom notwithstanding, it is possible to 
&amp;gt; filter a selection based on extended entity data beyond the appname in 
&amp;gt; versions 2000 through at least 2005 for some entity types.  These types 
&amp;gt; include lightweight polyline, mtext, ellipse, etc. but do not include 
&amp;gt; line, text, circle, etc.&lt;/NOSPAM&gt;</description>
      <pubDate>Wed, 02 Mar 2005 16:39:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259492#M45799</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-02T16:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extended Entity Data Filter</title>
      <link>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259493#M45800</link>
      <description>TomD wrote:
&amp;gt; Function TagDrainageArea(oEnt As AcadEntity, vXyz As Variant, dCw As Double) 
&amp;gt; As Boolean
&amp;gt; Dim vCod(5) As Integer, vVal(5) As Variant
&amp;gt; Dim dPnt(2) As Double
&amp;gt;   dPnt(0) = vXyz(0): dPnt(1) = vXyz(1): dPnt(2) = vXyz(2)
&amp;gt;   vCod(0) = 1001: vVal(0) = kAppName
&amp;gt;   vCod(1) = 1002: vVal(1) = "{"
&amp;gt;   vCod(2) = 1000: vVal(2) = "DrainageArea"
&amp;gt;   vCod(3) = 1011: vVal(3) = dPnt   'World Space Position...moves with 
&amp;gt; entity!
&amp;gt;   vCod(4) = 1040: vVal(4) = dCw    'Weighted C
&amp;gt;   vCod(5) = 1002: vVal(5) = "}"
&amp;gt;   oEnt.SetXData vCod, vVal
&amp;gt; End Function
&amp;gt; 
&amp;gt; When I ran the initial tests with the following function, I did get the 
&amp;gt; appropriate entities returned.....at least it appears that I did.  Again, 
&amp;gt; the testing has not been thorough, by any means.
&amp;gt; 
&amp;gt; Function GetAreasForPosition(vXyz As Variant) As AcadSelectionSet
&amp;gt; Dim vCod(4) As Integer, vVal(4) As Variant
&amp;gt; Dim dFocusPoint(2) As Double
&amp;gt; Dim oSet As AcadSelectionSet
&amp;gt;   dFocusPoint(0) = vXyz(0): dFocusPoint(1) = vXyz(1): dFocusPoint(2) = 
&amp;gt; vXyz(2)
&amp;gt;   vCod(0) = 1001: vVal(0) = kAppName
&amp;gt;   vCod(1) = 1002: vVal(1) = "{"
&amp;gt;   vCod(2) = 1000: vVal(2) = "DrainageArea"
&amp;gt;   vCod(3) = 1011: vVal(3) = dFocusPoint
&amp;gt;   vCod(4) = 1002: vVal(4) = "}"
&amp;gt;   Set oSet = SelSetInit("CEC-SD-STORM-ObjectCollector")
&amp;gt;   oSet.Select acSelectionSetAll, , , vCod, vVal
&amp;gt;   Set GetAreasForPosition = oSet
&amp;gt; End Function 


Very nice ! That opens new ways of selecting data !
I'll give it a try !

Arnaud</description>
      <pubDate>Thu, 03 Mar 2005 08:19:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259493#M45800</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-03T08:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Extended Entity Data Filter</title>
      <link>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259494#M45801</link>
      <description>&amp;gt; I'm just basically confused as to why that would be.&lt;BR /&gt;
&lt;BR /&gt;
Since it seems that it doesn't work on the more primitive types I would guess that it was a design decision made a little late at autodesk and not back-ported.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Where did you find documentation on this topic? The documentation I've&lt;BR /&gt;
&amp;gt; found, to this point, regarding XData in VBA, is very limited, at best.&lt;BR /&gt;
&lt;BR /&gt;
It is a bit thin on the ground.  It's been a while but for filtering I probably worked mostly with the lisp docs.</description>
      <pubDate>Thu, 03 Mar 2005 13:00:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259494#M45801</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-03T13:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: Extended Entity Data Filter</title>
      <link>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259495#M45802</link>
      <description>"fantum" &lt;NOSPAM&gt; wrote in message 
news:25421928.1109854858357.JavaMail.jive@jiveforum1.autodesk.com...
&amp;gt;&amp;gt; I'm just basically confused as to why that would be.
&amp;gt;
&amp;gt; Since it seems that it doesn't work on the more primitive types I would 
&amp;gt; guess that it was a design decision made a little late at autodesk and not 
&amp;gt; back-ported.
&amp;gt;
&amp;gt;&amp;gt; Where did you find documentation on this topic? The documentation I've
&amp;gt;&amp;gt; found, to this point, regarding XData in VBA, is very limited, at best.
&amp;gt;
&amp;gt; It is a bit thin on the ground.  It's been a while but for filtering I 
&amp;gt; probably worked mostly with the lisp docs.

Thanks for the info.  If I happen across anything of interest about XData on 
this project, I'll be sure to post.&lt;/NOSPAM&gt;</description>
      <pubDate>Thu, 03 Mar 2005 13:52:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259495#M45802</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-03T13:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Extended Entity Data Filter</title>
      <link>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259496#M45803</link>
      <description>"Arnaud Lesauvage" &lt;THEWILD_NOSPAM&gt; wrote in message 
news:4226c8aa$1_3@newsprd01...
&lt;SNIPPED&gt;
&amp;gt; Very nice ! That opens new ways of selecting data !
&amp;gt; I'll give it a try !

I'm finding the previous logic to be unreliable, at best............thought 
I'd warn you.

Peter, we wish you were here! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SNIPPED&gt;&lt;/THEWILD_NOSPAM&gt;</description>
      <pubDate>Tue, 08 Mar 2005 18:45:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/extended-entity-data-filter/m-p/1259496#M45803</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-03-08T18:45:12Z</dc:date>
    </item>
  </channel>
</rss>

