I don't use the wizards and advise others to not use them,
mainly because Visual Studio project and item templates
are just as easy to use and can be easily customized to
include commonly-used items.
Anyway, the problem you have is the CommandClass
attribute.
When you use this attribute with any class in an assembly,
the managed runtime assumes that only classes which the
attribute is used with expose command methods. So, to
add commands to another class, you must also use the
CommandClass attribute just as it's used with the wizard-
generated class.
[assembly: CommandClass( typeof( MyCommandClass ) )]
where 'MyCommandClass' is the class that exposes one
or more command methods. You can repeat this attribute
for every class that exposes command methods, and you
generally do that at the top of the code file containing the
class.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2010
http://www.acadxtabs.com
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");
wrote in message news:6300742@discussion.autodesk.com...
When you use the wizard to create a project you end up with myCommands.cs
and myPlugin.cs. I can empty all the existing code out of myPlugin.cs and
program in a custom class, however if you build and try to run the code
AutoCAD says that it cannot find a function by the name I called it.
If I move this function into myCommands.cs then it will work fine. I
thought you can have as many cs files as you want and they end up getting
linked all into the same dll? Why can I not access commands written in the
myPlugin.cs file?