<?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: Pressing &amp;quot;Enter&amp;quot; to open OLE Object in Host Application. in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pressing-quot-enter-quot-to-open-ole-object-in-host-application/m-p/12473694#M19838</link>
    <description>&lt;P&gt;hey there,&lt;/P&gt;&lt;P&gt;maybe this one helps&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:ole_open (/ ole_sset)
  (if (zerop (getvar 'pickfirst)) (setvar 'pickfirst 1))
  (if (setq ole_sset (ssget '((0 . "ole2frame"))))
      (foreach ole (vl-remove-if 'listp (mapcar 'cadr (ssnamex ole_sset)))
	(command-s "_oleopen" (cadr (sssetfirst nil (ssadd ole))))
      )
  )
  (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jan 2024 08:48:25 GMT</pubDate>
    <dc:creator>komondormrex</dc:creator>
    <dc:date>2024-01-03T08:48:25Z</dc:date>
    <item>
      <title>Pressing "Enter" to open OLE Object in Host Application.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pressing-quot-enter-quot-to-open-ole-object-in-host-application/m-p/12471501#M19837</link>
      <description>&lt;P&gt;Hey everyone,&lt;/P&gt;&lt;P&gt;So, to open OLE objects in their host applications, we usually do the whole deal of selecting the OLE object, right-clicking, hovering over OLE, and then choosing "Open." Or we can select the OLE object and type OLEOPEN and hit Enter/Space.&lt;/P&gt;&lt;P&gt;I'm wondering if there's a way, maybe with a macro or something, to make it simpler. Like, when I press Enter/Space in AutoCAD, it checks if there's an OLE object selected. If yes, it should just fire up the right host application.&lt;/P&gt;&lt;P&gt;I get it might not be a big deal for everyone, but I'm constantly dealing with OLE objects, especially from Excel, and I'm trying to cut down on clicks.&lt;/P&gt;&lt;P&gt;While I recognize the potential performance implications of having AutoCAD check for OLE objects every time Enter or Space is pressed, I consider this an experimental endeavor and would appreciate any suggestions or code snippets you might suggest.&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 05:39:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pressing-quot-enter-quot-to-open-ole-object-in-host-application/m-p/12471501#M19837</guid>
      <dc:creator>Yasir.Aman</dc:creator>
      <dc:date>2024-01-02T05:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Pressing "Enter" to open OLE Object in Host Application.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pressing-quot-enter-quot-to-open-ole-object-in-host-application/m-p/12473694#M19838</link>
      <description>&lt;P&gt;hey there,&lt;/P&gt;&lt;P&gt;maybe this one helps&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:ole_open (/ ole_sset)
  (if (zerop (getvar 'pickfirst)) (setvar 'pickfirst 1))
  (if (setq ole_sset (ssget '((0 . "ole2frame"))))
      (foreach ole (vl-remove-if 'listp (mapcar 'cadr (ssnamex ole_sset)))
	(command-s "_oleopen" (cadr (sssetfirst nil (ssadd ole))))
      )
  )
  (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jan 2024 08:48:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pressing-quot-enter-quot-to-open-ole-object-in-host-application/m-p/12473694#M19838</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2024-01-03T08:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: Pressing "Enter" to open OLE Object in Host Application.</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pressing-quot-enter-quot-to-open-ole-object-in-host-application/m-p/12475782#M19839</link>
      <description>&lt;P&gt;Big thanks &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13423916"&gt;@komondormrex&lt;/a&gt; for&amp;nbsp;your valuable input. This code is very effective at opening multiple OLE Objects at once in their respective host applications and will certainly prove useful for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, my initial question is a bit different. Picture this: usually, hitting Enter/Space in AutoCAD with no active command just repeats the last used command. Now, I want to OVERRIDE this behavior. When I hit Enter/Space without any command active, I want AutoCAD to be Sherlock Holmes &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;. It should check if there's an OLE OBJECT already selected. If yes, bam! Open it in its host application. If not, no drama, just replay the last used command as usual &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this clears up my original puzzle.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a ton once again!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2024 05:43:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pressing-quot-enter-quot-to-open-ole-object-in-host-application/m-p/12475782#M19839</guid>
      <dc:creator>Yasir.Aman</dc:creator>
      <dc:date>2024-01-04T05:43:19Z</dc:date>
    </item>
  </channel>
</rss>

