<?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: VLA-Wblock vs Wblock in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11588519#M37695</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/393249"&gt;@dvertz&lt;/a&gt; &lt;/P&gt;
&lt;P&gt;Why not use vl-file-copy? Here's a simple example.&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(if (and (= 1 (getvar 'dwgtitled)) (getvar 'writestat))
  (progn
    ;; (command "_.QSAVE")
    (setq n (strcat (getvar 'dwgprefix) (getvar 'dwgname)))
    ;; Save a copy of current drawing with today's date appended to the name
    (vl-file-copy
      n
      (strcat (vl-filename-base n) "_" (menucmd "M=$(edtime, $(getvar,date),YYYY-MO-DD)") ".dwg")
    )
  )
)&lt;/LI-CODE&gt;
&lt;P&gt; &lt;/P&gt;</description>
    <pubDate>Wed, 30 Nov 2022 16:47:38 GMT</pubDate>
    <dc:creator>ronjonp</dc:creator>
    <dc:date>2022-11-30T16:47:38Z</dc:date>
    <item>
      <title>VLA-Wblock vs Wblock</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11585673#M37692</link>
      <description>&lt;P&gt;With the wblock command you can enter "*" to wblock the entire drawing including the layouts. Can VLA-wblock be used to do the same thing in some manner? As I have read it uses a selection set which means everything in the current space can be wblocked, but not the entire drawing at once.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 16:04:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11585673#M37692</guid>
      <dc:creator>dvertz</dc:creator>
      <dc:date>2022-11-29T16:04:05Z</dc:date>
    </item>
    <item>
      <title>Re: VLA-Wblock vs Wblock</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11587974#M37693</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/393249"&gt;@dvertz&lt;/a&gt;as far has I know , a SAVEAS will make a new dwg that per it self is a BLOCK .&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 13:51:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11587974#M37693</guid>
      <dc:creator>devitg</dc:creator>
      <dc:date>2022-11-30T13:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: VLA-Wblock vs Wblock</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11588103#M37694</link>
      <description>&lt;P&gt;Devitg,&lt;/P&gt;&lt;P&gt;Thank you for the suggestion.&lt;/P&gt;&lt;P&gt;I was looking into the VLA-Wblock method as an alternative to the VLA-SAVE or VLA-SAVEAS methods as the VLA-SAVE only saves the current drawing back the current open file (same as command "QSAVE") and the VLA-SAVEAS only saves to a new drawing and sets it as current. The Visual Lisp programmers have not yet created as true "SAVE" method and I am looking for a workaround. The Command entry cannot be used as it is inside a reactor. If VLA-WBLOCK could WBLOCK the way ti does for the command line WBLOCK, then that would be a great workaround.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 14:37:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11588103#M37694</guid>
      <dc:creator>dvertz</dc:creator>
      <dc:date>2022-11-30T14:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: VLA-Wblock vs Wblock</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11588519#M37695</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/393249"&gt;@dvertz&lt;/a&gt; &lt;/P&gt;
&lt;P&gt;Why not use vl-file-copy? Here's a simple example.&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;LI-CODE lang="lisp"&gt;(if (and (= 1 (getvar 'dwgtitled)) (getvar 'writestat))
  (progn
    ;; (command "_.QSAVE")
    (setq n (strcat (getvar 'dwgprefix) (getvar 'dwgname)))
    ;; Save a copy of current drawing with today's date appended to the name
    (vl-file-copy
      n
      (strcat (vl-filename-base n) "_" (menucmd "M=$(edtime, $(getvar,date),YYYY-MO-DD)") ".dwg")
    )
  )
)&lt;/LI-CODE&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 16:47:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11588519#M37695</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2022-11-30T16:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: VLA-Wblock vs Wblock</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11589219#M37696</link>
      <description>&lt;P&gt;ronjonp,&lt;/P&gt;&lt;P&gt;Thanks for the suggestion.&lt;/P&gt;&lt;P&gt;First problem is that I am working inside a reactor, so I cannot use the command function.&lt;/P&gt;&lt;P&gt;I actually tried going that route once. Then I discovered that vla-save would have to be performed before I used vl-file-copy in order to get a copy of the drawing in its current state. And I did not want to save the current drawing in its current state. It would also be assuming that the drawing was not open for read-only. With vla-save being the same as Command "qsave", I could not find a visual lisp function that would do the same think as Command "save" &lt;EM&gt;filename&lt;/EM&gt;. So I started looking for workarounds.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 21:54:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11589219#M37696</guid>
      <dc:creator>dvertz</dc:creator>
      <dc:date>2022-11-30T21:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: VLA-Wblock vs Wblock</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11589227#M37697</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/393249"&gt;@dvertz&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;ronjonp,&lt;/P&gt;
&lt;P&gt;Thanks for the suggestion.&lt;/P&gt;
&lt;P&gt;First problem is that I am working inside a reactor, so I cannot use the command function.&lt;/P&gt;
&lt;P&gt;I actually tried going that route once. Then I discovered that vla-save would have to be performed before &lt;STRONG&gt;I used vl-file-copy in order to get a copy of the drawing in its current state. And I did not want to save the current drawing in its current state.&lt;/STRONG&gt; It would also be assuming that the drawing was not open for read-only. With vla-save being the same as Command "qsave", I could not find a visual lisp function that would do the same think as Command "save" &lt;EM&gt;filename&lt;/EM&gt;. So I started looking for workarounds.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is confusing? What are you doing with this copy and why does it need to run within a reactor?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;The command in my code above is commented out but this:&lt;BR /&gt;(vla-save (vla-get-activedocument (vlax-get-acad-object)))&lt;/P&gt;
&lt;P&gt;can run within a reactor ( as you've tried already ? )&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 22:06:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11589227#M37697</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2022-11-30T22:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: VLA-Wblock vs Wblock</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11590649#M37698</link>
      <description>&lt;P&gt;ronjonp,&lt;/P&gt;&lt;P&gt;I started this as separate thread from the "Save drawing to new name in Visual Lisp reactor" in case someone knew if there was a way to use vla-wblock to write the entire drawing like the command "wblock" does.&lt;/P&gt;&lt;P&gt;What I am doing with it is looking for the workaround of no "save" function in visual lisp as described in the other thread. I am attempting at writing my own "SureSave" program like Cad Studio wrote, just with other options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;vla-save vl-file-copy would work if I was ok with saving the current drawing (which I am not). vla-saveas would work if I could find a way to set the drawing back to the previous path\filename without saving the drawing again. So vla-wblock was the next alternative to look at. Which appears to be a dead end as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I even looked into making a copy of the Autocad autosave file with "SV$" extension. Sadly though, it cannot always be counted on that its there.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 13:21:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11590649#M37698</guid>
      <dc:creator>dvertz</dc:creator>
      <dc:date>2022-12-01T13:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: VLA-Wblock vs Wblock</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11590753#M37699</link>
      <description>&lt;P&gt;Sounds good. I'm curious as to why you don't want to save the drawing? I save all the time because I hate doing things twice.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you thought about using Dropbox / Drive / other cloud service or setting up a Synology to make backups ? I quit using my code and went the route of Synology and Active Backup for Business .. it's slick.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ronjonp_0-1669903795746.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1146953iEA8730779CC88152/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ronjonp_0-1669903795746.png" alt="ronjonp_0-1669903795746.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 14:22:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11590753#M37699</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2022-12-01T14:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: VLA-Wblock vs Wblock</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11591055#M37700</link>
      <description>&lt;P&gt;Sometimes I have drawing open that are from other companies. Defiantly do not want to save back their drawings. Other in the same company are using older versions of CAD. Don't want to overwrite with a newer version, then they can't open their own drawings.&lt;/P&gt;&lt;P&gt;I had not thought about synced backups. It could be a good route to go. can the interval be set. I see your screenshot is at 1 hour. That's way to long.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 15:57:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11591055#M37700</guid>
      <dc:creator>dvertz</dc:creator>
      <dc:date>2022-12-01T15:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: VLA-Wblock vs Wblock</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11591084#M37701</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/393249"&gt;@dvertz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That hour interval has the latest saved version of the file ( which is plenty for me ). What is your motivation for this intense backup? Are people losing work? Are people not saving frequently enough?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm still having trouble understanding why you don't want to trigger a save before copying your backup.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used to have my backup code run on a&amp;nbsp;:vlr-commandended reactor then tied it to saves.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 16:09:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/vla-wblock-vs-wblock/m-p/11591084#M37701</guid>
      <dc:creator>ronjonp</dc:creator>
      <dc:date>2022-12-01T16:09:13Z</dc:date>
    </item>
  </channel>
</rss>

