Learning VBA

#1
I am learning VBA

I have created 3 drawing files, Drawing1, Test_VBA and VBA_warren.

I have also created the LoadApp example in John McIvers notes, Part2 and enhanced it by adding my own reactangle.

When I load Drawing1 and also run the macro, I am able to reproduce the rectangle, but using either of the other 2, I cannot.

Why NOT ????

I do not understand the Common Projects and how it relates to the macro or works.

Warren Sugden
warrensugden@netspace.net.au

#2
warrensugden,

Have you had a look at the tutorials I have in this forum?

CommonProjects is automatically referenced by VBA in IntelliCAD.

This means that all IntelliCAD drawings can access any code residing in the CommonProjects.vbi files.

Check if Drawing1.dwg has a corresponding Drawing1.vbi file which has code in it?

You may have different modules where the code is located.

------------------
Regards
John Finlay

#3
I store all my drawings in myDocuments/myCAD/Icad62 and all 3 drawings are stored there together with the 3 .vbi files.

CommonProjects.vbi is stored in Program Files / CMS

I still have the problem that 1 drawing can display the rectangle and the other 2 can't.

I was not able to find any reference to your Tutorials. Where do I find them ???

warren Sugden

#4
I solved that problem.

The two other drawings were created from a template drawing which includes a number of layers, text styles and dimension styles.

The model space drawing has a text desription of the styles layers etc. included in the template. I have several templates, each with a different setup.

The rectangle was in fact formed but was at a very different scale and appeared only as a dot.

Warren Sugden