CAD/CAM discussion forum > CAD Tutorial & Tips > Use your AutoCAD VBA application in ZWCAD+

Use your AutoCAD VBA application in ZWCAD+

    
  Subscribe Topic

Rank: 5Rank: 5

David

posts: 13

Registered: 2012-8-13

Message 1 of 1

 Use your AutoCAD VBA application in ZWCAD+
27-04-2013 03:58 . pm   |   View his/her posts only
How to use your AutoCAD VBA application in ZWCAD+? How to migrate AutoCAD VBA application to ZWCAD+? In AutoCAD, the VBA application is in DVB format which can't be used in ZWCAD+ directly(ZWCAD+ uses ZPVB as the extension of its VBA application),but you can still keep your VBA application in ZWCAD+ with a little modification mentioned below:

1. Copy all codes in Thisdrawing from AutoCAD to ZWCAD+.
Tips:If your VBA contains Classes, modules or forms, please export it in AutoCAD and then import to ZWCAD+.

2. Change entities type from AcadXXX to ZcadXXX, for example, AcadLayer→ZcadLayer, IAcadLWPolyline→IZcadLWPolyline.
Tips:You can just replace all "Acad" with "Zcad".

3. Change all the entity declaration from acXXX to zcXXX, for example, acRed→zcRed, AcadAcCmColor→ZcadZcCmColor.
Tips: Please keep the Objectname the same as that in AutoCAD, such as AcDbLine must be kept.

4. If you use this, please Modify: AcadApplication.GetInterfaceObject("AutoCAD.AcCmColor.16")→ZcadApplication.GetInterfaceObject("ZWCAD.ZcCmColor ").

5. Save your project in ZPVB format and finish the modification.



Try ZWCAD+ free for 30 days:
http://www.zwsoft.com/zwcad+/
See also
X