Putting Files in Custom Folders and Startup?

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

Moderator: CMS Inc

Post Reply
ErikS1
Contributor
Posts: 16
Joined: Sat Feb 12, 2005 12:01 am

Putting Files in Custom Folders and Startup?

Post by ErikS1 » Mon Dec 15, 2008 11:24 am

I have been putting all of my VBA code in CommonProjects for the past couple of intellicad versions (and have generated quite a lot of it).

I just upgraded to v6.6 and have been having issues with startup when the security level is set to "medium" that I am work though with CMS.

Along the way, it was suggested that I put all of my code into a custom folder rather than commonprojects.vbi, and use VBILOAD to load the custom project.

This seems to work, but I am not sure how to get the custom file to load at startup as commonprojects does (these are tools that I use frequently).

Any suggestions?

Thanks, Erik
JCAMPOS

Post by JCAMPOS » Tue Dec 16, 2008 5:48 am

Hello Erik,

Simply import your macros (previously exported to BAS, CLS or FRM) into the Commonprojects.vbi file with "File->Import File..." menu item in the VBA Editor.

Regards,
JCAMPOS
ErikS1
Contributor
Posts: 16
Joined: Sat Feb 12, 2005 12:01 am

Post by ErikS1 » Tue Dec 16, 2008 8:03 am

Hello JCAMPOS,

That is roughly what I have been doing to upgrade to previous versions of Intellicad. However, if I understand your suggestion correctly, this leaves them in commonprojects.vbi. I am interested in exploring alternatives to this.

The suggestion I got from CMS was:

"With this new release you do not need anymore to use commonprojects.vbi on CMS IntelliCAD folder. Use command VBILOAD to load your file from a custom folder."

It is fairly easy to put things in another .VBI file. I can also use VBILOAD manually to load it. What I am not sure how to do, is to have the load happen automatically at startup.

Thanks,
Erik
JCAMPOS

Post by JCAMPOS » Tue Dec 16, 2008 8:33 am

Hi Erik,

Yes, I was suggesting to put all of your macros in the commonprojects.vbi. With the new version we don't need anymore to rely on the commonprojects.vbi, since the new VBILOAD command can be used to load any custom vbi file. However, if you want to load your macros automatically at startup, you must still use commonprojects. Alternatively, you can create/edit icad.lsp to force IntelliCAD to load your custom vbi file at startup, like this:

(command "vbiload" [CustomVBIFileWithCompletePath.vbi])

Regards,
JCAMPOS
ErikS1
Contributor
Posts: 16
Joined: Sat Feb 12, 2005 12:01 am

Post by ErikS1 » Tue Dec 16, 2008 8:59 am

The command for icad.lsp looks exactly like what I was looking for.

Actually, now that I think about it though, I could probably also put the VBILOAD command into the string for my custom menu items. I'll have to try this out as well.

Thanks Again,
Erik
Post Reply