<?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 color to clipboard in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11960139#M30011</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13369015"&gt;@andrea_ricci-ext&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi, I wish to paste it in another software&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And what other software is that? And what in that software is the setting for and where will it be applied?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 May 2023 16:37:32 GMT</pubDate>
    <dc:creator>pendean</dc:creator>
    <dc:date>2023-05-12T16:37:32Z</dc:date>
    <item>
      <title>copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11959849#M30004</link>
      <description>&lt;P&gt;Is there any autolisp to copy the color to clipboard?&lt;/P&gt;&lt;P&gt;Ideally I wish: if bylayer→ layer's color, otherwise the object's color, acad code or RGB.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 14:25:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11959849#M30004</guid>
      <dc:creator>andrea_ricci-ext</dc:creator>
      <dc:date>2023-05-12T14:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11959916#M30005</link>
      <description>&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13369015"&gt;@andrea_ricci-ext&lt;/a&gt; what do you do with that information afterwards if I may ask?</description>
      <pubDate>Fri, 12 May 2023 14:52:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11959916#M30005</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2023-05-12T14:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11960016#M30006</link>
      <description>&lt;P&gt;Clipboard stuff is done via an HTML object.&amp;nbsp; -i.e.&amp;nbsp;&lt;SPAN&gt;(vlax-create-object "htmlfile")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tony Tanzillo had a nice writeup on TheSwamp about this subject (memory and leaks and stuff) which he gave a nice routine/method for clipboard access.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Michael Puckett also compiled a few routines in a discussion, on TheSwamp, with&amp;nbsp;&lt;SPAN&gt;Patrick_35 and XShrimp I have used as well for clipboard access.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 15:47:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11960016#M30006</guid>
      <dc:creator>john.kaulB9QW2</dc:creator>
      <dc:date>2023-05-12T15:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11960020#M30007</link>
      <description>&lt;P&gt;Combination of this code that selects the object and returns the color #&lt;BR /&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-color-number/td-p/8545039" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-get-color-number/td-p/8545039&lt;/A&gt;&lt;/P&gt;&lt;P&gt;and this subroutine&lt;/P&gt;&lt;PRE&gt;_SetClipBoardText&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;that sends it to the clipboard&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.cadtutor.net/forum/topic/62104-quick-lisp-to-put-of-objects-selected-to-the-clipboard/" target="_blank" rel="noopener"&gt;https://www.cadtutor.net/forum/topic/62104-quick-lisp-to-put-of-objects-selected-to-the-clipboard/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 15:49:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11960020#M30007</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2023-05-12T15:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11960030#M30008</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13369015"&gt;@andrea_ricci-ext&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is there any autolisp to copy the color to clipboard?&lt;/P&gt;
&lt;P&gt;Ideally I wish: if bylayer→ layer's color, otherwise the object's color, acad code or RGB. ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;EM&gt;Getting&lt;/EM&gt; it is not hard:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(defun C:eColor (/ ent)
  (setq
    ent (car (entsel "\nObject to get its color: "))
    eColor (getpropertyvalue ent "color")
    eColor
      (if (member eColor '(0 256))
        (cdr (assoc 62 (tblsearch "layer" (cdr (assoc 8 (entget ent))))))
        eColor
      )
  )
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That results in a &lt;EM&gt;text string&lt;/EM&gt; if it's a Truecolor object override, or an &lt;EM&gt;integer&lt;/EM&gt; if it's an index color, &lt;EM&gt;and&lt;/EM&gt; it seems if it's ByLayer/ByBlock and the &lt;EM&gt;Layer's&lt;/EM&gt; color is Truecolor [it gets "rounded" to the closest index color].&amp;nbsp; I'm not sure how to get the Truecolor numbers of the Layer color, which are similarly "rounded" in (tblsearch) and (entget (tblobjname)) results.&amp;nbsp; But they must be available -- the Layer Manager list shows them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Getting it to the clipboard is a little more complicated, but I agree -- how are you going to use the information?&amp;nbsp; That could affect what should be done with it.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 15:58:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11960030#M30008</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-05-12T15:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11960072#M30009</link>
      <description>Hi, I wish to paste it in another software&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 12 May 2023 16:13:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11960072#M30009</guid>
      <dc:creator>andrea_ricci-ext</dc:creator>
      <dc:date>2023-05-12T16:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11960090#M30010</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13369015"&gt;@andrea_ricci-ext&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;.... I wish to paste it in another software&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And in what form / format does that other software want it?&amp;nbsp; Does it know that in AutoCAD, simple integers [1 through 255, anyway] can represent colors -- 1 is red, 2 is yellow, etc.?&amp;nbsp; Would it want only 3-number RGB-style information, meaning that AutoCAD index colors need to be &lt;EM&gt;converted&lt;/EM&gt; to equivalent RGB values?&amp;nbsp; And with RGB values, does it want a comma-delimited text string, or something like an AutoLisp list of numbers, or...?&amp;nbsp; Etc., etc.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 16:23:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11960090#M30010</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-05-12T16:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11960139#M30011</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/13369015"&gt;@andrea_ricci-ext&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi, I wish to paste it in another software&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And what other software is that? And what in that software is the setting for and where will it be applied?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 16:37:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11960139#M30011</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2023-05-12T16:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11961198#M30012</link>
      <description>&lt;P&gt;the "paste to" software is not defined. Sometimes is a blog post, sometimes is inside autocad itself. So maybe it would be interesting an easy-to-find spot in the code to easilly set the spacer (space, comma and so on).&lt;/P&gt;&lt;P&gt;Maybe it would be usefull to have separate commands as copyToACI, copyToRGBspace, copyToRGBcomma and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 13 May 2023 07:26:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11961198#M30012</guid>
      <dc:creator>andrea_ricci-ext</dc:creator>
      <dc:date>2023-05-13T07:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11963259#M30013</link>
      <description>&lt;P&gt;Am I interpreting this correctly that you want to copy text that has a color like red so when you paste it to some where else the text keeps the color, the reason I ask this just getting the COLOR will return just numbers like 1, 123,56,67 for rgb. If you copyclip a text it remains in the clipboard as a Autocad text object so trying to paste to some where else tends to not work. Like mtext each software has some form of coding to say do this for a text color. It may be simple like a bold is \b. The same as enter code is [code] in a lot of forums, the end of code is [/code]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some one may know more about BBC coding.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 00:21:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11963259#M30013</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2023-05-15T00:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11963678#M30014</link>
      <description>correct, I wish simple text as 123 for acad color or 0,120,226 for RGB (eventually with the option for different separators as space or semicolon).&lt;BR /&gt;I run in this need when I was writing some blog post in markdown, but also when I wanted to put the color code in the dwg itself (as a text).</description>
      <pubDate>Mon, 15 May 2023 06:18:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11963678#M30014</guid>
      <dc:creator>andrea_ricci-ext</dc:creator>
      <dc:date>2023-05-15T06:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11964023#M30015</link>
      <description>&lt;P&gt;ladies first.&lt;/P&gt;&lt;P&gt;hey Andrea,&lt;/P&gt;&lt;P&gt;check the code attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 12:04:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11964023#M30015</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2023-05-15T12:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11964134#M30016</link>
      <description>that's great!&lt;BR /&gt;Thank you very much. I'm trying reading the code: very complicated for my knowledge.&lt;BR /&gt;</description>
      <pubDate>Mon, 15 May 2023 10:23:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11964134#M30016</guid>
      <dc:creator>andrea_ricci-ext</dc:creator>
      <dc:date>2023-05-15T10:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11964324#M30017</link>
      <description>My I publish your lisp in my blog, in the "tools" section? Maybe you wish to add credits in the head of the lisp?&lt;BR /&gt;&lt;A href="https://andrearicci.it/howtocad/" target="_blank"&gt;https://andrearicci.it/howtocad/&lt;/A&gt;&lt;BR /&gt;Thank you again</description>
      <pubDate>Mon, 15 May 2023 11:57:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11964324#M30017</guid>
      <dc:creator>andrea_ricci-ext</dc:creator>
      <dc:date>2023-05-15T11:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11964345#M30018</link>
      <description>&lt;P&gt;sure you may. i added credits to the code.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 12:05:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11964345#M30018</guid>
      <dc:creator>komondormrex</dc:creator>
      <dc:date>2023-05-15T12:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: copy color to clipboard</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11964398#M30019</link>
      <description>thank you again</description>
      <pubDate>Mon, 15 May 2023 12:27:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/copy-color-to-clipboard/m-p/11964398#M30019</guid>
      <dc:creator>andrea_ricci-ext</dc:creator>
      <dc:date>2023-05-15T12:27:34Z</dc:date>
    </item>
  </channel>
</rss>

