<?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: Entity data without select, but I know the name in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9217649#M80306</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp; But I'm not sure how entity handles are affected by something being nested inside a Block definition.&amp;nbsp; ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, I find in a quick experiment that when I check the handle of a Line, then include that Line in a Block definition, and Insert that Block, getting the entity data from the nested Line with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;(entget (car (nentsel)))&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;reveals that it now has a &lt;EM&gt;different&lt;/EM&gt;&amp;nbsp; handle.&amp;nbsp; However, when I close the drawing and re-open it, the nested Line's handle still has that same changed value.&amp;nbsp; And that's true in each occurrence of that Line nested in multiple Insertions of that Block.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So &lt;EM&gt;if&lt;/EM&gt;, rather than save the handle of the Line before putting it into a Block definition, you can get its handle &lt;EM&gt;from within the Block&lt;/EM&gt;, it should be possible to find that again later by stepping through the Block definition's pieces.&amp;nbsp; HOWEVER, I find that with multiple coinciding objects [such as your Line along the edge of a Hatch pattern], you don't seem to get any choice about &lt;EM&gt;which object is seen&lt;/EM&gt;&amp;nbsp; when you pick on a location shared by more than one thing.&amp;nbsp; So I'm not sure how to get the handle of the nested Line in a reliable way.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Dec 2019 19:21:10 GMT</pubDate>
    <dc:creator>Kent1Cooper</dc:creator>
    <dc:date>2019-12-23T19:21:10Z</dc:date>
    <item>
      <title>Entity data without select, but I know the name</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9213379#M80296</link>
      <description>&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I access this entity data without select, but I know the name &amp;lt;Entity name: 1775e9eb1d0&amp;gt;, in this case it is a line. I need to reopen the drawing and read new end points coordinates.&lt;/P&gt;&lt;P&gt;There are more lines I this drawing too, i need looking for 2 of therm.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, will this entity always have this name in same drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Henrik&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 06:04:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9213379#M80296</guid>
      <dc:creator>Henrik_Lo</dc:creator>
      <dc:date>2019-12-20T06:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: Entity data without select, but I know the name</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9213418#M80297</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/251764"&gt;@Henrik_Lo&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I access this entity data without select, but I know the name &amp;lt;Entity name: 1775e9eb1d0&amp;gt;, in this case it is a line. I need to reopen the drawing and read new end points coordinates.&lt;/P&gt;&lt;P&gt;There are more lines I this drawing too, i need looking for 2 of therm.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By the way, will this entity always have this name in same drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I'll answer the second bit first. The entity will not have the same name in the same drawing. The only thing that can be guaranteed not to change is the entity handle within that drawing.&lt;/P&gt;&lt;P&gt;The entity handle can be obtained by selecting an entity using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(princ (cdr (assoc 5 (entget (car (entsel "\nSelect Entity : "))))))&lt;/PRE&gt;&lt;P&gt;To use the handle to re-find the entity use&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(setq ent (handent (getstring "\nEnter Entity Handle : ")))&lt;/PRE&gt;&lt;P&gt;the variable (ent) will then contain the entity you want.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 06:41:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9213418#M80297</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2019-12-20T06:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Entity data without select, but I know the name</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9213425#M80298</link>
      <description>&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;Thanks for helping me out, I will try work that way then.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Henrik&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 06:47:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9213425#M80298</guid>
      <dc:creator>Henrik_Lo</dc:creator>
      <dc:date>2019-12-20T06:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Entity data without select, but I know the name</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9213443#M80299</link>
      <description>&lt;P&gt;you might find this useful. It asks for the handle then zooms to the extents of that entity.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(defun c:zh ( / a_app e_str ll ur ent)
  (vl-load-com)
  (setq a_app (vlax-get-acad-object)
        e_str (getstring "\Enter Entity Handle : ")&lt;BR /&gt;        ent (handent e_str)
  );end_setq
  (vla-getboundingbox (vlax-ename-&amp;gt;vla-object ent) 'll 'ur)
  (vla-zoomwindow a_app ll ur)
);end_defun

&lt;/PRE&gt;&lt;P&gt;If you want to get the start and end points of a line just replace the last two (vla...) statements with the code you want&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 07:03:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9213443#M80299</guid>
      <dc:creator>dlanorh</dc:creator>
      <dc:date>2019-12-20T07:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Entity data without select, but I know the name</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9213453#M80300</link>
      <description>&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;yes, also a very handy tool, thangs.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Henrik&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 07:09:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9213453#M80300</guid>
      <dc:creator>Henrik_Lo</dc:creator>
      <dc:date>2019-12-20T07:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Entity data without select, but I know the name</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9214617#M80301</link>
      <description>&lt;P&gt;Zooming to it, if that's what you want to do, can be simpler:&lt;/P&gt;
&lt;PRE&gt;(defun C:ZH ()
  (command "_.zoom" "_object" (handent (getstring "\nHandle of object to Zoom to: ")) "")
)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2019 18:36:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9214617#M80301</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-12-20T18:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Entity data without select, but I know the name</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9216936#M80302</link>
      <description>&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Iam still struggling to be able to know start and endpoints as explained, i were explained &amp;nbsp;that &amp;nbsp;i could be sure regarding the entity handle were the same. But they are also change names each time I reopen this drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Iam use this drawing Prototyp_LISP, and need to use for prototype template, but I need to change some detailed by lisp, therefore I need to how the line names , see my enclosed prototype drawing and explain file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Henrik&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2019 09:21:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9216936#M80302</guid>
      <dc:creator>Henrik_Lo</dc:creator>
      <dc:date>2019-12-23T09:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Entity data without select, but I know the name</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9217358#M80303</link>
      <description>&lt;P&gt;As I can see , there are&amp;nbsp; only two block references, and such enty do not have any assoc 10 .&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you need to know te line from the leftmost point to the more rightmost point , it have to be do with the BOUNDING BOX method&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please see attached file&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2019 15:06:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9217358#M80303</guid>
      <dc:creator>devitg</dc:creator>
      <dc:date>2019-12-23T15:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Entity data without select, but I know the name</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9217449#M80304</link>
      <description>&lt;P&gt;Since the example drawing contains no top-level Line entities, it's impossible to get endpoints from them, but if the edges you point to in your image are what you're after, they might be extracted by digging into the ingredients of the Block definition, which is complicated.&amp;nbsp; If you save the entity &lt;EM&gt;handles&lt;/EM&gt;&amp;nbsp; from the Lines you want, before defining the Block that they become a part of, presumably a routine could open the Block definition in the Block table, and step through its pieces until it finds those handles, and get the endpoints of those Lines.&amp;nbsp; But I'm not sure how entity handles are affected by something being nested inside a Block definition.&amp;nbsp; But if that's a viable approach, what it will get will be coordinates &lt;EM&gt;relative to the Block's insertion point&lt;/EM&gt;, when the Block is at a scale factor of 1 and rotation of zero.&amp;nbsp; [That happens to be true in your sample drawing, but I assume it would not always be, or you wouldn't need to ask the question.]&amp;nbsp; The results would&amp;nbsp;&lt;EM&gt;not&lt;/EM&gt;&amp;nbsp; be in the current drawing's coordinates, so some kind of translation would be required if you want drawing coordinates of those endpoints.&amp;nbsp; It would need to account for where the insertion point is, and would get more complicated if there might be scale factors other than 1 or rotation other than zero degrees.&amp;nbsp; Is that what you are looking for?&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2019 16:21:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9217449#M80304</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-12-23T16:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Entity data without select, but I know the name</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9217524#M80305</link>
      <description>&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;Iam after the endpoint form the 2 lines, I need to make a automatic dimension I layout space, therefore I need the exact location to be able to do that. It sound to me that it is an impossible mission with this block, if this is right, I need to find another way to find them, but how.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Henrik&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2019 17:25:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9217524#M80305</guid>
      <dc:creator>Henrik_Lo</dc:creator>
      <dc:date>2019-12-23T17:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Entity data without select, but I know the name</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9217649#M80306</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp; But I'm not sure how entity handles are affected by something being nested inside a Block definition.&amp;nbsp; ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, I find in a quick experiment that when I check the handle of a Line, then include that Line in a Block definition, and Insert that Block, getting the entity data from the nested Line with&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;FONT color="#000000"&gt;&lt;STRONG&gt;(entget (car (nentsel)))&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;reveals that it now has a &lt;EM&gt;different&lt;/EM&gt;&amp;nbsp; handle.&amp;nbsp; However, when I close the drawing and re-open it, the nested Line's handle still has that same changed value.&amp;nbsp; And that's true in each occurrence of that Line nested in multiple Insertions of that Block.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So &lt;EM&gt;if&lt;/EM&gt;, rather than save the handle of the Line before putting it into a Block definition, you can get its handle &lt;EM&gt;from within the Block&lt;/EM&gt;, it should be possible to find that again later by stepping through the Block definition's pieces.&amp;nbsp; HOWEVER, I find that with multiple coinciding objects [such as your Line along the edge of a Hatch pattern], you don't seem to get any choice about &lt;EM&gt;which object is seen&lt;/EM&gt;&amp;nbsp; when you pick on a location shared by more than one thing.&amp;nbsp; So I'm not sure how to get the handle of the nested Line in a reliable way.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2019 19:21:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9217649#M80306</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-12-23T19:21:10Z</dc:date>
    </item>
    <item>
      <title>Re: Entity data without select, but I know the name</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9218150#M80307</link>
      <description>&lt;P&gt;HI Kent&lt;/P&gt;&lt;P&gt;I must tray to be more creative then, maybe place something in this 4 points on a layer i cans witch off and maybe find them trout that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Henrik&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2019 05:21:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/entity-data-without-select-but-i-know-the-name/m-p/9218150#M80307</guid>
      <dc:creator>Henrik_Lo</dc:creator>
      <dc:date>2019-12-24T05:21:33Z</dc:date>
    </item>
  </channel>
</rss>

