Learning VBA

The VBA forum deals with IntelliCAD 2000 VBA (Visual Basic for Applications) issues.

Moderator: CMS Inc

Post Reply
warrensugden
Contributor
Posts: 17
Joined: Wed May 09, 2007 11:01 pm
Location: Barraba, NSW, Australia

Learning VBA

Post by warrensugden » Sun May 13, 2007 12:58 am

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
John Finlay

Post by John Finlay » Sun May 13, 2007 10:56 pm

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
warrensugden
Contributor
Posts: 17
Joined: Wed May 09, 2007 11:01 pm
Location: Barraba, NSW, Australia

Post by warrensugden » Sun May 13, 2007 11:29 pm

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
warrensugden
Contributor
Posts: 17
Joined: Wed May 09, 2007 11:01 pm
Location: Barraba, NSW, Australia

Post by warrensugden » Mon May 14, 2007 12:13 am

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
John Finlay

Post by John Finlay » Mon May 14, 2007 1:45 am

Tutorials are here:
http://www.intellicadms.com/ubb/Forum3/HTML/000092.html

------------------
Regards
John Finlay
Post Reply