<?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: Copy Attribute to clipboard in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324246#M42810</link>
    <description>&lt;P&gt;Thank you so much for getting back. Here's the details and a sample drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on Wiring Schematics. The wires need to be associated with the Source and Destination connectors. The connectors have attribute Ref_Des (shown in green). The wires have attributes SOURCE_REFDES and DEST_REFDES. The connector attribute needs to be copied to the wires SOURCE_REFDES or DEST_REFDES respectively.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As noted below, I'm currently copying the connector REF_DES via Enhanced Att Editor, selecting all applicable wires, and pasting the value via the properties window.&lt;/P&gt;</description>
    <pubDate>Wed, 27 Jul 2022 18:56:00 GMT</pubDate>
    <dc:creator>jason.lEZRWT</dc:creator>
    <dc:date>2022-07-27T18:56:00Z</dc:date>
    <item>
      <title>Copy Attribute to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324155#M42807</link>
      <description>&lt;P&gt;Hi All. First time poster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for something I feel should be pretty easy, but just not finding it. I need to get an Attribute value from one block and paste it into multiple different blocks (different TAG).&lt;/P&gt;&lt;P&gt;Currently routine is:&lt;/P&gt;&lt;P&gt;- Double Click Source Attribute&lt;/P&gt;&lt;P&gt;- Ctrl C&lt;/P&gt;&lt;P&gt;- Mouse over to Enhanced Att Editor&lt;/P&gt;&lt;P&gt;- Click OK to close&lt;/P&gt;&lt;P&gt;- Select all destination Blocks&lt;/P&gt;&lt;P&gt;- Find appropriate Att in the Propeties&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Ctrl V&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;At the very least I'd like to be able to:&lt;/P&gt;&lt;P&gt;- Select tool (or type command),&lt;/P&gt;&lt;P&gt;- Click on any visible Attribute and have its value copied to the clipboard&lt;/P&gt;&lt;P&gt;- Select all destination Blocks&lt;/P&gt;&lt;P&gt;- Find appropriate Att in the Propeties&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Ctrl V&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm mostly just trying to eliminate the whole Enhanced Att Editor part, but if anyone has any better suggestions, I'm all ears. I have to do this a lot and any eliminated clicks, keys, or mice are helpful.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be super awesome to eliminate the Ctrl V at the end but I'm sure that would kick up the complexity a bit.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 18:10:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324155#M42807</guid>
      <dc:creator>jason.lEZRWT</dc:creator>
      <dc:date>2022-07-27T18:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Attribute to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324203#M42808</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/12606152"&gt;@jason.lEZRWT&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It would be super awesome to eliminate the Ctrl V at the end but I'm sure that would kick up the complexity a bit.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT size="3"&gt;If the target blocks are on the same drawing, there would be no need to Ctrl C and Ctrl V at all. It couldn't be that hard to write a code that is suited to your requirements. But what do you think is missing here? If we could only see a sample drawing....&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="3"&gt;A simple code could be like this&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun c:tf (/ astc)
  	(vl-load-com)
 	(setq astc (vla-get-textstring
    	(vlax-ename-&amp;gt;vla-object
      		(car (nentsel "\nSelect Text: "))))
	      
	      )
  (while (setq trgt (vlax-ename-&amp;gt;vla-object (car (nentsel "\nText to change: "))))
    	
  	(vlax-put-property trgt 'TEXTSTRING astc)
    		)
  )&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 18:34:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324203#M42808</guid>
      <dc:creator>pbejse</dc:creator>
      <dc:date>2022-07-27T18:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Attribute to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324240#M42809</link>
      <description>&lt;P&gt;It doesn't eliminate the Ctrl+V part, but at least you can skip the Attribute-editor middle-man, this way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier" color="#000000"&gt;&lt;STRONG&gt;(cdr (assoc 1 (entget (car (nentsel "\nSelect Attribute to get value from: ")))))&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;That will put the contents in the command line, whence you can Ctrl+C copy it for pasting in at the Properties palette.&amp;nbsp; I'm sure there's a way to feed it to the clipboard for you instead of [or in addition to] the command line [so you don't need to do the Ctrl+C part] -- I'll let you Search for that.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;EDIT:&lt;/FONT&gt;&lt;/STRONG&gt;&amp;nbsp; For brevity, at least, &lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pasteclip-and-copyclip-commands/m-p/10075852/highlight/true#M410731" target="_blank" rel="noopener"&gt;&amp;gt;this&amp;lt;&lt;/A&gt; looks promising as a way to do that.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 19:00:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324240#M42809</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2022-07-27T19:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Attribute to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324246#M42810</link>
      <description>&lt;P&gt;Thank you so much for getting back. Here's the details and a sample drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on Wiring Schematics. The wires need to be associated with the Source and Destination connectors. The connectors have attribute Ref_Des (shown in green). The wires have attributes SOURCE_REFDES and DEST_REFDES. The connector attribute needs to be copied to the wires SOURCE_REFDES or DEST_REFDES respectively.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As noted below, I'm currently copying the connector REF_DES via Enhanced Att Editor, selecting all applicable wires, and pasting the value via the properties window.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 18:56:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324246#M42810</guid>
      <dc:creator>jason.lEZRWT</dc:creator>
      <dc:date>2022-07-27T18:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Attribute to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324294#M42811</link>
      <description>&lt;P&gt;Current Routine. Didn't note before that there's some ESCs in there too.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 19:20:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324294#M42811</guid>
      <dc:creator>jason.lEZRWT</dc:creator>
      <dc:date>2022-07-27T19:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Attribute to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324298#M42812</link>
      <description>&lt;P&gt;Select the wires first, then pick a source and desc. Or just one of them, and RT click for the other....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(vl-load-com)

(defun c:WC ( / w s d i e)

  (princ "Select wires, ")
  (setq w (ssget '((0 . "INSERT"))))
  (and (setq s (car (nentsel "\nSource: ")))
       (setq s (cdr (assoc 1 (entget s)))))
  (and (setq d (car (nentsel "\nDestination: ")))
       (setq d (cdr (assoc 1 (entget d)))))

  (if (and w (or s d))
    (repeat (setq i (sslength w))
      (setq e (ssname w (setq i (1- i))))
      (and s (vl-catch-all-apply 'setpropertyvalue (list e "SOURCE_REFDES" s)))
      (and d (vl-catch-all-apply 'setpropertyvalue (list e "DEST_REFDES" d)))))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 20:05:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324298#M42812</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2022-07-27T20:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Attribute to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324394#M42813</link>
      <description>&lt;P&gt;Holy Smokes! That's absolutely perfect! Thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 20:02:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324394#M42813</guid>
      <dc:creator>jason.lEZRWT</dc:creator>
      <dc:date>2022-07-27T20:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Attribute to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324408#M42814</link>
      <description>&lt;P&gt;FYI about your original workflow.&lt;/P&gt;
&lt;P&gt;Hold CTRL when double-clicking on att to get contextual att editor... a bit faster.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 20:14:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324408#M42814</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2022-07-27T20:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Attribute to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324452#M42815</link>
      <description>&lt;P&gt;Just learned that trick this morning. It's a good tip. I need to get in the habit of that one. Just incorporated you program. Works like a charm! Saves a ton of time.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 20:44:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324452#M42815</guid>
      <dc:creator>jason.lEZRWT</dc:creator>
      <dc:date>2022-07-27T20:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Attribute to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324936#M42816</link>
      <description>&lt;P&gt;Why not do this as 1 line no need for "and",&amp;nbsp; the description could be more like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(setq s (cdr (assoc 1 (entget (car (nentsel "\nPick Source Attribute: "))))))&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 03:40:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11324936#M42816</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-07-28T03:40:18Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Attribute to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11325225#M42817</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Why not do this as 1 line no need for "and",&amp;nbsp; the description could be more like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(setq s (cdr (assoc 1 (entget (car (nentsel "\nPick Source Attribute: "))))))&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The AND prevents the ENTGET from failing when nothing was selected.&lt;/P&gt;
&lt;P&gt;Yes, could be more descriptive but why?! It's a very specific tool for this job only.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jul 2022 07:13:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11325225#M42817</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2022-07-28T07:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Attribute to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11327468#M42818</link>
      <description>&lt;P&gt;I try to always be descriptive for picks after all the next time it gets ran could be months away and user forgot what to do. Also doing paid work I never know who is going to be using it, including the new kid that started yesterday. I had 8 staff and would occasionally get "how do I run it again"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any one also reading code can follow the sequence pretty easy.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jul 2022 04:31:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11327468#M42818</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2022-07-29T04:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Copy Attribute to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11330524#M42819</link>
      <description>&lt;P&gt;Maybe you will also find useful the routine I found &amp;gt;&lt;A href="http://www.lee-mac.com/copytext.html" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&amp;lt;. It copies the text content between pointed objects.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Jul 2022 19:35:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-attribute-to-clipboard/m-p/11330524#M42819</guid>
      <dc:creator>andkal</dc:creator>
      <dc:date>2022-07-30T19:35:28Z</dc:date>
    </item>
  </channel>
</rss>

