<?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: Combination of LISP scripts in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8975780#M85258</link>
    <description>&lt;P&gt;This is perfect for me ........ (you need to load both the file &lt;SPAN&gt;&amp;nbsp;"layercreate.lsp" &amp;amp; "name.lsp", then run "lc"&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;watch the attach video .......&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or show me your problem.......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or try with the attached LISP, I just combined the both file into one.......&lt;/P&gt;</description>
    <pubDate>Tue, 20 Aug 2019 12:26:14 GMT</pubDate>
    <dc:creator>dbhunia</dc:creator>
    <dc:date>2019-08-20T12:26:14Z</dc:date>
    <item>
      <title>Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8973492#M85245</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sorry if this is off-topic or forbidden to post due to credits to individual authors, but... I have an issue. I have to create a LISP script that will create a layer with a name based on a text object in AutoCAD. As a next step, user has 3 choices and any of them adds a corresponding string of text (which the user can enter manually inside the LISP itself) and it will add it as a suffix to the layer name and create a new layer for each and every individual suffix. I have LISP scripts that I've found on Google that do this, but I don't know how to combine them (LISP syntax makes me dizzy &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you and kinds regards.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 11:59:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8973492#M85245</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-19T11:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8973523#M85246</link>
      <description>&lt;DIV style="font-size: 1.1em; font-family: 'Artifakt'; line-height: 1.3em; margin: 15px 100px 80px 100px;"&gt;
&lt;P&gt;Post or attach the code here, unless forbidden by the code author.&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 19 Aug 2019 12:19:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8973523#M85246</guid>
      <dc:creator>rkmcswain</dc:creator>
      <dc:date>2019-08-19T12:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8973543#M85247</link>
      <description>&lt;P&gt;Here they are. I explicitly apologise to every author of attached files, if these aren't allowed to be distributed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, layer.create.lsp creates a new layer based on selected text object.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Name.lsp creates new layers based on user choice (for e.g. EXC or SHC or ILC).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Prefix.lsp creates a prefix to a layer based on a selected object.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to have a LISP script, which will create a new layer with a name from the text object user selected and it will have a string from user's commandline choice (like in the Name.lsp). I also need to add a prefix to every newly created layer (note that the prefix doesn't change, it's same for every layer).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you and kind regards,&lt;/P&gt;&lt;P&gt;Dusan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 12:28:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8973543#M85247</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-19T12:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974191#M85248</link>
      <description>&lt;P&gt;That prefix.lsp looks like something I wrote. Are all you needing is to select some objects and have them put on a new layer with a suffix appended to the objects layername?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 16:45:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974191#M85248</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2019-08-19T16:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974592#M85249</link>
      <description>&lt;P&gt;It quite possibly could be yours - I was relying on my Google skills until I found out that I have to combine different LISP scripts. I have some LISP skills and syntax understanding, but that's above my grade.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, yes. I have a profile name in a text form (basic text object in AutoCAD), I have a constant prefix (preferably, user can type that one out and it appends to the layer name) and a suffix that is basically a choice between 3 different suffixes based on user choice (user selects one choice and it creates a bunch of layers whose names are already prewritten in LISP script). I can sketch out a flowchart if that helps. Any help would be greatly appreciated and credited.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and kind regards.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 19:46:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974592#M85249</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-19T19:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974662#M85250</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;It quite possibly could be yours - I was relying on my Google skills until I found out that I have to combine different LISP scripts. I have some LISP skills and syntax understanding, but that's above my grade.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, yes. I have a profile name in a text form (basic text object in AutoCAD), I have a constant prefix (preferably, user can type that one out and it appends to the layer name) and a suffix that is basically a choice between 3 different suffixes based on user choice (user selects one choice and it creates a bunch of layers whose names are already prewritten in LISP script). I can sketch out a flowchart if that helps. Any help would be greatly appreciated and credited.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and kind regards.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Post a drawing with before and after .. or your diagram. I'm having trouble following exactly what you want.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 20:21:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974662#M85250</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2019-08-19T20:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974725#M85251</link>
      <description>&lt;P&gt;Here it is, I hope it's understandable &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 21:01:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974725#M85251</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-19T21:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974757#M85252</link>
      <description>&lt;P&gt;To make this work I need all the information. What are the other two options after 'SHC'. Please post these as text on the forum not in an image.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 21:31:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974757#M85252</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2019-08-19T21:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974772#M85253</link>
      <description>&lt;P&gt;Sorry for not providing details. I'll post the info pronto. You can use it as a placeholder, afterwards I can finish the precise details. Here it is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;User-generated constant prefix: -COMPANY-09&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Type: RQ HR, BT Q, BT HR&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;User choices: EXC, SHC and ILC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;User chooses option "EXC" - it creates 3 layers with ending suffixes TH, B and I (first is -COMPANY-09-RQ HR-EXC-TH,&lt;/P&gt;&lt;P&gt;second is -COMPANY-09-RQ HR-EXC-B and third one is -COMPANY-09-RQ HR- EXC - I)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EXC - TH, B, I;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SHC -TH, TI, BW_A, BW_B, IN; (every individual layer is separated by a comma, for e.g. -COMPANY-09-&lt;/P&gt;&lt;P&gt;ILC - SH, LH, RH&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So after all, you get the end result: &lt;FONT color="#33CCCC"&gt;-COMPANY-09&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/FONT&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;FONT color="#FF9900"&gt;RQ HR&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/FONT&gt;-&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color="#FF0000"&gt;EXC-TH&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;prefix by user&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; user selection from text&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; user choice from&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;commandline&lt;/P&gt;&lt;P&gt;Every step in the layer name is separated by a "-".&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 21:45:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974772#M85253</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-19T21:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974790#M85254</link>
      <description>&lt;P&gt;I don't think we're on the same page as to what you want. Here is some quick code from another post modified to do&amp;nbsp;&lt;EM&gt;some&lt;/EM&gt; of what you want&amp;nbsp;&lt;EM&gt;I think...&lt;/EM&gt;&lt;/P&gt;&lt;PRE&gt;(defun c:nameme	(/ el l pr s sf tm x)
  ;; RJP » 2019-08-19
  (or (setq pr (getenv "RJP_LayerPrefix")) (setq pr "-COMPANY-09"))
  (or (setq sf (getenv "RJP_LayerSuffix")) (setq sf "SHC"))
  (cond	((and (setq pr (cond ((/= "" (setq tm (getstring (strcat "\nEnter prefix [&amp;lt;" pr "&amp;gt;]: ")))) tm)
			     (pr)
		       )
	      )
	      (progn (initget 0 "EXC SHC ILC")
		     (setq sf (cond ((getkword (strcat "\nChoose [EXC/SHC/ILC]: &amp;lt;" sf "&amp;gt;")))
				    (sf)
			      )
		     )
	      )
	      (setq s (ssget ":L" (list (cons 8 (strcat "~" pr "*" sf)))))
	 )
	 (setenv "RJP_LayerPrefix" pr)
	 (setenv "RJP_LayerSuffix" sf)
	 (setq sf
		(cadr
		  (assoc sf
			 ;; Edit the descriptions to suit your needs
			 '
			  (("EXC" "EXC Description") ("SHC" "SHC Description") ("ILC" "ILC Description"))
		  )
		)
	 )
	 (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
	   (setq l (cdr (assoc 8 (entget e))))
	   (setq el (entget (tblobjname "layer" l)))
	   (if (not (tblobjname "layer" (setq x (strcat pr "-" l "-" sf))))
	     (entmakex (subst (cons 2 x) (assoc 2 el) el))
	   )
	   (entmod (subst (cons 8 x) (assoc 8 (entget e)) (entget e)))
	 )
	)
  )
  (princ)
)&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Aug 2019 21:58:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8974790#M85254</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2019-08-19T21:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8975236#M85255</link>
      <description>&lt;P&gt;Okay, this is pretty much spot on, this is exactly what we need. I'm gonna accept this as a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really, thank you immeasurably.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: I've just noticed - the text object user selects should be immediately placed after prefix instead of a zero.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, EXC, ILC descriptions - is there a way to create more layers based on description? Line of text in LISP script named "ILC description" - is it just one field or I can add more descriptions?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 06:43:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8975236#M85255</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-20T06:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8975722#M85256</link>
      <description>&lt;P&gt;I have made some changes (a quick alteration) in the file "layercreate.lsp" &amp;amp; "name.lsp"....... Try those.......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to add some functions for "ILC" options in the file&amp;nbsp;"name.lsp".......&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think you do not need any other options for the function "allprops".......&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully you can manage the rest....... &lt;STRONG&gt;(For Layer Naming alternation change the sequence of "strcat" in "layname")&lt;/STRONG&gt;&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>Tue, 20 Aug 2019 11:45:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8975722#M85256</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2019-08-20T11:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8975743#M85257</link>
      <description>&lt;P&gt;This is great, too. I'd just like to know, why does it repeats the prefix 2 times if I enter something? Also, can you tell me wher in LISP file can I edit the part of the layer name, which is added by selecting either EXC, ILC or SHC? Because now, selecting any of those three options does not add anything.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very kindly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I'm gonna mark this too as a solution).&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 11:48:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8975743#M85257</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-20T11:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8975780#M85258</link>
      <description>&lt;P&gt;This is perfect for me ........ (you need to load both the file &lt;SPAN&gt;&amp;nbsp;"layercreate.lsp" &amp;amp; "name.lsp", then run "lc"&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;watch the attach video .......&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or show me your problem.......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or try with the attached LISP, I just combined the both file into one.......&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 12:26:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8975780#M85258</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2019-08-20T12:26:14Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8975850#M85259</link>
      <description>&lt;P&gt;Sir, this is great. I deeply apologise, I didn't load both of those scripts, so naturally, it didn't load anything after I selected EXC or SHC. Now I get it. This is the complete solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your time and knowledge.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dusan&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 12:35:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8975850#M85259</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-20T12:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8975936#M85260</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Okay, this is pretty much spot on, this is exactly what we need. I'm gonna accept this as a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really, thank you immeasurably.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;EDIT: I've just noticed - the text object user selects should be immediately placed after prefix instead of a zero.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, EXC, ILC descriptions - is there a way to create more layers based on description? Line of text in LISP script named "ILC description" - is it just one field or I can add more descriptions?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Glad you got something working. Unfortunately I still don't understand what you're trying to achieve.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you elaborate on "&lt;EM&gt;the text object user selects should be immediately placed after prefix instead of a zero. " ?&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Creating more descriptions for layers is quite easy see the code below. You can add as many descriptions to each as you need.&lt;/P&gt;&lt;PRE&gt;(defun c:nameme	(/ el l pr s sf tm x)
  ;; RJP » 2019-08-20
  (or (setq pr (getenv "RJP_LayerPrefix")) (setq pr "-COMPANY-09"))
  (or (setq sf (getenv "RJP_LayerSuffix")) (setq sf "SHC"))
  (cond	((and (setq pr (cond ((/= "" (setq tm (getstring (strcat "\nEnter prefix [&amp;lt;" pr "&amp;gt;]: ")))) tm)
			     (pr)
		       )
	      )
	      (progn (initget 0 "EXC SHC ILC")
		     (setq sf (cond ((getkword (strcat "\nChoose [EXC/SHC/ILC]: &amp;lt;" sf "&amp;gt;")))
				    (sf)
			      )
		     )
	      )
	      (setq s (ssget ":L" (list (cons 8 (strcat "~" pr "*" sf)))))
	 )
	 (setenv "RJP_LayerPrefix" pr)
	 (setenv "RJP_LayerSuffix" sf)
	 (setq sf
		(cdr (assoc
		       sf
		       ;; Edit the descriptions to suit your needs
		       '
			(("EXC" "EXC Description" "EXC Description2" "EXC Description3" "EXC Description4")
			 ("SHC" "SHC Description" "SHC Description2" "SHC Description3" "SHC Description4")
			 ("ILC" "ILC Description" "ILC Description2" "ILC Description3" "ILC Description4")
			)
		     )
		)
	 )
	 (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
	   (setq l (cdr (assoc 8 (entget e))))
	   (setq el (entget (tblobjname "layer" l)))
	   (foreach a sf
	     (if (not (tblobjname "layer" (setq x (strcat pr "-" l "-" a))))
	       (entmakex (subst (cons 2 x) (assoc 2 el) el))
	     )
	   )
	   ;; Uncomment the code below to modify the object selected .. since we are creating
	   ;; multiple layers, I'm not sure which one is the 'correct' one to use ;)
	   ;; (entmod (subst (cons 8 x) (assoc 8 (entget e)) (entget e)))
	 )
	)
  )
  (princ)
)&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 241px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/668484i7856746BD21753FC/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 13:17:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8975936#M85260</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2019-08-20T13:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8976225#M85261</link>
      <description>&lt;P&gt;Yours is great, now that I see it, I just didn't know how to make a list in lisp, thought it had to be separated by a comma. Now I undertand it. The problem is that 0, as I see in your picture. Instead of a zero, it needs to be a text that the user selected. For e.g. text reads "RG PQ", then the name should be "company1-RG PQ-EXC Description". That's the only hiccup I see now, maybe I'm looking at it the wrong way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Really thanks for your time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dusan&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 14:59:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8976225#M85261</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-20T14:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8976243#M85262</link>
      <description>&lt;P&gt;Give the code below a try. It will filter out text and retrieve the text string to include in the layer name.&lt;/P&gt;&lt;PRE&gt;(defun c:nameme	(/ el l pr s sf str tm x)
  ;; RJP » 2019-08-20
  (or (setq pr (getenv "RJP_LayerPrefix")) (setq pr "-COMPANY-09"))
  (or (setq sf (getenv "RJP_LayerSuffix")) (setq sf "SHC"))
  (cond	((and (setq pr (cond ((/= "" (setq tm (getstring (strcat "\nEnter prefix [&amp;lt;" pr "&amp;gt;]: ")))) tm)
			     (pr)
		       )
	      )
	      (progn (initget 0 "EXC SHC ILC")
		     (setq sf (cond ((getkword (strcat "\nChoose [EXC/SHC/ILC]: &amp;lt;" sf "&amp;gt;")))
				    (sf)
			      )
		     )
	      )
	      (setq s (ssget ":L" (list '(0 . "*TEXT") (cons 8 (strcat "~" pr "*" sf)))))
	 )
	 (setenv "RJP_LayerPrefix" pr)
	 (setenv "RJP_LayerSuffix" sf)
	 (setq sf
		(cdr (assoc
		       sf
		       ;; Edit the descriptions to suit your needs
		       '
			(("EXC" "EXC Description" "EXC Description2" "EXC Description3" "EXC Description4")
			 ("SHC" "SHC Description" "SHC Description2" "SHC Description3" "SHC Description4")
			 ("ILC" "ILC Description" "ILC Description2" "ILC Description3" "ILC Description4")
			)
		     )
		)
	 )
	 (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
	   (setq l (cdr (assoc 8 (entget e))))
	   (setq str (cdr (assoc 1 (entget e))))
	   (setq el (entget (tblobjname "layer" l)))
	   (foreach a sf
	     (if (not (tblobjname "layer" (setq x (strcat pr "-" str "-" a))))
	       (entmakex (subst (cons 2 x) (assoc 2 el) el))
	     )
	   )
	   ;; Uncomment the code below to modify the object selected .. since we are creating
	   ;; multiple layers, I'm not sure which one is the 'correct' one to use ;)
	   ;; (entmod (subst (cons 8 x) (assoc 8 (entget e)) (entget e)))
	 )
	)
  )
  (princ)
)
(vl-load-com)&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Aug 2019 15:07:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8976243#M85262</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2019-08-20T15:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8976314#M85263</link>
      <description>&lt;P&gt;This is it. Exactly what I've wanted. I am immeasurably grateful to both of you for these slick solutions. On a side note, do you have any resources for AutoLISP learning? I just want to brush up my skills more.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, this is great. Both of these have been accepted as solutions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you once again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dusan&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 15:36:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8976314#M85263</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-20T15:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Combination of LISP scripts</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8976328#M85264</link>
      <description>&lt;P&gt;You welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 15:43:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/combination-of-lisp-scripts/m-p/8976328#M85264</guid>
      <dc:creator>dbhunia</dc:creator>
      <dc:date>2019-08-20T15:43:44Z</dc:date>
    </item>
  </channel>
</rss>

