<?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: Make Styles Current in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12207491#M24818</link>
    <description>&lt;P&gt;i was able to get it to work how i need. but as soon as you fix one problem, you run into another.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how would i add the ability to make the selected objects layer and color current as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:MCS ()
  (setq cmde (getvar 'cmdecho)) ; Store original command echo state
  (setvar 'cmdecho 0) ; Turn off command echo

  (setq ent (car (entsel "\nSelect an Object to Match Current Styles: ")))

  (setq typ (cdr (assoc 0 (entget ent)))) ; Get the type of the selected entity

  (cond
    ((member typ '("LWPOLYLINE" "POLYLINE"))
      (setvar 'plinetype (cdr (assoc 6 (entget ent))))
      (if (= (getvar 'plinetype) 0)
        (setvar 'plinetype 2))
    )
    ((= typ "INSERT")
      (setq S1 (cdr (assoc 2 (entget ent))))
      (setvar 'insname S1)
    )
    ((= typ "MTEXT")
      (setq S1 (cdr (assoc 7 (entget ent))))
      (setvar 'textstyle S1)
      (setq R1 (cdr (assoc 40 (tblsearch "style" S1))))
      (if (/= R1 0)
        (setvar 'textsize R1))
    )
    ((= typ "DIMENSION")
      (setq S1 (cdr (assoc 3 (entget ent))))
      (setvar 'cmdecho cmde)
      (command "_.dimstyle" "r" S1)
    )
;
    ((= typ "LEADER")
      (setq S1 (cdr (assoc 3 (entget ent))))
      (setvar 'cmdecho cmde)
      (command "_.dimstyle" "r" S1)
    )
    ((= typ "MULTILEADER")
      (setq S1 (cdr (assoc 2 (entget ent))))
      (setvar 'cmdecho 1)
      (setvar 'cmleaderstyle (vla-get-Stylename (vlax-ename-&amp;gt;vla-object ent)))
      (prompt (strcat "\nSet current MultiLeader Style to \"" S1 "\".\n"))
      (command "_.mleader")
    )
    ((= typ "TEXT")
      (setq S1 (cdr (assoc 7 (entget ent))))
      (setvar 'textstyle S1)
      (setq R1 (cdr (assoc 40 (tblsearch "style" S1))))
      (setq R2 (cdr (assoc 41 (tblsearch "style" S1))))
      (setvar 'textsize R1)
      (setvar 'hpspace R2)
      (setvar 'hpdouble (cdr (assoc 1070 (cadr (assoc -3 (entget ent '("ACAD")))))))
    )
    ((= typ "HATCH")
      (setq S1 (cdr (assoc 2 (entget ent))))
      (setvar 'hpname S1)
      (setq R1 (cdr (assoc 41 (tblsearch "style" S1))))
      (setq R2 (cdr (assoc 52 (entget ent))))
      (setvar 'hpscale R1)
      (setvar 'hpang R2)
      (setvar 'hpassoc (cdr (assoc 97 (entget ent))))
    )
    ((= typ "MINSERT")
      (setq S1 (cdr (assoc 2 (entget ent))))
      (setvar 'insname S1)
    )
    ((= typ "MTEXT")
      (setq S1 (cdr (assoc 7 (entget ent))))
      (setq S2 (cdr (assoc 50 (entget ent))))
      (setvar 'textstyle S1)
      (setvar 'textsize S2)
      (setvar 'tspacetype (cdr (assoc 73 (entget ent))))
      (setvar 'tspacefac (cdr (assoc 44 (entget ent))))
      (setvar 'cmdecho cmde)
      (command "_.mtext" "r" S1)
    )
    (t
      (prompt "\nSelected object type is not supported for style matching.")
    )
  )

  (setvar 'cmdecho cmde) ; Restore original command echo state
  (princ)
)

(princ)&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 30 Aug 2023 17:08:27 GMT</pubDate>
    <dc:creator>venturini.anthony</dc:creator>
    <dc:date>2023-08-30T17:08:27Z</dc:date>
    <item>
      <title>Make Styles Current</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204353#M24807</link>
      <description>&lt;P&gt;Im looking for a lisp that will make the styles of a selected object current. ive found this but it only works on dimensions. is there a way i can get it to work on leaders, multileaders, mtext, text, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun C:matchstyle (/ Res Elist Ent flag Style)&lt;BR /&gt;(setq flag 1)&lt;BR /&gt;(while flag&lt;BR /&gt;(while (null(setq Res (entsel "\nSelect a dimension or leader: "))))&lt;BR /&gt;(setq Elist (entget (car Res)))&lt;BR /&gt;(if (member (cdr (assoc 0 Elist)) '("DIMENSION" "LEADER"))&lt;BR /&gt;(setq flag nil)&lt;BR /&gt;);if&lt;BR /&gt;);while&lt;BR /&gt;(setq Style (cdr (assoc 3 Elist)))&lt;BR /&gt;(setvar 'clayer (cdr (assoc 8 Elist)))&lt;BR /&gt;(if (wcmatch Style "*$*")&lt;BR /&gt;(setq Style (substr Style 1 (- (strlen Style) 2))))&lt;BR /&gt;(setvar "nomutt" 1) (setvar "cmdecho" 0)&lt;BR /&gt;(command "dimstyle" "r" Style)&lt;BR /&gt;(setvar "nomutt" 0) (setvar "cmdecho" 1)&lt;BR /&gt;(princ (strcat "\n" style " is now the current DIMENSION style."))&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 14:49:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204353#M24807</guid>
      <dc:creator>venturini.anthony</dc:creator>
      <dc:date>2023-08-29T14:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Make Styles Current</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204465#M24808</link>
      <description>Leaders follow DIMSTYLE settings: so you just want it to select that dimstyle, you know, like your LISP already does. Are you wanting a different behavior?&lt;BR /&gt;&lt;BR /&gt;What about...&lt;BR /&gt;MTEXT: what settings do you want to match there exactly? Or do you just mean the STYLE being used? or overrides (and which ones) ? Width? line Spacing? More? less? CAPS? no Caps? Columns?&lt;BR /&gt;&lt;BR /&gt;TEXT: same, which settings? Style? Justification? More? Less?</description>
      <pubDate>Tue, 29 Aug 2023 15:24:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204465#M24808</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2023-08-29T15:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Make Styles Current</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204491#M24809</link>
      <description>&lt;P&gt;I just want styles matched for text and mtext. And I don't care about it working on leaders I want to match multileader styles.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 15:30:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204491#M24809</guid>
      <dc:creator>venturini.anthony</dc:creator>
      <dc:date>2023-08-29T15:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: Make Styles Current</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204504#M24810</link>
      <description>&lt;P&gt;I have integrated buttons... see if this help. It match the style if something is pre-selected. If not, it goes to the dialog.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;; ----
(defun c:DimStyleButton ( / ent obj val)
  
  (if (not (ssget "_I"))
    (progn
      (initcommandversion)
      (command "_.DIMSTYLE"))
    (and
      (setq ent (ssname (ssget "_I") 0))
      (or (= "DIMENSION" (cdr (assoc 0 (entget ent))))
	  (prompt "\nError: Selected object is not dimension!"))
      (setq obj (vlax-ename-&amp;gt;vla-object ent))
      (vlax-property-available-p obj 'StyleName T)
      (setq val (vlax-get-property obj 'StyleName))
      (vl-cmdf "_.-DIMSTYLE" "_R" val)
      (princ (strcat "\nCurrent dimstyle: " val))
      (sssetfirst nil nil)))
  (princ)
  )

; ----
(defun c:MleaderStyleButton ( / ent obj val)
  
  (if (not (ssget "_I"))
    (command "_.MLEADERSTYLE")
    (and
      (setq ent (ssname (ssget "_I") 0))
      (or (= "MULTILEADER" (cdr (assoc 0 (entget ent))))
	  (prompt "\nError: Selected object is not multileader!"))
      (setq obj (vlax-ename-&amp;gt;vla-object ent))
      (vlax-property-available-p obj 'StyleName T)
      (setq val (vlax-get-property obj 'StyleName))
      (setvar 'CMLEADERSTYLE val)
      (princ (strcat "\nCurrent mleaderstyle: " val))
      (sssetfirst nil nil)))
  (princ)
  )

; ----
(defun c:TextStyleButton ( / ent obj prp typ val)
  
  (if (not (ssget "_I"))
    (progn
      (initdia)
      (command "_.STYLE"))
    (and
      (setq ent (ssname (ssget "_I") 0))
      (setq typ (cdr (assoc 0 (entget ent))))
      (setq prp (cond ((= typ "DIMENSION")	'TextStyle)
		      ((= typ "MULTILEADER")	'TextStyleName)
		      (T 			'StyleName)))
      (setq obj (vlax-ename-&amp;gt;vla-object ent))
      (or (vlax-property-available-p obj prp T)
	  (prompt "\nError: Selected wrong entity. The style property isn't available!"))
      (setq val (vlax-get-property obj prp))
      (setvar 'TEXTSTYLE val)
      (princ (strcat "\nCurrent textstyle: " val))
      (sssetfirst nil nil)))
  (princ)
  )
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 15:37:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204504#M24810</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-08-29T15:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: Make Styles Current</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204510#M24811</link>
      <description>&lt;P&gt;Or this one. Couldn't find it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 15:39:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204510#M24811</guid>
      <dc:creator>ВeekeeCZ</dc:creator>
      <dc:date>2023-08-29T15:39:55Z</dc:date>
    </item>
    <item>
      <title>Re: Make Styles Current</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204583#M24812</link>
      <description>&lt;P&gt;this is almost exactly what i need. it does the job, but is there a way you could have it so all you need to do it type the command and then select the object? id rather have it more automatic and not have to select if im trying to match the multileader style or the text style. could it just know what i selected and run based off that and not the user input of multileader, text, or dimension?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 16:02:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204583#M24812</guid>
      <dc:creator>venturini.anthony</dc:creator>
      <dc:date>2023-08-29T16:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Make Styles Current</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204656#M24813</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7221773"&gt;@venturini.anthony&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... is there a way you could have it so all you need to do it type the command and then select the object? id rather have it more automatic and not have to select if im trying to match the multileader style or the text style. could it just know what i selected and run based off that and not the user input of multileader, text, or dimension?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The &lt;STRONG&gt;MM&lt;/STRONG&gt; command in &lt;STRONG&gt;MakeMore.lsp&lt;/STRONG&gt; [EDIT: attached] does that.&amp;nbsp; It sets the Style [and Layer and certain other properties] of the selected object for Text/Mtext/Dimensions/Multilines/MultiLeaders/Hatch patterns, and a lot of other properties about a lot of other kinds of things, and calls up the appropriate command for you or offers options when there is more than one command that can make the selected object.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 16:33:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204656#M24813</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-08-29T16:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Make Styles Current</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204727#M24814</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;Sort of like &lt;STRONG&gt;&lt;U&gt;&lt;A href="https://www.google.com/search?q=autocad+addselected+command%20" target="_blank" rel="noopener"&gt;ADDSELECTED&lt;/A&gt; &lt;/U&gt;&lt;/STRONG&gt;command in AutoCAD but on steroids by defaulting every property to the object as well. Nice.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 16:52:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204727#M24814</guid>
      <dc:creator>pendean</dc:creator>
      <dc:date>2023-08-29T16:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Make Styles Current</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204781#M24815</link>
      <description>&lt;P&gt;i modified the make more command for my needs, but i cant get the dimensions to work. any ideas on why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(defun c:SetStyles ()&lt;BR /&gt;(setq cmde (getvar 'cmdecho)) ; Store original command echo state&lt;BR /&gt;(setvar 'cmdecho 0) ; Turn off command echo&lt;/P&gt;&lt;P&gt;(setq ent (car (entsel "\nSelect an object to match styles: ")))&lt;/P&gt;&lt;P&gt;(setq typ (cdr (assoc 0 (entget ent)))) ; Get the type of the selected entity&lt;/P&gt;&lt;P&gt;(cond&lt;BR /&gt;((member typ '("LWPOLYLINE" "POLYLINE"))&lt;BR /&gt;(setvar 'plinetype (cdr (assoc 6 (entget ent))))&lt;BR /&gt;(if (= (getvar 'plinetype) 0)&lt;BR /&gt;(setvar 'plinetype 2))&lt;BR /&gt;)&lt;BR /&gt;((= typ "INSERT")&lt;BR /&gt;(setq S1 (cdr (assoc 2 (entget ent))))&lt;BR /&gt;(setvar 'insname S1)&lt;BR /&gt;)&lt;BR /&gt;((= typ "MTEXT")&lt;BR /&gt;(setq S1 (cdr (assoc 7 (entget ent))))&lt;BR /&gt;(setvar 'textstyle S1)&lt;BR /&gt;(setq R1 (cdr (assoc 40 (tblsearch "style" S1))))&lt;BR /&gt;(if (/= R1 0)&lt;BR /&gt;(setvar 'textsize R1))&lt;BR /&gt;)&lt;BR /&gt;((= typ "DIMENSION")&lt;BR /&gt;(setq dimStyleName (cdr (assoc 3 (entget ent))))&lt;BR /&gt;(if (tblsearch "dimstyle" dimStyleName)&lt;BR /&gt;(progn&lt;BR /&gt;(setvar 'dimstyle dimStyleName)&lt;BR /&gt;(setq dimTextSize (cdr (assoc 40 (tblsearch "style" dimStyleName))))&lt;BR /&gt;(if (/= dimTextSize 0)&lt;BR /&gt;(setvar 'dimtxt dimTextSize))&lt;BR /&gt;)&lt;BR /&gt;(prompt (strcat "\nDimension style \"" dimStyleName "\" does not exist."))&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;((= typ "LEADER")&lt;BR /&gt;(setq S1 (cdr (assoc 3 (entget ent))))&lt;BR /&gt;(setvar 'cmdecho cmde)&lt;BR /&gt;(command "_.dimstyle" "r" S1)&lt;BR /&gt;)&lt;BR /&gt;((= typ "MULTILEADER")&lt;BR /&gt;(setq S1 (cdr (assoc 2 (entget ent))))&lt;BR /&gt;(setvar 'cmdecho 1)&lt;BR /&gt;(setvar 'cmleaderstyle (vla-get-Stylename (vlax-ename-&amp;gt;vla-object ent)))&lt;BR /&gt;(prompt (strcat "\nSet current MultiLeader Style to \"" S1 "\".\n"))&lt;BR /&gt;(command "_.mleader")&lt;BR /&gt;)&lt;BR /&gt;((= typ "TEXT")&lt;BR /&gt;(setq S1 (cdr (assoc 7 (entget ent))))&lt;BR /&gt;(setvar 'textstyle S1)&lt;BR /&gt;(setq R1 (cdr (assoc 40 (tblsearch "style" S1))))&lt;BR /&gt;(setq R2 (cdr (assoc 41 (tblsearch "style" S1))))&lt;BR /&gt;(setvar 'textsize R1)&lt;BR /&gt;(setvar 'hpspace R2)&lt;BR /&gt;(setvar 'hpdouble (cdr (assoc 1070 (cadr (assoc -3 (entget ent '("ACAD")))))))&lt;BR /&gt;)&lt;BR /&gt;((= typ "HATCH")&lt;BR /&gt;(setq S1 (cdr (assoc 2 (entget ent))))&lt;BR /&gt;(setvar 'hpname S1)&lt;BR /&gt;(setq R1 (cdr (assoc 41 (tblsearch "style" S1))))&lt;BR /&gt;(setq R2 (cdr (assoc 52 (entget ent))))&lt;BR /&gt;(setvar 'hpscale R1)&lt;BR /&gt;(setvar 'hpang R2)&lt;BR /&gt;(setvar 'hpassoc (cdr (assoc 97 (entget ent))))&lt;BR /&gt;)&lt;BR /&gt;((= typ "MINSERT")&lt;BR /&gt;(setq S1 (cdr (assoc 2 (entget ent))))&lt;BR /&gt;(setvar 'insname S1)&lt;BR /&gt;)&lt;BR /&gt;((= typ "MTEXT")&lt;BR /&gt;(setq S1 (cdr (assoc 7 (entget ent))))&lt;BR /&gt;(setq S2 (cdr (assoc 50 (entget ent))))&lt;BR /&gt;(setvar 'textstyle S1)&lt;BR /&gt;(setvar 'textsize S2)&lt;BR /&gt;(setvar 'tspacetype (cdr (assoc 73 (entget ent))))&lt;BR /&gt;(setvar 'tspacefac (cdr (assoc 44 (entget ent))))&lt;BR /&gt;(setvar 'cmdecho cmde)&lt;BR /&gt;(command "_.mtext" "r" S1)&lt;BR /&gt;)&lt;BR /&gt;(t&lt;BR /&gt;(prompt "\nSelected object type is not supported for style matching.")&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;(setvar 'cmdecho cmde) ; Restore original command echo state&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;(princ)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 17:13:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204781#M24815</guid>
      <dc:creator>venturini.anthony</dc:creator>
      <dc:date>2023-08-29T17:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Make Styles Current</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204811#M24816</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/37212"&gt;@pendean&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... Sort of like &lt;STRONG&gt;&lt;U&gt;&lt;A href="https://www.google.com/search?q=autocad+addselected+command%20" target="_blank" rel="noopener"&gt;ADDSELECTED&lt;/A&gt; &lt;/U&gt;&lt;/STRONG&gt;command in AutoCAD ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, though it predates ADDSELECTED, and is far more sophisticated.&amp;nbsp; The best example of that is what happens when you select a LWPolyline.&amp;nbsp; ADDSELECTED just sets the Layer and starts a basic PLINE command, regardless.&amp;nbsp; But MM recognizes that &lt;EM&gt;there are lots of commands that result in LWPolylines&lt;/EM&gt;, and offers them to choose from.&amp;nbsp; If the selected one has certain recognizable characteristics [it recognizes those made with RECTANG, POLYGON, DONUT, REVCLOUD if not since altered], it offers the command that is likely to have been what they were drawn with, as a default.&amp;nbsp; And if the selected one has &lt;EM&gt;global width&lt;/EM&gt;, it uses that [ADDSELECTED just uses the current width setting].&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I continue to tweak it occasionally, most recently to add MultiLeaders [I'm still pondering including the option of ML;EADEREDIT in case what you want to Make More of is additional Leader(s) on the selected MLeader, not another new one].&amp;nbsp; Also thinking about other things that didn't exist back when it was first written, such as ARRAY &lt;EM&gt;objects&lt;/EM&gt; from Associative use of ARRAY, Dynamic Blocks, etc.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 17:26:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204811#M24816</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-08-29T17:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Make Styles Current</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204823#M24817</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7221773"&gt;@venturini.anthony&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;i modified the make more command for my needs, but i cant get the dimensions to work. any ideas on why?&lt;/P&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;(setvar 'dimstyle dimStyleName)&lt;BR /&gt;....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For whatever inexplicable reason, DIMSTYLE is a &lt;STRONG&gt;&lt;EM&gt;Read-Only&lt;/EM&gt;&lt;/STRONG&gt; System Variable.&amp;nbsp; You can't set it with&lt;STRONG&gt;&lt;FONT face="courier new,courier" color="#000000"&gt; (setvar)&lt;/FONT&gt;&lt;/STRONG&gt;, but must use the &lt;STRONG&gt;DIMSTYLE&lt;/STRONG&gt; &lt;EM&gt;command&lt;/EM&gt;&amp;nbsp;and its &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;R&lt;/FONT&gt;estore&lt;/STRONG&gt; option [that's what MM does].&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 17:32:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12204823#M24817</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-08-29T17:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: Make Styles Current</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12207491#M24818</link>
      <description>&lt;P&gt;i was able to get it to work how i need. but as soon as you fix one problem, you run into another.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;how would i add the ability to make the selected objects layer and color current as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:MCS ()
  (setq cmde (getvar 'cmdecho)) ; Store original command echo state
  (setvar 'cmdecho 0) ; Turn off command echo

  (setq ent (car (entsel "\nSelect an Object to Match Current Styles: ")))

  (setq typ (cdr (assoc 0 (entget ent)))) ; Get the type of the selected entity

  (cond
    ((member typ '("LWPOLYLINE" "POLYLINE"))
      (setvar 'plinetype (cdr (assoc 6 (entget ent))))
      (if (= (getvar 'plinetype) 0)
        (setvar 'plinetype 2))
    )
    ((= typ "INSERT")
      (setq S1 (cdr (assoc 2 (entget ent))))
      (setvar 'insname S1)
    )
    ((= typ "MTEXT")
      (setq S1 (cdr (assoc 7 (entget ent))))
      (setvar 'textstyle S1)
      (setq R1 (cdr (assoc 40 (tblsearch "style" S1))))
      (if (/= R1 0)
        (setvar 'textsize R1))
    )
    ((= typ "DIMENSION")
      (setq S1 (cdr (assoc 3 (entget ent))))
      (setvar 'cmdecho cmde)
      (command "_.dimstyle" "r" S1)
    )
;
    ((= typ "LEADER")
      (setq S1 (cdr (assoc 3 (entget ent))))
      (setvar 'cmdecho cmde)
      (command "_.dimstyle" "r" S1)
    )
    ((= typ "MULTILEADER")
      (setq S1 (cdr (assoc 2 (entget ent))))
      (setvar 'cmdecho 1)
      (setvar 'cmleaderstyle (vla-get-Stylename (vlax-ename-&amp;gt;vla-object ent)))
      (prompt (strcat "\nSet current MultiLeader Style to \"" S1 "\".\n"))
      (command "_.mleader")
    )
    ((= typ "TEXT")
      (setq S1 (cdr (assoc 7 (entget ent))))
      (setvar 'textstyle S1)
      (setq R1 (cdr (assoc 40 (tblsearch "style" S1))))
      (setq R2 (cdr (assoc 41 (tblsearch "style" S1))))
      (setvar 'textsize R1)
      (setvar 'hpspace R2)
      (setvar 'hpdouble (cdr (assoc 1070 (cadr (assoc -3 (entget ent '("ACAD")))))))
    )
    ((= typ "HATCH")
      (setq S1 (cdr (assoc 2 (entget ent))))
      (setvar 'hpname S1)
      (setq R1 (cdr (assoc 41 (tblsearch "style" S1))))
      (setq R2 (cdr (assoc 52 (entget ent))))
      (setvar 'hpscale R1)
      (setvar 'hpang R2)
      (setvar 'hpassoc (cdr (assoc 97 (entget ent))))
    )
    ((= typ "MINSERT")
      (setq S1 (cdr (assoc 2 (entget ent))))
      (setvar 'insname S1)
    )
    ((= typ "MTEXT")
      (setq S1 (cdr (assoc 7 (entget ent))))
      (setq S2 (cdr (assoc 50 (entget ent))))
      (setvar 'textstyle S1)
      (setvar 'textsize S2)
      (setvar 'tspacetype (cdr (assoc 73 (entget ent))))
      (setvar 'tspacefac (cdr (assoc 44 (entget ent))))
      (setvar 'cmdecho cmde)
      (command "_.mtext" "r" S1)
    )
    (t
      (prompt "\nSelected object type is not supported for style matching.")
    )
  )

  (setvar 'cmdecho cmde) ; Restore original command echo state
  (princ)
)

(princ)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 30 Aug 2023 17:08:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12207491#M24818</guid>
      <dc:creator>venturini.anthony</dc:creator>
      <dc:date>2023-08-30T17:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: Make Styles Current</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12207506#M24819</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/7221773"&gt;@venturini.anthony&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;how would i add the ability to make the selected objects layer and color current as well?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;[You could just use MM, which does those, along with linetype, linetype scale, lineweight and thickness where applicable.&amp;nbsp; Or you could study how MM does them, and incorporate that into your reduced version.]&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 17:13:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/make-styles-current/m-p/12207506#M24819</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2023-08-30T17:13:53Z</dc:date>
    </item>
  </channel>
</rss>

