<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
<title>[ZwCAD2012 - ZRX]</title>
<link>http://www.zwsoft.com/forum/viewthread.php?tid=2209</link>
<description>Hello :)
can you someone to help me?
I have an example code &quot;HelloWorld&quot; in MVS2010 (C++):

[size=2][color=#4169e1]// HelloWorld.cpp :[/color][/size]
[size=2][color=#4169e1]#include &quot;stdafx.h&quot;[/color][/size]
[size=2][color=#4169e1]#include &quot;tchar.h&quot;[/color][/size]
[size=2][color=#4169e1]#include &lt;aced.h&gt;[/color][/size]
[size=2][color=#4169e1]#include &lt;rxregsvc.h&gt;[/color][/size]
[size=2][color=#4169e1]
[/color][/size]
[size=2][color=#4169e1]void initApp();[/color][/size]
[size=2][color=#4169e1]void unloadApp();[/color][/size]
[size=2][color=#4169e1]
[/color][/size]
[size=2][color=#4169e1]void helloWorld();[/color][/size]
[color=#4169e1]void initApp()[/color]
[size=2][color=#4169e1]{ [/color][/size]
[size=2][color=#4169e1]
// register a command with the AutoCAD command mechanism[/color][/size]
[size=2][color=#4169e1]
acedRegCmds-&gt;addCommand(&quot;HELLOWORLD_COMMANDS&quot;, [/color][/size][color=#4169e1]&quot;Hello&quot;, [/color][color=#4169e1]&quot;Hello&quot;, [/color][color=#4169e1]ACRX_CMD_TRANSPARENT, [/color][color=#4169e1]helloWorld);[/color]
[size=2][color=#4169e1]}[/color][/size]
[size=2][color=#4169e1]void unloadApp()[/color][/size]
[size=2][color=#4169e1]{ [/color][/size]
[size=2][color=#4169e1]
acedRegCmds-&gt;removeGroup(&quot;HELLOWORLD_COMMANDS&quot;);[/color][/size]
[size=2][color=#4169e1]}[/color][/size]
[size=2][color=#4169e1]void helloWorld()[/color][/size]
[size=2][color=#4169e1]{ [/color][/size]
[size=2][color=#4169e1]
acutPrintf(&quot;\nHello World!&quot;);[/color][/size]
[size=2][color=#4169e1]}[/color][/size]
[size=2][color=#4169e1]
[/color][/size]
[size=2][color=#2e8b57]/*[/color][/size]
[size=2][color=#2e8b57]int helloWorld()[/color][/size]
[size=2][color=#2e8b57]{ [/color][/size]
[size=2][color=#2e8b57]
acutPrintf(&quot;\nHello World!&quot;);[/color][/size]
[size=2][color=#2e8b57]
return 1;[/color][/size]
[size=2][color=#2e8b57]}[/color][/size]
[size=2][color=#2e8b57]*/[/color][/size]
[size=2][color=#4169e1]
[/color][/size]
[size=2][color=#4169e1]extern &quot;C&quot; AcRx::AppRetCode[/color][/size]
[size=2][color=#4169e1]zcrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)[/color][/size]
[size=2][color=#4169e1]{[/color][/size]
[size=2][color=#4169e1]
switch (msg)[/color][/size]
[size=2][color=#4169e1]
{[/color][/size]
[size=2][color=#4169e1]
case AcRx::kInitAppMsg:[/color][/size]
[size=2][color=#4169e1]
acrxDynamicLinker-&gt;unlockApplication(pkt);[/color][/size]
[size=2][color=#4169e1]
acrxRegisterAppMDIAware(pkt);[/color][/size]
[size=2][color=#4169e1]
initApp();[/color][/size]
[size=2][color=#4169e1]
break;[/color][/size]
[size=2][color=#4169e1]
case AcRx::kUnloadAppMsg:[/color][/size]
[size=2][color=#4169e1]
unloadApp();[/color][/size]
[size=2][color=#4169e1]
break;[/color][/size]
[size=2][color=#4169e1]
default:[/color][/size]
[size=2][color=#4169e1]
break;[/color][/size]
[size=2][color=#4169e1]
}[/color][/size]
[size=2][color=#4169e1]
[/color][/size]
[size=2][color=#4169e1]
return AcRx::kRetOK;[/color][/size]
[size=2][color=#4169e1]}[/color][/size]



and I want you &quot;int&quot; not &quot;void&quot;... what I should to do?

best regards,
Zibi</description>
<author>Zibster</author>
<pubDate>2012-06-14 19:36:08</pubDate>
<item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=16145</link>
<description>No, I didn't, but I will try :)

EDIT:
Yeahh... it's work! Thank you seav735587.
Although it is limited to 256 characters, but it's enough.

Thanks again ;)
regards</description>
<author>Zibster</author>
<pubDate>2012-10-25 18:11:49</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=16143</link>
<description>Did you try this:
acDocManager-&gt;sendStringToExecute(curDoc(), _T(&quot;(MyLisp)\n&quot;));</description>
<author>seav735587</author>
<pubDate>2012-10-25 16:29:41</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=16139</link>
<description>I see, you have no idea what is going on in ZRX (ZwCAD2012+) ;]

[u]this is wrong:[/u]
[color=#006400]extern int zcedQueueExpr(ZTCHAR * lisp_expr);[/color][color=#006400]
[/color][u]shoud be:[/u]
[color=#006400]extern &quot;C&quot; int zds_queueexpr(ZTCHAR * lisp_expr);[/color]

[color=#006400]CString strCmdLisp;
strCmdLisp = _T(&quot;(MyLisp)&quot;);
int iStatus = zds_queueexpr((TCHAR*)strCmdLisp.GetBuffer()); [/color]



But, this solution will work only for the fourth run.
Next we have message error and crash ZwCAD.

[attach]621[/attach]


Maybe somebody can tell, what is this??

Regards</description>
<author>Zibster</author>
<pubDate>2012-10-24 18:31:06</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15951</link>
<description>[i=s] Post Last Edit by Zibster at 2012-9-11 16:21 [/i]

What should be here?[attach]556[/attach]
If I have [b]Yes(/Zc:wchar_t), [/b]I get an error:

1&gt;c:\objectarx\zrxsdk 2012 plus_beta_2\arxport\..\inc\zAcPublishReactors.h(80): error C2664: 'strlen' : cannot convert parameter 1 from 'const ZTCHAR *' to 'const char *'
1&gt;          Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast


When I switch to [b]Yes(/Zc:wchar_t-),[/b] I get an error:

1&gt;c:\objectarx\zrxsdk 2012 plus_beta_2\arxport\..\inc\zAdAChar.h(9): fatal error C1189: #error :  Please use native wchar_t type (/Zc:wchar_t)

What is wrong?

Can someone show (print screen) properly configuration step by step for ZwCAD2012+?</description>
<author>Zibster</author>
<pubDate>2012-09-11 16:19:44</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15655</link>
<description>[b]Reply [url=http://www.zwsoft.com/forum/redirect.php?goto=findpost&amp;pid=15558&amp;ptid=2209]21#[/url] [i]peimen8012[/i] [/b]

Hi,

I declared:
[color=#2e8b57]extern int zcedQueueExpr(ZTCHAR * lisp_expr);[/color]


and code:
[color=#2e8b57]CString strCmdLisp;[/color]
[color=#2e8b57]strCmdLisp.Format(_T(&quot;(c:MyApp \&quot;%s\&quot; 2)&quot;),  strNameFile);[/color]
[color=#2e8b57]int a = zcedQueueExpr((ZTCHAR*)strCmdLisp.GetBuffer()); [/color]

and error:
[color=#ff0000]1&gt;MyUtils.obj : error LNK2019: unresolved external symbol &quot;int __cdecl zcedQueueExpr(char *)&quot; (?zcedQueueExpr@@YAHPAD@Z) referenced in function &quot;void __cdecl MyUtl_Function(class ATL::CStringT&lt;char,class StrTraitMFC_DLL&lt;char,class ATL::ChTraitsCRT&lt;char&gt; &gt; &gt;)&quot; (?MyUtl_Function @@YAXV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@@Z)[/color]

what is wrong?</description>
<author>Zibster</author>
<pubDate>2012-08-03 16:20:59</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15561</link>
<description>how are you doing Zibster?</description>
<author>DDWZW</author>
<pubDate>2012-07-24 14:39:53</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15558</link>
<description>Hi arkitool,

Please try
extern int zcedQueueExpr(ZTCHAR * lisp_expr);</description>
<author>peimen8012</author>
<pubDate>2012-07-24 09:39:40</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15553</link>
<description>[font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]
[font=Verdana]Hi,[/font]

extern[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2][color=#000000] [/color][/size][/font][/size][/font][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff][font=Consolas][size=2][color=#0000ff]int[/color][/size][/font][/color][/size][/font][/color][/size][/font][font=Consolas][size=2][font=Consolas][size=2][color=#000000] zcedQueueExpr(ZCHAR * lisp_expr);[/color][/size][/font][/size][/font]
[font=Consolas][size=2][font=Consolas][size=2][color=#000000][/color] [/size][/font][/size][/font]
This declaration works in ZWCAD 2012, as would be in ZWCAD +2012.?</description>
<author>arkitool</author>
<pubDate>2012-07-23 18:36:22</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15341</link>
<description>[attach]483[/attach]

The only thing should be changed is this:
int NKey (int x)

Please refer to attachment for detailed information.</description>
<author>peimen8012</author>
<pubDate>2012-07-09 16:34:12</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15245</link>
<description>[size=2]Hi,[/size][size=2]
[/size]
[size=2]thank you for example and help - great job :)[/size]
[size=2]I have a new question - &quot;resbuf return value&quot;:[/size]
[size=2]
[/size]
[size=2][color=#2e8b57]acedRetReal(NKey1(x));             /* Call the function itself, and return the value to AutoLISP */[/color][/size]
[size=2]
[/size]
[size=2]this above return one integer, what if I want to return a list eg. (1 2 3 &quot;a&quot; &quot;b&quot; &quot;c&quot;)?[/size]
[size=2]
[/size]
[size=2][color=#2e8b57]struct resbuf* pRbReturn = acutBuildList(RTLONG, NKey1(x), RTLONG, 2, RTLONG, 3, RTSTR, &quot;a&quot;, RTSTR &quot;b&quot; , RTSTR &quot;c&quot;, RTNONE);
acedRetList(pRbReturn);
[/color][/size]
[size=2]
[/size]
[size=2]
[/size]
[color=#2f4f4f]what here??[/color]
[size=2][color=#708090]/* Declaration function like this: */[/color][/size]
[size=2][color=#ff0000]int[/color][/size][size=2][color=#2e8b57] MyFunction  (struct resbuf *rb);[/color][/size]
[size=2][color=#2e8b57]
[/color][/size]
[size=2][color=#708090]/* Here we define the array of function names and handlers. */[/color]
[color=#2e8b57]static struct func_entry func_table[] = [/color]
[color=#2e8b57]{ [/color]
[color=#2e8b57]
{/*MSG0*/&quot;fact&quot;, fact},[/color]
[color=#2e8b57]
{/*MSG0*/&quot;sqr&quot;, squareroot},[/color]
[color=#2e8b57]
{/*MSGO*/&quot;MyFunction&quot;, MyFunction},[/color]
[color=#2e8b57]};[/color]

[color=#2f4f4f]and what here??[/color]
[color=#ff0000]ads_real[/color] [color=#2e8b57]NKey  (int x);[/color]
[color=#2e8b57]
[/color]
[color=#2e8b57]
[/color]
[color=#2f4f4f]greetings[/color]
[/size]
[size=2]
[/size]</description>
<author>Zibster</author>
<pubDate>2012-06-26 18:01:34</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15241</link>
<description>:lol Hoping that would not be a hard work.</description>
<author>peimen8012</author>
<pubDate>2012-06-26 15:47:37</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15239</link>
<description>Okey, it's work :)
Thank you - I will try to do the same in my functions.</description>
<author>Zibster</author>
<pubDate>2012-06-26 14:39:47</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15229</link>
<description>[b]Reply [url=http://www.zwsoft.com/forum/redirect.php?goto=findpost&amp;pid=15217&amp;ptid=2209]14#[/url] [i]Zibster[/i] [/b]


It contains two functions:
(fact n) return the factorial of n
For example:
Command: (fact 6)
720.0

(sqr d) return the square root of d
For example:
Command: (sqr 2.0)
1.41421</description>
<author>peimen8012</author>
<pubDate>2012-06-26 09:53:01</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15217</link>
<description>[b]Thank you for example.
Compilation is without problems (SDK ZwCAD2012+).
But how this run?

Declared two fucntions:
[size=2][color=#2e8b57]/* Here we define the array of function names and handlers. */[/color][/size]
[size=2][color=#2e8b57]static struct func_entry func_table[] =[/color][/size]
[size=2][color=#2e8b57] { {/*MSG0*/&quot;fact&quot;, fact},[/color][/size]
[size=2][color=#2e8b57] {/*MSG0*/&quot;sqr&quot;, squareroot},[/color][b][color=#2e8b57] };[/color]
[/b][/size]

Appload &quot;fact.zrx&quot; and, [b]command line:
[/b]
[size=2][color=#a0522d]Command: squareroot[/color][/size]
[size=2][color=#a0522d]Unknown command &quot;SQUAREROOT&quot;.  Press F1 for help.[/color][/size]
[size=2][color=#a0522d]Command: (squareroot)[/color][/size]
[size=2][color=#a0522d]; error: no function definition: SQUAREROOT[/color][/size]
[size=2][color=#a0522d]Command: (fact)[/color][/size]
[size=2][color=#a0522d]nil[/color][/size]
[size=2][color=#a0522d]Command: fact[/color][/size]
[size=2][color=#a0522d]Unknown command &quot;FACT&quot;.  Press F1 for help.[/color][/size]
[color=#a0522d]
[/color]
[color=#000000]I greet[/color]

[/b]</description>
<author>Zibster</author>
<pubDate>2012-06-25 20:00:57</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15216</link>
<description>[attach]465[/attach]
[p=30, 2, left][color=#000000]In order to be more compatible with ARX, ZRX in ZWCAD+ have some changes. So maybe some programs written in old ZRX need to be modified when porting to ZWCAD+. Please refer to attached sample which shows how to define a lisp function in ZRX. Sorry for any inconvenience.[/color][/p]</description>
<author>peimen8012</author>
<pubDate>2012-06-25 19:09:08</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15215</link>
<description>[b]Reply [url=http://www.zwsoft.com/forum/redirect.php?goto=findpost&amp;pid=15211&amp;ptid=2209]10#[/url] [i]Zibster[/i] [/b]


    This is clear. Please wait for a few minutes. I am perparing a sample to you.</description>
<author>peimen8012</author>
<pubDate>2012-06-25 18:38:04</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15213</link>
<description>[b]Your Project in Microsoft Visual Studio 2010 for ZwCAD 2012 +:[/b]
[b][color=#ff0000]error C2065: 'ZCHAR' : undeclared identifier[/color]
[color=#ff0000]error C2065: 'lisp_expr' : undeclared identifier[/color]

[/b][url=https://www.yousendit.com/download/QlVpT20ySytHa05nRXNUQw]link[/url]</description>
<author>Zibster</author>
<pubDate>2012-06-25 18:05:52</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15211</link>
<description>[i=s] Post Last Edit by Zibster at 2012-6-25 17:36 [/i]

[attach]464[/attach]
In attached, you have an example.
I can't to give more, but this code working   properly in ZwCAD2012 (DRX).
How convert this code to ZwCAD2012+ ??
Look at my first post.</description>
<author>Zibster</author>
<pubDate>2012-06-25 17:26:40</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15210</link>
<description>[i=s] Post Last Edit by peimen8012 at 2012-6-25 16:54 [/i]

[attach]463[/attach]

Hi, please refer to the attached file. It shows how to communicate with ZRX and Lisp. Sorry for the late reply.</description>
<author>peimen8012</author>
<pubDate>2012-06-25 16:50:10</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15207</link>
<description>[i=s] Post Last Edit by Alan at 2012-6-25 16:01 [/i]

cool! So how to  do?</description>
<author>Alan</author>
<pubDate>2012-06-25 15:13:36</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15206</link>
<description>I see that no one knows in support ZWSOFT, what is it a VC++...
I's really pathetic...

Where is a documentation?
Where are an examples?
How long should be waiting, to get  a satisfying answer?  ;/</description>
<author>Zibster</author>
<pubDate>2012-06-25 14:34:46</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15139</link>
<description>Wake up Chinese guy! :)
It's 10am :)
What you propose to do with my problem? Any ideas?
Maybe you can send me an example, where the function is not a &quot;void&quot; and return some values?

Good example will be also:
run from command (LISP to ARX):
(MyArx 7 8 &quot;test&quot;)
and after then, Arx return to LISP eg.:
- (1 2 3 &quot;abc&quot; (4 5))</description>
<author>Zibster</author>
<pubDate>2012-06-20 16:15:24</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15122</link>
<description>That must not mean that it makes no sense ...
In version MSV2008, such a record run without problems.
I have a function to handle the hardware key, which is of type INT.
I can not change, so what do I do?
What makes changes where these changes are not needed and pose additional problems?</description>
<author>Zibster</author>
<pubDate>2012-06-18 14:34:48</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15121</link>
<description>Hi Zib
You cannot do like this because...
the value returned by the corresponding command function in ZRX has to be void. it does not make any sense to have this value, actually, not applicable</description>
<author>DDWZW</author>
<pubDate>2012-06-18 10:39:02</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15115</link>
<description>What you so happy? :)</description>
<author>Zibster</author>
<pubDate>2012-06-15 18:11:26</pubDate>
</item><item><link>http://www.zwsoft.com/forum/viewthread.php?tid=2209&amp;pid=15114</link>
<description>[i=s] Post Last Edit by mudcrab at 2012-6-15 17:46 [/i]

:)</description>
<author>mudcrab</author>
<pubDate>2012-06-15 17:34:30</pubDate>
</item>  </channel>
</rss>