<?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: Need a lisp code to change the Dim Line Line Weight Property of a Leader in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8698564#M92673</link>
    <description>&lt;P&gt;Thanks Kent and Bee,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've been trying every combination under the sun to get that to work. When I changed it to 13, it worked perfectly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again, Guys!!&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2019 14:27:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-04-01T14:27:23Z</dc:date>
    <item>
      <title>Need a lisp code to change the Dim Line Line Weight Property of a Leader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8593581#M92662</link>
      <description>&lt;P&gt;I'm trying to create a small lisp routine to change the "Dim Line Lineweight" property of a group of Leaders on a drawing. The setting is located under properties in the Lines &amp;amp; Arrows section. I have the code I need to highlight all the leaders on a specific layer, but I cannot find the right code to change the line weight. Below is what I have so far. Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun c:Leader (/ ss)&lt;BR /&gt;(sssetfirst nil (ssget "_x" '((0 . "Leader")(8 . "TF_S_WELD SYMBOL"))))&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="properties.png" style="width: 358px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/602624i4B433104C04CAF17/image-size/large?v=v2&amp;amp;px=999" role="button" title="properties.png" alt="properties.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 18:31:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8593581#M92662</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-13T18:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need a lisp code to change the Dim Line Line Weight Property of a Leader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8593667#M92663</link>
      <description>&lt;P&gt;Perhaps something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:LeaderLW (/ ss lw i)
  
  (if (and (setq ss (ssget "_x" '((0 . "Leader"))))
	   (setq lw (getint "New LineWeight x100: "))
	   )
    (repeat (setq i (sslength ss))
      (setpropertyvalue (ssname ss (setq i (1- i))) "Dimlwd" lw)))
  (princ)
  )&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW If you need to set some other property, just use the following code to see the name.&lt;/P&gt;
&lt;PRE&gt;(dumpallproperties (car (entsel)))&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Feb 2019 19:06:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8593667#M92663</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2019-02-13T19:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need a lisp code to change the Dim Line Line Weight Property of a Leader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8593769#M92664</link>
      <description>&lt;P&gt;Thank you for the quick response. I just started learning lisp this morning, so I'm trying to understand what you have written.&lt;/P&gt;
&lt;P&gt;If i want my new line weight to be "bylayer", would I just replace this:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;"New LineWeight x100: "&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 19:34:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8593769#M92664</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-13T19:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need a lisp code to change the Dim Line Line Weight Property of a Leader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8593857#M92665</link>
      <description>&lt;P&gt;No no, this it just a prompt for the user. And it requires an integer from the user to set. Try: (getint "Set integer: ")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But while now you want to set a fix value, then it can be much simpler:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:LeaderLWByLayer (/ ss i)

  (if (setq ss (ssget "_x" '((0 . "Leader")(8 . "TF_S_WELD SYMBOL"))))
    (repeat (setq i (sslength ss))
      (setpropertyvalue (ssname ss (setq i (1- i))) "Dimlwd" &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;-1&lt;/STRONG&gt;&lt;/FONT&gt;)))
  (princ)
  )&lt;/PRE&gt;
&lt;P&gt;BTW The LineWeight property is a bit tricky. Try to copy that little snippet I added to the last post, set some LW to LEADER, run the code by copy-paste to command-line and watch the list of definition properties...&lt;/P&gt;
&lt;P&gt;The first thing you can notice is that the value of LW is 100 times higher in definition than you can see in Properties Palette. And it's an integer in fact. The second this is about &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;ByLayer&lt;/STRONG&gt; &lt;/FONT&gt;and ByBlock which are represented by &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;-1&lt;/FONT&gt;&lt;/STRONG&gt; or -2 value in definition..&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 20:11:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8593857#M92665</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2019-02-13T20:11:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need a lisp code to change the Dim Line Line Weight Property of a Leader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8594280#M92666</link>
      <description>&lt;P&gt;Thanks again, Bee!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm getting there, I think. I ran the code that you sent and it's telling me there is no function definition. Can you shed some light for me?&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 22:18:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8594280#M92666</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-13T22:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need a lisp code to change the Dim Line Line Weight Property of a Leader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8595274#M92667</link>
      <description>&lt;P&gt;The code is fine on my side. Which&amp;nbsp;ACAD&amp;nbsp; version you have? The (setpropertyvalue) is supported since AutoCAD 2011.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, let's try another approach. Even the simpler - using the AutoCAD's Dimoverride function.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:LeaderLWByLayer (/ ss)
  (if (setq ss (ssget "_x" '((0 . "Leader")(8 . "TF_S_WELD SYMBOL") )))
    (command "_.DIMOVERRIDE" "Dimlwd" -1 "" ss ""))
  (princ)
  )&lt;/PRE&gt;</description>
      <pubDate>Thu, 14 Feb 2019 09:20:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8595274#M92667</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2019-02-14T09:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Need a lisp code to change the Dim Line Line Weight Property of a Leader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8595727#M92668</link>
      <description>&lt;P&gt;Thank you. The code from yesterday works too. I was just keying it into the command line incorrectly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This has been a big help. I believe I can expand from here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Feb 2019 12:39:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8595727#M92668</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-14T12:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: Need a lisp code to change the Dim Line Line Weight Property of a Leader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8698449#M92669</link>
      <description>&lt;P&gt;Hi Bee,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Quick question... in the code that you provided, how would I assign a specific value for the lineweight? For example, in place of the &lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;-1&lt;/FONT&gt;&lt;/STRONG&gt;, I want to use 0.12mm thick for the line thickness.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;(defun c:LeaderLWByLayer (/ ss i)

  (if (setq ss (ssget "_x" '((0 . "Leader")(8 . "TF_S_WELD SYMBOL"))))
    (repeat (setq i (sslength ss))
      (setpropertyvalue (ssname ss (setq i (1- i))) "Dimlwd" &lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;-1&lt;/STRONG&gt;&lt;/FONT&gt;)))
  (princ)
  )&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 13:53:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8698449#M92669</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-01T13:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Need a lisp code to change the Dim Line Line Weight Property of a Leader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8698491#M92670</link>
      <description>&lt;P&gt;Change it to 12.&lt;/P&gt;
&lt;P&gt;It's stored as integers, 100 multiples.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 14:06:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8698491#M92670</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2019-04-01T14:06:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need a lisp code to change the Dim Line Line Weight Property of a Leader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8698523#M92671</link>
      <description>&lt;P&gt;You had mentioned that in a previous thread, so i tried it. But, I'm not having any luck getting it to make the change. The code I'm using is below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(defun c:LeaderLWByLayer4 (/ ss i)&lt;/P&gt;
&lt;P&gt;(if (setq ss (ssget "_x" '((0 . "Leader")(8 . "*"))))&lt;BR /&gt;(repeat (setq i (sslength ss))&lt;BR /&gt;(setpropertyvalue (ssname ss (setq i (1- i))) "Dimlwd" 12)))&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 14:17:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8698523#M92671</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-01T14:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Need a lisp code to change the Dim Line Line Weight Property of a Leader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8698548#M92672</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&amp;nbsp;how would I assign a specific value for the lineweight? For example, in place of the &lt;STRONG&gt;&lt;FONT color="#ff0000"&gt;-1&lt;/FONT&gt;&lt;/STRONG&gt;, I want to use 0.12mm thick for the line thickness.....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From HELP for the DIMLWD System Variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p"&gt;&lt;FONT color="#000000"&gt;Other valid values entered in hundredths of millimeters include 0, 5, 9, &lt;FONT color="#0000ff"&gt;13&lt;/FONT&gt;, 15, 18, 20, 25, 30, 35, 40, 50, 53, 60, 70, 80, 90, 100, 106, 120, 140, 158, 200, and 211.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="p"&gt;&lt;FONT color="#000000"&gt;All values must be entered in hundredths of millimeters. (Multiply a value by 2540 to convert values from inches to hundredths of millimeters.)&lt;/FONT&gt;&lt;/P&gt;
&lt;P class="p"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p"&gt;It looks like you'll have to settle for &lt;FONT color="#0000ff"&gt;0.13&lt;/FONT&gt;mm instead of 0.12mm.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 14:21:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8698548#M92672</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2019-04-01T14:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need a lisp code to change the Dim Line Line Weight Property of a Leader</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8698564#M92673</link>
      <description>&lt;P&gt;Thanks Kent and Bee,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've been trying every combination under the sun to get that to work. When I changed it to 13, it worked perfectly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks again, Guys!!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 14:27:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-code-to-change-the-dim-line-line-weight-property-of/m-p/8698564#M92673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-04-01T14:27:23Z</dc:date>
    </item>
  </channel>
</rss>

