.NET
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
*Henk Loonstra
Demand Loading question
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
273 Views, 8 Replies
11-02-2006 02:32 AM
Hi all,
I found in this newsgroup this nice method for autoload a .NET application:
adding the app to "...\Autodesk\...\Applications" in the Registry. I still
have a few questions.
1. I have some document eventhandlers i'd like to initialize during startup
of AutoCAD. Is it possible to autostart a (registered) function in my app,
without using scripts or lisp?
2. What's the benefit of adding Commands and Groups at this location in the
Registry (all my functions in the dll defined by [CommandMethod ... ] work,
even if they are registered or not)? Or can I use this to define an
automatically starting function?
I'm using .NET for AutoCAD 2006.
Tnx
Henk
I found in this newsgroup this nice method for autoload a .NET application:
adding the app to "...\Autodesk\...\Applications" in the Registry. I still
have a few questions.
1. I have some document eventhandlers i'd like to initialize during startup
of AutoCAD. Is it possible to autostart a (registered) function in my app,
without using scripts or lisp?
2. What's the benefit of adding Commands and Groups at this location in the
Registry (all my functions in the dll defined by [CommandMethod ... ] work,
even if they are registered or not)? Or can I use this to define an
automatically starting function?
I'm using .NET for AutoCAD 2006.
Tnx
Henk
*Tony Tanzillo
Re: Demand Loading question
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-02-2006 03:25 PM in reply to:
*Henk Loonstra
The LOADCTRLS entry controls how your app is loaded,
and there is a flag that will tell AutoCAD to load it at
startup automatically. See the ObjectARX docs for the
appropriate values.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
"Henk Loonstra" wrote in message news:5382433@discussion.autodesk.com...
Hi all,
I found in this newsgroup this nice method for autoload a .NET application:
adding the app to "...\Autodesk\...\Applications" in the Registry. I still
have a few questions.
1. I have some document eventhandlers i'd like to initialize during startup
of AutoCAD. Is it possible to autostart a (registered) function in my app,
without using scripts or lisp?
2. What's the benefit of adding Commands and Groups at this location in the
Registry (all my functions in the dll defined by [CommandMethod ... ] work,
even if they are registered or not)? Or can I use this to define an
automatically starting function?
I'm using .NET for AutoCAD 2006.
Tnx
Henk
and there is a flag that will tell AutoCAD to load it at
startup automatically. See the ObjectARX docs for the
appropriate values.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
"Henk Loonstra"
Hi all,
I found in this newsgroup this nice method for autoload a .NET application:
adding the app to "...\Autodesk\...\Applications" in the Registry. I still
have a few questions.
1. I have some document eventhandlers i'd like to initialize during startup
of AutoCAD. Is it possible to autostart a (registered) function in my app,
without using scripts or lisp?
2. What's the benefit of adding Commands and Groups at this location in the
Registry (all my functions in the dll defined by [CommandMethod ... ] work,
even if they are registered or not)? Or can I use this to define an
automatically starting function?
I'm using .NET for AutoCAD 2006.
Tnx
Henk
*Henk Loonstra
Re: Demand Loading question
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-03-2006 05:44 AM in reply to:
*Henk Loonstra
Thanx Tony for your response.
My .NET application is automatically loaded at AutoCAD startup now, thanx to
these Register settings.
What I am looking for is a way to trigger a function (i.e. "void
MyOnAppStartUp()") automatically when my app is loaded.
Is this possible in .NET ?
"Tony Tanzillo" schreef in bericht
news:5383699@discussion.autodesk.com...
The LOADCTRLS entry controls how your app is loaded,
and there is a flag that will tell AutoCAD to load it at
startup automatically. See the ObjectARX docs for the
appropriate values.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
"Henk Loonstra" wrote in message
news:5382433@discussion.autodesk.com...
Hi all,
I found in this newsgroup this nice method for autoload a .NET application:
adding the app to "...\Autodesk\...\Applications" in the Registry. I still
have a few questions.
1. I have some document eventhandlers i'd like to initialize during startup
of AutoCAD. Is it possible to autostart a (registered) function in my app,
without using scripts or lisp?
2. What's the benefit of adding Commands and Groups at this location in the
Registry (all my functions in the dll defined by [CommandMethod ... ] work,
even if they are registered or not)? Or can I use this to define an
automatically starting function?
I'm using .NET for AutoCAD 2006.
Tnx
Henk
My .NET application is automatically loaded at AutoCAD startup now, thanx to
these Register settings.
What I am looking for is a way to trigger a function (i.e. "void
MyOnAppStartUp()") automatically when my app is loaded.
Is this possible in .NET ?
"Tony Tanzillo"
news:5383699@discussion.autodesk.com...
The LOADCTRLS entry controls how your app is loaded,
and there is a flag that will tell AutoCAD to load it at
startup automatically. See the ObjectARX docs for the
appropriate values.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
"Henk Loonstra"
news:5382433@discussion.autodesk.com...
Hi all,
I found in this newsgroup this nice method for autoload a .NET application:
adding the app to "...\Autodesk\...\Applications" in the Registry. I still
have a few questions.
1. I have some document eventhandlers i'd like to initialize during startup
of AutoCAD. Is it possible to autostart a (registered) function in my app,
without using scripts or lisp?
2. What's the benefit of adding Commands and Groups at this location in the
Registry (all my functions in the dll defined by [CommandMethod ... ] work,
even if they are registered or not)? Or can I use this to define an
automatically starting function?
I'm using .NET for AutoCAD 2006.
Tnx
Henk
*Henk Loonstra
Re: Demand Loading question
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-03-2006 05:55 AM in reply to:
*Henk Loonstra
I saw this link in another tread:
http://discussion.autodesk.com/thread.jspa?message ID=4531456
The same question was asked there.
1. autoload the .NET dll using the Registry
2. autostart a function using autocad.lsp, .mnl or .cui.
Is this really the best way?
"Tony Tanzillo" schreef in bericht
news:5383699@discussion.autodesk.com...
The LOADCTRLS entry controls how your app is loaded,
and there is a flag that will tell AutoCAD to load it at
startup automatically. See the ObjectARX docs for the
appropriate values.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
"Henk Loonstra" wrote in message
news:5382433@discussion.autodesk.com...
Hi all,
I found in this newsgroup this nice method for autoload a .NET application:
adding the app to "...\Autodesk\...\Applications" in the Registry. I still
have a few questions.
1. I have some document eventhandlers i'd like to initialize during startup
of AutoCAD. Is it possible to autostart a (registered) function in my app,
without using scripts or lisp?
2. What's the benefit of adding Commands and Groups at this location in the
Registry (all my functions in the dll defined by [CommandMethod ... ] work,
even if they are registered or not)? Or can I use this to define an
automatically starting function?
I'm using .NET for AutoCAD 2006.
Tnx
Henk
http://discussion.autodesk.com/thread.jspa?message
The same question was asked there.
1. autoload the .NET dll using the Registry
2. autostart a function using autocad.lsp, .mnl or .cui.
Is this really the best way?
"Tony Tanzillo"
news:5383699@discussion.autodesk.com...
The LOADCTRLS entry controls how your app is loaded,
and there is a flag that will tell AutoCAD to load it at
startup automatically. See the ObjectARX docs for the
appropriate values.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
"Henk Loonstra"
news:5382433@discussion.autodesk.com...
Hi all,
I found in this newsgroup this nice method for autoload a .NET application:
adding the app to "...\Autodesk\...\Applications" in the Registry. I still
have a few questions.
1. I have some document eventhandlers i'd like to initialize during startup
of AutoCAD. Is it possible to autostart a (registered) function in my app,
without using scripts or lisp?
2. What's the benefit of adding Commands and Groups at this location in the
Registry (all my functions in the dll defined by [CommandMethod ... ] work,
even if they are registered or not)? Or can I use this to define an
automatically starting function?
I'm using .NET for AutoCAD 2006.
Tnx
Henk
Re: Demand Loading question
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-03-2006 12:30 PM in reply to:
*Henk Loonstra
Henk,
Have you looked at implementing the IExtensionApplication Interface?
They way this works is
1.you create a new class
2.implement the Autodesk.AutoCAD.Runtime.IExtensionApplication interface on this class.
3. add a assembly level attribute 'Autodesk.AutoCAD.Runtime.ExtensionApplicationAttr ibute' passing the system.type of your new class.
When autocad loads your add-in, it looks for the attribute (from #3) and if it finds it it looks as the type referenced for interface IExtensionApplication. If it finds the IExtensionApplication interface, it will fire the Initialize method of that interface. You could try to put your code there.
C
Have you looked at implementing the IExtensionApplication Interface?
They way this works is
1.you create a new class
2.implement the Autodesk.AutoCAD.Runtime.IExtensionApplication interface on this class.
3. add a assembly level attribute 'Autodesk.AutoCAD.Runtime.ExtensionApplicationAttr
When autocad loads your add-in, it looks for the attribute (from #3) and if it finds it it looks as the type referenced for interface IExtensionApplication. If it finds the IExtensionApplication interface, it will fire the Initialize method of that interface. You could try to put your code there.
C
*Tony Tanzillo
Re: Demand Loading question
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-03-2006 03:02 PM in reply to:
*Henk Loonstra
You can implement IExtensionApplication to execute
code when your assembly loads.
The Initialize() member is where you would do that.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
"Henk Loonstra" wrote in message news:5384185@discussion.autodesk.com...
I saw this link in another tread:
http://discussion.autodesk.com/thread.jspa?message ID=4531456
The same question was asked there.
1. autoload the .NET dll using the Registry
2. autostart a function using autocad.lsp, .mnl or .cui.
Is this really the best way?
"Tony Tanzillo" schreef in bericht
news:5383699@discussion.autodesk.com...
The LOADCTRLS entry controls how your app is loaded,
and there is a flag that will tell AutoCAD to load it at
startup automatically. See the ObjectARX docs for the
appropriate values.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
"Henk Loonstra" wrote in message
news:5382433@discussion.autodesk.com...
Hi all,
I found in this newsgroup this nice method for autoload a .NET application:
adding the app to "...\Autodesk\...\Applications" in the Registry. I still
have a few questions.
1. I have some document eventhandlers i'd like to initialize during startup
of AutoCAD. Is it possible to autostart a (registered) function in my app,
without using scripts or lisp?
2. What's the benefit of adding Commands and Groups at this location in the
Registry (all my functions in the dll defined by [CommandMethod ... ] work,
even if they are registered or not)? Or can I use this to define an
automatically starting function?
I'm using .NET for AutoCAD 2006.
Tnx
Henk
code when your assembly loads.
The Initialize() member is where you would do that.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
"Henk Loonstra"
I saw this link in another tread:
http://discussion.autodesk.com/thread.jspa?message
The same question was asked there.
1. autoload the .NET dll using the Registry
2. autostart a function using autocad.lsp, .mnl or .cui.
Is this really the best way?
"Tony Tanzillo"
news:5383699@discussion.autodesk.com...
The LOADCTRLS entry controls how your app is loaded,
and there is a flag that will tell AutoCAD to load it at
startup automatically. See the ObjectARX docs for the
appropriate values.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com
"Henk Loonstra"
news:5382433@discussion.autodesk.com...
Hi all,
I found in this newsgroup this nice method for autoload a .NET application:
adding the app to "...\Autodesk\...\Applications" in the Registry. I still
have a few questions.
1. I have some document eventhandlers i'd like to initialize during startup
of AutoCAD. Is it possible to autostart a (registered) function in my app,
without using scripts or lisp?
2. What's the benefit of adding Commands and Groups at this location in the
Registry (all my functions in the dll defined by [CommandMethod ... ] work,
even if they are registered or not)? Or can I use this to define an
automatically starting function?
I'm using .NET for AutoCAD 2006.
Tnx
Henk
*Henk Loonstra
Re: Demand Loading question
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-04-2006 12:42 PM in reply to:
*Henk Loonstra
Wow, thanx again Tony and you too CougerAC !!!
This "entrypoint" is exactly what I needed.
I implemented a new class (i.e.: MyOwnApp: IExtensionApplication), and added
a public void Initialize() with code to initialize my eventhandlers.
Everything worked immediately without any error.
Regards,
Henk
This "entrypoint" is exactly what I needed.
I implemented a new class (i.e.: MyOwnApp: IExtensionApplication), and added
a public void Initialize() with code to initialize my eventhandlers.
Everything worked immediately without any error.
Regards,
Henk
Re: Demand Loading question
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-29-2012 08:02 AM in reply to:
cgay
I'm using a similar entry point but am finding that the plugin is only viable within the drawing active when it was loaded. If i start a new drawing, or switch to another draiwng, the plugin (and it's commands and classes) isn't recognized. Any thoughts on how I can load my plugin into ALL drawings either open or opened after the plugin is loaded?
Re: Demand Loading question
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
08-03-2012 08:49 AM in reply to:
iwcwoodworker
Found my answer to my post:

