<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
<title>sendcommand</title>
<link>http://www.zwsoft.com/forum/viewthread.php?tid=2512</link>
<description>Hi   

I Have some application in VBA for Autocad that I transfert to ZWCAD+.  Alll work well execept 1 thing.
When I use ThisDrawing.SendCommand it don't work. 

I have to select all entities, and cut and paste it on a second drawing.


I use just 1 command line to test and i notice that Zwcad execute the command but just when I quit the VBA.


Some one can help me on this ???


This is 2 of the sendcommand i use:



 ThisDrawing.SendCommand &quot;_ai_selall&quot; &amp; vbCr
 ThisDrawing.SendCommand &quot;_copyclip&quot; &amp; vbCr


thank's in advance</description>
<author>rapidozoo3174</author>
<pubDate>2012-11-08 11:12:25</pubDate>
<item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2512&amp;pid=16271</link>
<description>The code was not polished. It shows a technique how to call asynchronous &quot;SendCommand&quot; from a userform context. I'm using it often to run lisp routines from VBA. I attached also autocad project. Tested on acad2000,2004,2007,2010. Zwcad+ will work also.
[attach]665[/attach]</description>
<author>seav735587</author>
<pubDate>2012-11-12 20:41:06</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2512&amp;pid=16267</link>
<description>Hello Seav,

Sorry to late reply, i tried your code in AutoCAD2012, but it doesn't work either, which version of AutoCAD are you using?

Amanda</description>
<author>qinmuting6947</author>
<pubDate>2012-11-12 15:59:43</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2512&amp;pid=16253</link>
<description>IMHO, the only way to run commands from a user form is to hidethe form before SendCommand and restore it after command completion.
My previous code works only once (because a new document was
created, I think).
Another working decision is to unload the form and load it again with
vbarun command. I attached sample code.[attach]663[/attach]</description>
<author>seav735587</author>
<pubDate>2012-11-11 00:43:11</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2512&amp;pid=16252</link>
<description>hi amanda

Did you use the VBA editor ( provide in ZWCAD)  to test my code???

Because, i read in a forum that the vba of ZWCAD don't execute the zwcad command during the vba execution.


than'ks for your help</description>
<author>rapidozoo3174</author>
<pubDate>2012-11-10 14:24:28</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2512&amp;pid=16250</link>
<description>Thank's for your help, but it still not working. 

The ONLY way it make the command (_ai_selall and copyclip) is when I quit the VBA or close the DOC1.

I really like to solve the problem.  I have to find the solution before buying ZWCAD.


The is a VBA tutorial or other forum / blog that can help me.</description>
<author>rapidozoo3174</author>
<pubDate>2012-11-10 02:48:20</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2512&amp;pid=16247</link>
<description>[i=s] Post Last Edit by seav735587 at 2012-11-11 01:37 [/i]

[i][u]UserForm1 module:[/u][/i]
Private Sub CommandButton1_Click()
Hide
ThisDrawing.SendCommand &quot;_ai_selall&quot; &amp; vbCr
ThisDrawing.SendCommand &quot;_copyclip&quot; &amp; vbCr
Dim DOC1 As ZcadDocument
Set DOC1 = Documents.Add
ThisDrawing.SendCommand &quot;_pasteclip &quot; &amp; vbCr &amp; &quot;0,0&quot; &amp; vbCr
End Sub

[u][i]ThisDrawing module:[/i][/u]
Private Sub ZcadDocument_EndCommand(ByVal CommandName As String)
  If CommandName = &quot;PASTECLIP&quot; Then
    UserForm1.Show
  End If
End Sub</description>
<author>seav735587</author>
<pubDate>2012-11-09 16:34:58</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2512&amp;pid=16241</link>
<description>Hi Amanda

I have the latest version  2012.08.30(5622). I really like to find the way to do that.

We plan to buy some ZWCAD license.  I starting converting all my Autocad add-on to ZWCAD to test before buying.

 
This the section of my VBA program:


Private Sub CommandButton17_Click()
.
.
.
ThisDrawing.Application.Documents.Open Source

Set CurrDoc = ThisDrawing.Application.ActiveDocument
     
FULL_NOM = CurrDoc.FullName
NOM = CurrDoc.Name
   
ThisDrawing.SendCommand &quot;_ai_selall&quot; &amp; vbCr
ThisDrawing.SendCommand &quot;_copyclip&quot; &amp; vbCr

Dim DOC1 As ZcadDocument
Set DOC1 = Documents.Add

ThisDrawing.SendCommand &quot;_pasteclip &quot; &amp; vbCr &amp; &quot;0,0&quot; &amp; vbCr

.
.
.
.
.  
End Sub</description>
<author>rapidozoo3174</author>
<pubDate>2012-11-08 22:35:06</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2512&amp;pid=16238</link>
<description>Hello rapidozoo,

i've tried by my side, the sendcommand is ok, use the some code as you did.

Please try the latest version, maybe it was problem but we fixed.

vernum=2012.08.30(5622), packed on 2012.8.30
[url]http://download1.zwsoft.com/en/ZWCAD_Plus/ZWCAD_Plus_2012_enu_20120830.exe[/url]
[url]http://download2.zwsoft.com/en/ZWCAD_Plus/ZWCAD_Plus_2012_enu_20120830.exe[/url]
[url]http://download1.zwsoft.com/en/ZWCAD_Plus/ZWCAD_Plus_2012_enu_CD_20120830.rar[/url]</description>
<author>qinmuting6947</author>
<pubDate>2012-11-08 16:09:27</pubDate>
</item>  </channel>
</rss>