How to create an add-in?

#1
Hello all,

Does any-one know what the format of an VBA Add-in for IntelliCAD 4 is supposed to be? The help file is not very helpfull in this aspect.

If it is a simple .vbi file, then how do I register it so it becomes available in the Add-in manager?

Thanks! Gerrit

#3
Hi ssc,

Maybe we can work it out together. I actually assume it is not yet implemented.
Image
(probably since the release of ICAD 98 no development with VBA has been carried out).

First we should realise three windows (Macros, Add-In Manager and Security) are natives from the VBA IDE.

By now I realise that we should not take the Add-In Manager as a sort of Add-In folder that (for instance) MS Office supports to load more that one VBA-project at a time. This is a functionality I am really missing in IntelliCAD!

(It turned out that I have a Add-In (in the manager) installed in Excel and it is a DLL file. So here I lost my interest to create one myself...)

Unfortunately improving VBA seems not considered high priority at the consortium. Even a plain bug (like neglecting a signed project at security level high) has not been repaired in version 4 yet

Gerrit

#6
AHM,

I will dig it up and send it to you if you have an email address in your profile.

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

#7
John,

When you say add-in are you talking about a dll, I have created these from vb.net and they work fine. The question I have is with regards to the vba add-in manager, does it work? Or are we stuck with all code going into common projects?

Thank you,

ssc

#8
ssc,
I'm talking about a .dll and yes the Add-In manager works in ICAD.


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

#9
I started this thread. I don't think I was very clear. I didn't really fully understand. But I have some questions.

1.
Indeed css asked this question as well: Can I create and store my VBA projects in more than one file and handle these as add-ins? Some distributions of IntelliCAD come with a password protected CommonProjects.vbi with some handy tools. This blocks me fully from adding my own code...

2.
I am quite OK with VBA, but never even touched VB.
Would it be difficult to step over?
How about the IntelliCAD object model. Does VB use the same as VBA, or does it significantly add to this model?

Thanks, Gerrit

#10
gkiers,

First:
There are two formats used for VBA Add-Ins:
1/ An executable format with the file extension .exe
These run external to the memory used to run ICAD and are slow however, they can be used to do processing or calculations while ICAD does its work.

2/ A Dynamic Link Library with the file format .dll
These run in the same memory used to run ICAD and operate at the same speed as a VBA routine.

.dll's could only be created using say VB and I think it needed version 4 at least. .dll's can now be created using the latest version of MS Office and I think it is the one after Office 2000 (you need to check with Microsoft)

Second:
You can have as many .dll's as you need because they are like stand alone repositories for code and are called like ICAD commands. Some .dll's can be set to autoload when ICAD starts and you can load and unload .dll's as and when you need them just like Lisp Routines.
Using .dll's overcomes the CommonProjects.vbi file protection that some (shall we say lazy) programmers have used to create and distribute protected code.
You are never blocked from using your own code because you can open a drawing with its own .vbi file containing your code and call this even if the drawing is not the active document.

Finally:
The code in VB and VBA are the same; in actual fact Microsoft creates the VBA for it's Office Products and then produces the stand alone version of VB.
VB has more tools and objects for creating things like .dll's, .exe's and databases with some minor syntax changes to VBA.
When it comes to ICAD the VB is required to reference the IntelliCAD Objects and there are no syntax variations between VBA or VB.
Modules, Forms and Class Modules are created very similar in both VB and VBA so you could easily migrate between VB and VBA.

I trust this answers all your questions that you have posted. I try to make my answers as simple as possible because of the large audience that lurk.



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

#11
John,
Thanks a lot for your extended reply!
While you parly confirm what I expected, you also added a lot of usefull information new to me.

Gerrit
cron