<?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: START LISP SCRIPT ON QNEW in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11793956#M33643</link>
    <description>&lt;P&gt;Thanks. Yes we have that. But I also need to know the author at initiation of the drawing and it should stay always the same.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Mar 2023 17:13:36 GMT</pubDate>
    <dc:creator>AIR_123</dc:creator>
    <dc:date>2023-03-02T17:13:36Z</dc:date>
    <item>
      <title>START LISP SCRIPT ON QNEW</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11792602#M33638</link>
      <description>&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;I have this little lisp to set author to dwgprops. How can I automate it such that when I start new drawing this lisp runs. I've tried to add it to ACADDOC, but there is no effect. Does there need to be some kind of timer to send data to DWGPROPS after drawing started and everything is loaded? Thx&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(defun c:setauthorprop ()

  (vl-load-com)

  (setq acadObject (vlax-get-acad-object))

  (setq acadDocument (vla-get-ActiveDocument acadObject))

  ;;Get the SummaryInfo
  (setq dProps (vlax-get-Property acadDocument 'SummaryInfo))
  (setq doc (vla-get-activedocument (vlax-get-acad-object)))
  (setq propvalue (vla-get-summaryinfo doc "Author"))
  (setq name (strcat propvalue ", " (getenv "USERNAME")))
  (vla-put-summaryinfo doc "Author" name)
  (princ)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 09:40:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11792602#M33638</guid>
      <dc:creator>AIR_123</dc:creator>
      <dc:date>2023-03-02T09:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: START LISP SCRIPT ON QNEW</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11792998#M33639</link>
      <description>&lt;P&gt;You've defined the function in Acaddoc.lsp but the function isn't executed.&lt;/P&gt;&lt;P&gt;Instead of defining a function simply execute the code you need by adding&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(vl-load-com)(vla-put-Author(vla-get-summaryInfo(vla-get-activeDocument(vlax-get-acad-object)))(getenv "USERNAME"))&lt;/LI-CODE&gt;&lt;P&gt;to the start of Acaddoc.lsp instead.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 12:34:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11792998#M33639</guid>
      <dc:creator>TomBeauford</dc:creator>
      <dc:date>2023-03-02T12:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: START LISP SCRIPT ON QNEW</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11793243#M33640</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4081966"&gt;@AIR_123&lt;/a&gt;&amp;nbsp;ת&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the lisp maybe load but the function is not execute cause it must be called&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt;&lt;/P&gt;&lt;P&gt;add this line to bottom of your lisp file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(c:SetupAuthorProp)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moshe&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 13:45:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11793243#M33640</guid>
      <dc:creator>Moshe-A</dc:creator>
      <dc:date>2023-03-02T13:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: START LISP SCRIPT ON QNEW</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11793321#M33641</link>
      <description>&lt;P&gt;Consider a different approach. Our title blocks display the username of the last person who saved the drawing with the Field expression %&amp;lt;\AcVar LastSavedBy&amp;gt;%. More useful than the name of the person who just plotted the drawing.&lt;/P&gt;&lt;P&gt;We add&amp;nbsp;%&amp;lt;\AcVar SaveDate \f "M/d/yyyy"&amp;gt;% to the title blocks to show when they were last modified as well.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 14:14:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11793321#M33641</guid>
      <dc:creator>TomBeauford</dc:creator>
      <dc:date>2023-03-02T14:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: START LISP SCRIPT ON QNEW</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11793951#M33642</link>
      <description>&lt;P&gt;I knew it should be something simple &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; Thx&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 17:12:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11793951#M33642</guid>
      <dc:creator>AIR_123</dc:creator>
      <dc:date>2023-03-02T17:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: START LISP SCRIPT ON QNEW</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11793956#M33643</link>
      <description>&lt;P&gt;Thanks. Yes we have that. But I also need to know the author at initiation of the drawing and it should stay always the same.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 17:13:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11793956#M33643</guid>
      <dc:creator>AIR_123</dc:creator>
      <dc:date>2023-03-02T17:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: START LISP SCRIPT ON QNEW</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11794061#M33644</link>
      <description>&lt;P&gt;Only set the current user if author is blank in properties so once it's set it should stay always the same with:&lt;/P&gt;&lt;LI-CODE lang="lisp"&gt;(if(=(vla-get-Author(vla-get-summaryInfo(vla-get-activeDocument(vlax-get-acad-object))))"")(vla-put-Author(vla-get-summaryInfo(vla-get-activeDocument(vlax-get-acad-object)))(getenv "USERNAME")))&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 02 Mar 2023 17:53:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11794061#M33644</guid>
      <dc:creator>TomBeauford</dc:creator>
      <dc:date>2023-03-02T17:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: START LISP SCRIPT ON QNEW</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11795928#M33645</link>
      <description>&lt;P&gt;Your code would overwrite "Author" anytime it's run which isn't what you want to autorun.&lt;/P&gt;&lt;P&gt;The code in my last post would only&amp;nbsp;&lt;SPAN&gt;set the current user if author is blank so it would stay always the same which is what you asked for wasn't it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Add it to acaddoc.lsp and you're done.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It would still add current&amp;nbsp;"USERNAME" when editing template files which would leave that&amp;nbsp;"USERNAME" in all drawings created with those templates.&lt;/P&gt;&lt;P&gt;I could modify it to check the file extension so it would only add "Author" to DWG files not DWT template files if that's what you want.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Mar 2023 12:43:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/start-lisp-script-on-qnew/m-p/11795928#M33645</guid>
      <dc:creator>TomBeauford</dc:creator>
      <dc:date>2023-03-03T12:43:15Z</dc:date>
    </item>
  </channel>
</rss>

