CAD software discussion forum > CAD Tutorial & Tips > ZWCAD+ dot NET migration manual, use your autocad dot net application in ZWCAD+

ZWCAD+ dot NET migration manual, use your autocad dot net application in ZWCAD+

Rank: 5Rank: 5


posts: 10

Registered: 2013-7-12

Message 1 of 3

 ZWCAD+ dot NET migration manual, use your autocad dot net application in ZWCAD+
12-07-2013 05:35 . pm | View his/her posts only
ZWCAD+ 2014 supports dot NET application programming interface. You can easily migrate your autocad .net application to ZWCAD+. Following is the migration guide.

1. Open your solution with Visual Studio 2010, change project property [Compile->Advance Compile Options->Target framework (all configurations)] to .NET Framework 4.

ZWCAD dot net api

2013-7-12 17:35

2. In the References tab, replace the references to "acdbmgd.dll" and "acmgd.dll" with "ZwDatabaseMgd.dll" and "ZwManaged.dll", which are in ZWCAD+ installation directory.

ZWCAD dot net api

2013-7-12 17:35

3. If your project references to "Autodesk.AutoCAD.Interop" and "Autodesk.AutoCAD.Interop.Common", replace them with "ZWCAD.exe"

4. In your code, replace all the namespaces "Autodesk.AutoCAD.Interop" and "Autodesk.AutoCAD.Interop.Common" with “ZwCAD”, and replace all the namespaces "Autodesk.AutoCAD.xxxx" with "ZWSoft.ZwCAD.xxxx ".

5. If you use some objects named like Acadxxxx(for example, AcadLine), rename them as Zcadxxxx.

6. Then you can build your solution and use “netload” in ZWCAD+ to load your compiled dll file.

Try ZWCAD+ free for 30 days:

Here are some posts about ZWCAD+ .NET that might be useful for you:
ZWCAD+ .NET elementary guidance
ZWCAD+ .net tutorials and sample codes summary

Rank: 1



posts: 1

Registered: 2012-3-25

Message 2 of 3

13-02-2014 06:04 . pm | View his/her posts only
Reply 1# leilia3835

Hi,I am currently using the ZWCAD 2014 and trying to convert my .net code that i have created for AutoCAD using Object ARX to code suitable to run on ZWCAD as per the instructions in the post. The only problem that i encountered is finding a reference for BlockTableRecordEnumerator that i use in my Object ARX code. the code is as below is available in the attachment
code.rar (1.11 KB) :

Please help me out

Rank: 5Rank: 5


posts: 474

Registered: 2013-5-6

Message 3 of 3

14-02-2014 03:00 . pm | View his/her posts only
Reply 2# e1245966091

ZWCAD+ dot net doesn't support BlockTableRecordIterator, we will fix it as soon as possible. (ID: T8595)

Here is a temporary solution to this problem:

change the codes

BlockTableRecordEnumerator oBtre = oBtr.GetEnumerator;
while (oBtre.MoveNext) {
Entity oEnt = (Entity)oTrans.GetObject(oBtre.Current, OpenMode.ForRead);


foreach (ObjectId objID in oBtr) {
Entity oEnt = (Entity)oTrans.GetObject(objID, OpenMode.ForRead);

See also