<?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: A couple of newbie lisp questions / requests in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13075394#M8114</link>
    <description>&lt;P&gt;You can always first rename the client's dwg file with prefix "&lt;STRONG&gt;XCLIENT Floor Plan.dwg&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;Then xref that dwg into your dwg and then BIND it.&lt;/P&gt;&lt;P&gt;Now all the "elements" will automatically be prefixed with the drawing name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Oct 2024 01:43:05 GMT</pubDate>
    <dc:creator>paullimapa</dc:creator>
    <dc:date>2024-10-10T01:43:05Z</dc:date>
    <item>
      <title>A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074460#M8106</link>
      <description>&lt;P&gt;My company is soon going to be getting LT2025 after being stuck on LT2016 for ages.&lt;/P&gt;
&lt;P&gt;Now I know if I want settings to load up everytime I need to put them in the *doc.lsp file.&lt;/P&gt;
&lt;P&gt;What do I need put in the lisp file to change the following?&lt;/P&gt;
&lt;P&gt;MTEXTCOLUMN 0&lt;/P&gt;
&lt;P&gt;HPANNO 1&lt;/P&gt;
&lt;P&gt;PASTESPECMODE 1&lt;/P&gt;
&lt;P&gt;Those 3 will do for starters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OK next request&lt;/P&gt;
&lt;P&gt;We get sent drawings from clients all the time and I use the RENAME command to put "XCLIENT " in front of every entity so that all client stuff gets shoved to the bottom of the dialog boxes.&lt;/P&gt;
&lt;P&gt;Is there a lisp which can run through the renaming of everything in the client drawing without me have to go through each and every group of items?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 16:04:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074460#M8106</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2024-10-09T16:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074498#M8107</link>
      <description>&lt;P&gt;For you first question, you can format your variables in a list like so to set them:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(foreach var '((mtextcolumn 0) (hpanno 1) (pastespecmode 1))
(setvar (car var) (cadr var))
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Put that in your startup and you should be good to go.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What are you renaming in the drawings? Layers and block or other items?&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 16:25:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074498#M8107</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2024-10-09T16:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074517#M8108</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp;All items in the dialog box which pops up when you type RENAME.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 16:32:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074517#M8108</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2024-10-09T16:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074581#M8109</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/65473"&gt;@h_s_walker&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank God you explained that.&amp;nbsp; I was wondering how you would rename a LINE.&lt;/P&gt;&lt;P&gt;So, from memory, you want to rename only objects that have a name, e.g.&lt;/P&gt;&lt;P&gt;Layers&lt;/P&gt;&lt;P&gt;Text styles&lt;/P&gt;&lt;P&gt;Dimstyles&lt;/P&gt;&lt;P&gt;MLstyles&lt;/P&gt;&lt;P&gt;Blocks&lt;/P&gt;&lt;P&gt;Linetypes (?)&lt;/P&gt;&lt;P&gt;Views&lt;/P&gt;&lt;P&gt;Layouts&lt;/P&gt;&lt;P&gt;Layer states&lt;/P&gt;&lt;P&gt;Layer filters&lt;/P&gt;&lt;P&gt;etc, etc, etc. (?)&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 17:03:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074581#M8109</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2024-10-09T17:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074616#M8110</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/65473"&gt;@h_s_walker&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;....&lt;/P&gt;
&lt;P&gt;We get sent drawings from clients all the time and I use the RENAME command to put "XCLIENT " in front of every entity so that all client stuff gets shoved to the bottom of the dialog boxes.&lt;/P&gt;
&lt;P&gt;Is there a lisp which can run through the renaming of everything in the client drawing without me have to go through each and every group of items?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I suggest that you not&amp;nbsp;open their drawings and do all that within them, but open a drawing of your own to contain all of that, which you can &lt;STRONG&gt;&lt;EM&gt;collectively rename all at once&lt;/EM&gt;&lt;/STRONG&gt; by this method:&lt;BR /&gt;&lt;STRONG&gt;Rename a &lt;EM&gt;drawing&lt;/EM&gt;&lt;/STRONG&gt; of theirs with XCLIENT prefixed to the &lt;EM&gt;drawing name&lt;/EM&gt; [shorten the rest if you like, or replace &lt;EM&gt;all&lt;/EM&gt; of it with just XCLIENT if there won't then be confusion among multiple drawings].&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;XREF&lt;/STRONG&gt; that drawing into yours.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;BIND&lt;/STRONG&gt; that Xref using the &lt;STRONG&gt;B&lt;/STRONG&gt;ind [&lt;EM&gt;not&lt;/EM&gt; the &lt;STRONG&gt;I&lt;/STRONG&gt;nsert] option.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;EXPLODE&lt;/STRONG&gt; that after Binding, so it won't be a Block any more, and you can work with the pieces.&lt;/P&gt;
&lt;P&gt;All those Renamable things [Layers, Block names, Text Styles, etc.] will end up with names as in your description, though starting with the XCLIENT-prefixed drawing name and a "pipe" character, not with just XCLIENT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But depending on what you need to do in their drawings that also involves Layers and Styles and such of your own, consider simply XREFing, without Binding anything.&amp;nbsp; The Layer &amp;amp; Block &amp;amp; Style etc. names will still be prefixed with the drawing name they're part of, and therefore isolated amongst themselves in lists.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 17:40:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074616#M8110</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-10-09T17:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074731#M8111</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;,&lt;/P&gt;&lt;P&gt;Excellent!&lt;/P&gt;&lt;P&gt;But he must realize that if he wants to use that method on more than one xref that he must use a different prefix for each (unless it's okay to comingle).&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 18:21:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074731#M8111</guid>
      <dc:creator>john.uhden</dc:creator>
      <dc:date>2024-10-09T18:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074747#M8112</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/65473"&gt;@h_s_walker&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not knowing your exact workflow, I agree that using an XREF is the way to handle this. Renaming everything is a bit cumbersome ( as you know ) :).&lt;/P&gt;</description>
      <pubDate>Wed, 09 Oct 2024 18:31:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13074747#M8112</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2024-10-09T18:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13075381#M8113</link>
      <description>&lt;P&gt;Ah I should have explained a bit better.&lt;/P&gt;
&lt;P&gt;We get drawings from our clients which contain floor plans. We then insert those floor plans into our drawings as blocks.&lt;/P&gt;
&lt;P&gt;We may get a drawing which has 20 floor plans in, but we only need one.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/69526"&gt;@Kent1Cooper&lt;/a&gt;&amp;nbsp;XCLIENT has a space after it&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 01:30:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13075381#M8113</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2024-10-10T01:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13075394#M8114</link>
      <description>&lt;P&gt;You can always first rename the client's dwg file with prefix "&lt;STRONG&gt;XCLIENT Floor Plan.dwg&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;Then xref that dwg into your dwg and then BIND it.&lt;/P&gt;&lt;P&gt;Now all the "elements" will automatically be prefixed with the drawing name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 01:43:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13075394#M8114</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-10-10T01:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13075416#M8115</link>
      <description>&lt;P&gt;But we don't want the whole client drawing, just a small part of it.&lt;/P&gt;
&lt;P&gt;Also training the other workers to use xrefs would be a pain&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 02:09:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13075416#M8115</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2024-10-10T02:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13075422#M8116</link>
      <description>&lt;P&gt;You can always open the dwg and WBLOCK out the floor plan you need naming that dwg with the XCLIENT prefix name and then XREF that dwg in and then BIND.&lt;/P&gt;&lt;P&gt;But I'm in shock that you have co-workers that do not know how to use the very time saving XREF command.&lt;/P&gt;&lt;P&gt;Xrefs been around since Release 11 back in the early 90s.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 02:13:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13075422#M8116</guid>
      <dc:creator>paullimapa</dc:creator>
      <dc:date>2024-10-10T02:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13075851#M8117</link>
      <description>&lt;P&gt;I appreciate all the suggestions. BUT can someone just PLEASE do what I asked and give me a lisp I can use to rename all the items in the client's drawing&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 08:11:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13075851#M8117</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2024-10-10T08:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13076447#M8118</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/65473"&gt;@h_s_walker&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;.... we don't want the whole client drawing, just a small part of it. ....&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is what XCLIP is for.&amp;nbsp; Just show the small part, but put the whole thing in.&amp;nbsp; It doesn't cost you anything in memory consumption if it's an Xref -- all that's stored in the host drawing is the file path/name and insertion-type things like an ordinary Block [insertion point, scales, rotation].&amp;nbsp; It doesn't matter how big the Xref'd file is [this is part of the very purpose of Xrefs] -- all the memory consumption is out in that file, not in the host drawing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And it has the huge advantage that if you get an updated base drawing file from the client, all your drawings will update themselves.&amp;nbsp; In what you are requesting, you would need to go through the entire process again every time, whether by overt renaming or via Xref/Bind or splitting up the base drawing into pieces or....&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 13:04:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13076447#M8118</guid>
      <dc:creator>Kent1Cooper</dc:creator>
      <dc:date>2024-10-10T13:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13076454#M8119</link>
      <description>&lt;P&gt;I know, but please can people stop giving suggestions and just give what I asked for.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 13:07:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13076454#M8119</guid>
      <dc:creator>h_s_walker</dc:creator>
      <dc:date>2024-10-10T13:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13076619#M8120</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;hi,&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;This is what XCLIP is for.&amp;nbsp; Just show the small part, but put the whole thing in.&amp;nbsp; It doesn't cost you anything in memory consumption if it's an Xref -- all that's stored in the host drawing is the file path/name and insertion-type things like an ordinary Block [insertion point, scales, rotation].&amp;nbsp; It doesn't matter how big the Xref'd file is [this is part of the very purpose of Xrefs] -- all the memory consumption is out in that file, not in the host drawing.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;Just to clarify, xref do cost memory in a middle of drawing session (a bit more than a block) and &lt;SPAN&gt;influence system performance and this is what important from user side (it doesn't matter if the host file size is small)&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 14:15:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13076619#M8120</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2024-10-10T14:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13077152#M8121</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;I know, but please can people stop giving suggestions and just give what I asked for."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With an attitude like that, probably not.&lt;/P&gt;&lt;P&gt;&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;</description>
      <pubDate>Thu, 10 Oct 2024 17:58:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13077152#M8121</guid>
      <dc:creator>ec-cad</dc:creator>
      <dc:date>2024-10-10T17:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13077215#M8122</link>
      <description>&lt;P&gt;Your mileage may vary since you didn't supply a test document.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(defun c:RenameNamedObjects ( / prefix acad namedDictionaries namedTables dictionary)
	(setq prefix "XCLIENT_")
	(setq acad (vla-get-activedocument (vlax-get-acad-object)))
	(setq namedDictionaries '("ACAD_DETAILVIEWSTYLE" "ACAD_MATERIAL" "ACAD_MLEADERSTYLE" "ACAD_SECTIONVIEWSTYLE" "ACAD_TABLESTYLE"))
	(setq namedTables '("blocks" "dimstyles" "layers" "linetypes" "textstyles" "usercoordinatesystems" "viewports" "views"))
	
	(vla-StartUndoMark acad)
	(vlax-for dictionary (vla-get-dictionaries acad) 
		(if (and 
				(vlax-property-available-p dictionary 'name)
				(vlax-property-available-p dictionary 'count)
				(member (vla-get-name dictionary) namedDictionaries)
			)
			(progn
				(vlax-for it dictionary
					(if (vlax-property-available-p it 'name)
						(progn 
							(vl-catch-all-apply '(lambda () (vla-put-name it (strcat prefix (vla-get-name it)))))
						)
					)
				)
			)
		)
	)
	(foreach table namedTables
		(setq dictionary (vlax-get-property acad table))
		(if (vlax-property-available-p dictionary 'count)
			(if (= table "textstyles") ;Text styles name property are read only, to change use the setpropertyvalue function
				(vlax-for it dictionary
					 (setpropertyvalue (vlax-vla-object-&amp;gt;ename it) "Name" (strcat prefix (vla-get-name it)))
				)
				(vlax-for it dictionary
					(if (vlax-property-available-p it 'name)
						(vl-catch-all-apply '(lambda () (vla-put-name it (strcat prefix (vla-get-name it)))))
					)
				)
			)
		)
	)
	(vla-EndUndoMark acad)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 21:02:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13077215#M8122</guid>
      <dc:creator>MrJSmith</dc:creator>
      <dc:date>2024-10-14T21:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13077264#M8123</link>
      <description>&lt;P&gt;Here is another for fun.&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/65473"&gt;@h_s_walker&lt;/a&gt;&amp;nbsp;How long have you been doing this manually?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(defun c:foo (/ _get)
  ;; RJP » 2024-10-10
  (defun _get (table / l r)
    (while (setq l (tblnext table (null l)))
      (or (wcmatch (strcase (cdr (assoc 2 l))) "`**,*|*,XCLIENT*")
	  (setq r (cons (cdr (assoc 2 l)) r))
      )
    )
    (acad_strlsort r)
  )
  (command "_.UNDO" "BEGIN")
  (setvar 'cmdecho 0)
  (foreach x '("BLOCK" "DIMSTYLE" "LAYER" "LTYPE" "STYLE")
    (foreach y (_get x)
      (vl-catch-all-apply 'vl-cmdf (list "_.RENAME" x y (strcat "XCLIENT-" y) ""))
    )
  )
  (setvar 'cmdecho 1)
  (command "_.UNDO" "END")
  (princ)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another way to solve this sorting problem is to have a template and make all your layers blocks etc prefixed with '00-'.&amp;nbsp;&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 18:53:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13077264#M8123</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2024-10-10T18:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13077285#M8124</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3924657"&gt;@MrJSmith&lt;/a&gt;&amp;nbsp;You should probably check that the name does not already contain the prefix otherwise it'll double\triple\quadruple up.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 18:52:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13077285#M8124</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2024-10-10T18:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: A couple of newbie lisp questions / requests</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13077288#M8125</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/593837"&gt;@ronjonp&lt;/a&gt;&amp;nbsp;He wanted all the named objects as listed in the RENAME command. That only handles the tables. You still have to do the dictionaries.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Oct 2024 18:53:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/a-couple-of-newbie-lisp-questions-requests/m-p/13077288#M8125</guid>
      <dc:creator>MrJSmith</dc:creator>
      <dc:date>2024-10-10T18:53:48Z</dc:date>
    </item>
  </channel>
</rss>

