GstarCAD 2022 VBA Migration Guide
GstarCAD 2022 VBA Migration Guide
Contents
1. Code migration
-
Open the dvb file in AutoCAD.
-
Open the VBA editor (with "vbaide" command) in GstarCAD and create a new project.
-
Copy all the contents of the dvb file to the VBA project which just has been created in GstarCAD.
- Code modification
-
Replace the COM object "Acad" which used in the AutoCAD with the corresponding COM object "Gcad" in GstarCAD. Such as replacing "AcadLine" with "GcadLine".
-
Replace the object "Application" which used in the AutoCAD with the corresponding object "gcad.application" in GstarCAD.
Note
VBA is only available in 32bits version of GstarCAD. Currently, 64bits version of GstarCAD can’t support VBA.
