<?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: Lisp Routine Help in Civil 3D Customization Forum</title>
    <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/lisp-routine-help/m-p/13801488#M26832</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1964015"&gt;@cdavis&lt;/a&gt;&amp;nbsp;When posting code, please use the Code tag:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Code tag.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1568565i14CE2D1A89DD234E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Code tag.png" alt="Code tag.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;See the help file for how to use acet-laytrans:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-4BD312D1-1850-4DE4-A63D-35367C5F7F5D" target="_blank"&gt;https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-4BD312D1-1850-4DE4-A63D-35367C5F7F5D&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the user name issue:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(setq user (getvar 'Username))
(setq standardsFile (strcat "C:\\Users\\" user "\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\MT to CT Aerial Lidar.dws")&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 08 Sep 2025 17:09:31 GMT</pubDate>
    <dc:creator>Jeff_M</dc:creator>
    <dc:date>2025-09-08T17:09:31Z</dc:date>
    <item>
      <title>Lisp Routine Help</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/lisp-routine-help/m-p/13799518#M26826</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am trying to write a lisp routine that will call up a certain .dws file for layer translation. I am not any good at lisp, and for a lot of the other ones, I have successfully used AI to generate my lisp, except for this one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the first step in a conversion process that will start with the .dws file, then run some other lisp routines for specific blocks to specific layers (after the translate), then finish with a block replacement. Unfortunately, I cannot get 2024 Civil 3D to run the .dws file from the command line to load a predefined file. It does not seem that -laytrans, or acet-laytrans works when i try it manually. Here is the lisp routine I have.&lt;BR /&gt;Oh, and does anyone know if I replace my username (cdavis) with %username% will work for deployment across my company? Everyone will have the same path, except for the username.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;LISP:&lt;/P&gt;&lt;P&gt;(defun c:CTA ( / standardsFile )&lt;BR /&gt;;; Path to your DWS file&lt;BR /&gt;(setq standardsFile "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\MT to CT Aerial Lidar.dws")&lt;/P&gt;&lt;P&gt;;; Make sure file exists before running&lt;BR /&gt;(if (findfile standardsFile)&lt;BR /&gt;(progn&lt;BR /&gt;(princ "\nRunning Layer Translator using standards file...")&lt;/P&gt;&lt;P&gt;;; Run Layer Translator in command-line mode&lt;BR /&gt;;; "L" = Load standards file&lt;BR /&gt;;; "T" = Translate&lt;BR /&gt;;; "Y" = Yes, apply translation&lt;BR /&gt;(command ".acet-laytrans"&lt;BR /&gt;"L" standardsFile&lt;BR /&gt;"" ;; Finish loading&lt;BR /&gt;"T"&lt;BR /&gt;"Y"&lt;BR /&gt;"" ;; Finish command&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;(princ "\nLayer translation complete.")&lt;BR /&gt;)&lt;BR /&gt;(princ (strcat "\nCould not find standards file: " standardsFile))&lt;BR /&gt;)&lt;BR /&gt;(princ)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Sat, 06 Sep 2025 17:25:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/lisp-routine-help/m-p/13799518#M26826</guid>
      <dc:creator>cdavis</dc:creator>
      <dc:date>2025-09-06T17:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Routine Help</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/lisp-routine-help/m-p/13801488#M26832</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1964015"&gt;@cdavis&lt;/a&gt;&amp;nbsp;When posting code, please use the Code tag:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Code tag.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1568565i14CE2D1A89DD234E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Code tag.png" alt="Code tag.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;See the help file for how to use acet-laytrans:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-4BD312D1-1850-4DE4-A63D-35367C5F7F5D" target="_blank"&gt;https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-4BD312D1-1850-4DE4-A63D-35367C5F7F5D&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the user name issue:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(setq user (getvar 'Username))
(setq standardsFile (strcat "C:\\Users\\" user "\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\MT to CT Aerial Lidar.dws")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Sep 2025 17:09:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/lisp-routine-help/m-p/13801488#M26832</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2025-09-08T17:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Routine Help</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/lisp-routine-help/m-p/13801524#M26833</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1964015"&gt;@cdavis&lt;/a&gt;&amp;nbsp;Depending on your IT department, there can be a difference in UserName &amp;amp; LoginName sysvars, as&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1137264"&gt;@paullimapa&lt;/a&gt;&amp;nbsp; reminded me here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;A href="https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-for-multiple-object-stl-export/td-p/13795271" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-a-lisp-for-multiple-object-stl-export/td-p/13795271&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Mon, 08 Sep 2025 17:32:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/lisp-routine-help/m-p/13801524#M26833</guid>
      <dc:creator>BlackBox_</dc:creator>
      <dc:date>2025-09-08T17:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Routine Help</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/lisp-routine-help/m-p/13801595#M26835</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1206685"&gt;@BlackBox_&lt;/a&gt;&amp;nbsp;I learned something new today. I never knew there is a LoginName, nor that&amp;nbsp;MYDOCUMENTSPREFIX existed...&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thinking_face:"&gt;🤔&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1964015"&gt;@cdavis&lt;/a&gt;&amp;nbsp;I revise my suggestion to this:&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;(setq user (vl-string-subst "" "Documents" (getvar 'MYDOCUMENTSPREFIX) ))
(setq standardsFile (strcat user "DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\MT to CT Aerial Lidar.dws")&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Sep 2025 18:38:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/lisp-routine-help/m-p/13801595#M26835</guid>
      <dc:creator>Jeff_M</dc:creator>
      <dc:date>2025-09-08T18:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Routine Help</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/lisp-routine-help/m-p/13801627#M26836</link>
      <description>&lt;P&gt;Jeff_M, thank you for letting me know about the code tag, sorry about that. I am very new at all of this, and to be honest, I have been able to get AI to write most of the simple routines for me.&lt;BR /&gt;&lt;BR /&gt;Would this be the case for any lisp that I need others to point to. For instance, I am also doing a lisp that will demand load and run several other lisp routines. Would I need to use the suggested code one time at the beginning, or for each "load" sequence&lt;BR /&gt;&lt;BR /&gt;As a little background, our company uses the Autodesk Docs cloud for all our standards to run through, so each staff member that uses Civil 3D logs into ACCDOCS and it synchs the data from the cloud to the local user. Each log in is assigned By IT as the same for every instance of company logins, so the computer username is the same as the system admin/server info. So when I develop some standards and lisp routines, I need them to be able to fire form anyone's computer. So the "username" is cdavis for me, JDoe, JSmith, etc. I know when we set up the Profiles for Civil 3D, we are able to just use the %username% in place of the actual name for all the profile paths.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:LiDAR ( / )

  (princ "\n=== Starting Batch Routine ===")

  ;; --- Load each routine ---
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\VT-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\APR-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\UT-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\DI-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\Tree-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\Topo-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\TCD-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\SN-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\MTR-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\MH-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\LTG-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\HYD-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\CB-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\BX-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\CVT-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\VA-LiDAR.lsp")
  (load "C:\\Users\\cdavis\\DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\Poles-LiDAR.lsp")

  ;; --- Run each routine in sequence ---
  (princ "\nRunning VT-LiDAR...")
  (c:VT-LiDAR)

  (princ "\nRunning APR-LiDAR...")
  (c:APR-LiDAR)

  (princ "\nRunning UT-LiDAR...")
  (c:UT-LiDAR)

  (princ "\nRunning DI-LiDAR...")
  (c:DI-LiDAR)

  (princ "\nRunning Tree-LiDAR...")
  (c:Tree-LiDAR)

  (princ "\nRunning Topo-LiDAR...")
  (c:Topo-LiDAR)

  (princ "\nRunning TCD-LiDAR...")
  (c:TCD-LiDAR)

  (princ "\nRunning SN-LiDAR...")
  (c:SN-LiDAR)

  (princ "\nRunning MTR-LiDAR...")
  (c:MTR-LiDAR)

  (princ "\nRunning MH-LiDAR...")
  (c:MH-LiDAR)

  (princ "\nRunning LTG-LiDAR...")
  (c:LTG-LiDAR)

  (princ "\nRunning HYD-LiDAR...")
  (c:HYD-LiDAR)

  (princ "\nRunning CB-LiDAR...")
  (c:CB-LiDAR)

  (princ "\nRunning BX-LiDAR...")
  (c:BX-LiDAR)

  (princ "\nRunning CVT-LiDAR...")
  (c:CVT-LiDAR)

  (princ "\nRunning VA-LiDAR...")
  (c:VA-LiDAR)

  (princ "\nRunning Poles-LiDAR...")
  (c:Poles-LiDAR)

  ;; Zoom extents at end
  (command "ZOOM" "E")

  (princ "\n=== All routines completed ===")
  (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Sep 2025 18:52:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/lisp-routine-help/m-p/13801627#M26836</guid>
      <dc:creator>cdavis</dc:creator>
      <dc:date>2025-09-08T18:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: Lisp Routine Help</title>
      <link>https://forums.autodesk.com/t5/civil-3d-customization-forum/lisp-routine-help/m-p/13801651#M26837</link>
      <description>&lt;P&gt;This may help expedite the load process, and *should* demand-load the routines for each user:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(setq path
       (strcat
         (vl-string-subst "" "Documents" (getvar 'mydocumentsprefix))
         "DC\\ACCDocs\\MarkThomas\\CAD-Support\\Project Files\\Survey\\Layer Converters\\Caltrans\\Code\\"
       )
)
(autoload (strcat path "VT-LiDAR.lsp") '("VT-LiDAR"))
;; more here&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Sep 2025 19:13:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/civil-3d-customization-forum/lisp-routine-help/m-p/13801651#M26837</guid>
      <dc:creator>BlackBox_</dc:creator>
      <dc:date>2025-09-08T19:13:19Z</dc:date>
    </item>
  </channel>
</rss>

