.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

To debug the plugin

4 REPLIES 4
Reply
Message 1 of 5
krisnakumar
453 Views, 4 Replies

To debug the plugin

Hi, 

I am new to Autocad Integration,  Here I have found some tutorial to create a plugin.  I have got the template for creating the Plugin.   However,  I am unable to debug my plugin in the Visual Studio .. 

 

in the XML file 

 

<ComponentEntry AppName="Quick Search" Version="3.0.0.0" ModuleName="C:\Users\XXX\Documents\Quicksearch\bin\Debug\Autocad_SearchWidget.dll" AppDescription="This will help to search quickly" LoadOnAutoCADStartup="True" LoadOnCommandInvocation="True">

 

it is not hitting the  "void IExtensionApplication.Initialize()" method while application starts .. 

Currently, I am using VS2012, 4.5 .net framework, AutoCad 2015

 

Please guide me, if I am missing anything .. Thanks in advance.. 

4 REPLIES 4
Message 2 of 5
BrianPruitt
in reply to: krisnakumar

A couple of things to check....
1: Are you using NETLOAD command in AutoCAD? Only when you load the dll will the Initialize method be called.
2: Is Visual Studio in Debug or Release mode. Break points won't be hit if you are running in Release.
Message 3 of 5
krisnakumar
in reply to: BrianPruitt

Thank you Brain for your response,
Yes I can load my dll only using the NETLOAD command in Autocad.. At that time only the initalize method is called ..
I am in debug mode .. After I load my dll using NETLOAD command , I am able to debug..

How to make my assembly to load automatically in Autocad ..
Is there a way to run this NETLOAD command to load the dll on Autocad startup

need help on this . Thanks in advance

Message 4 of 5
BrianPruitt
in reply to: krisnakumar

Yes, you can have the dll loaded at application startup.

 

I'm using AutoCAD 2015 so I only have experience with it. Having said that, you can create a plug-in package that will be loaded when AutoCAD starts. Check out the help file at http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-5E50A846-C80B-4FFD-8DD3-C20B22098008

 

Regards,

Message 5 of 5
dgorsman
in reply to: krisnakumar

I would avoid automatically loading a plug-in that is under construction e.g. with a severe error you could crash out of AutoCAD without any idea of whats wrong.  You want to minimize the number of potential problems so when there is a problem you are diagnosing that problem and not something else.  First - core functions.  Second - initialization (because you already know the meat of the program works).  Third - auto-loading (because you already know the meat of the program works, and it is initializing properly).

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost