Results 1 to 8 of 8

Thread: Trouble getting started.

  1. #1
    100 Club
    Join Date
    2002-10
    Posts
    154
    Login to Give a bone
    0

    Default Trouble getting started.

    I was trying to start using Visual Studio 2008 .Net. I found the AutoCad 2010 .NET API Training Labs for VB. I folllowed all of the instructions but I can't get AutoCad to run in the debug mode (hit F5 or Play from VB). When AutoCAD comes up, it gives me the error message:

    Unhandled exception has occured in a component in your application......
    The Component
    'Autodesk.AutoCAD.ACInfoCenterConn.MyAutoCadBalloon' does not have a resource identified by the URI
    '/AcWindows;component/infocenteracconn/myautocadbaloon.xaml'

    Application does not support just-in-time (JIT)
    debugging. see the end of the messag for details...
    ..
    ************** JIT Debugging **************
    Application does not support Windows Forms just-in-time (JIT)
    debugging. Contact the application author for more
    information.

    If I open an AutoCad session by itself, I can load the dll and run it with out any errors but there is no debugging since it is not being handled by VB.

    Here is my code... Can you please let me know what I am doing wrong.

    TIA
    Jason


    Imports Autodesk.AutoCAD.ApplicationServices
    Imports Autodesk.AutoCAD.EditorInput
    Imports Autodesk.AutoCAD.Runtime

    Public Class Class1
    <CommandMethod("HelloWorld")> _
    Public Sub HelloWorld()
    Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
    ed.WriteMessage("Hello World 5")
    End Sub
    End Class
    Last edited by jluker; 2009-11-17 at 07:37 PM.

  2. #2
    Active Member
    Join Date
    2007-04
    Posts
    81
    Login to Give a bone
    0

    Default Re: Trouble getting started.

    under propoerties of your project and under debug, have you set the extternal program to acad.exe?

    Patrick Johnson
    http:\\www.cadenhancement.com

  3. #3
    100 Club
    Join Date
    2002-10
    Posts
    154
    Login to Give a bone
    0

    Default Re: Trouble getting started.

    yes I have set it to the Acad.exe under 2010 directory. When I hit F5 or play, it loads Autocad but it gives me that error. Then I hit continue and try loading the dll but nothing happens. If I load AutoCad by itself and then load the dll, it will work but there is no debugging when I do it this way.

  4. #4
    100 Club
    Join Date
    2002-10
    Posts
    154
    Login to Give a bone
    0

    Default Re: Trouble getting started.

    I figured it out. If you go to the Properties>References and look at the AcDbMgd and AcMgd references, you need to make sure that the Copy Local is set to False. Once I changed that, it opened AutoCAD with no errors.

  5. #5
    Active Member
    Join Date
    2006-08
    Location
    Brisbane : GMT+10
    Posts
    87
    Login to Give a bone
    0

    Default Re: Trouble getting started.

    Quote Originally Posted by jluker View Post
    I figured it out. If you go to the Properties>References and look at the AcDbMgd and AcMgd references, you need to make sure that the Copy Local is set to False. Once I changed that, it opened AutoCAD with no errors.
    Yes, that's a well documented trap.

    For future reference.

    The reference to 'InfoCenter' in your exception message indicates to me that there may be more to your problem than you think ... or at least that you have a bit more in your code or references than your posted code indicates.

    Without seeing the original Solution/Project files it's a little difficult to say ....

    Regards
    Kerry
    Last edited by Kerry Brown; 2009-11-18 at 08:35 AM.

  6. #6
    100 Club
    Join Date
    2002-10
    Posts
    154
    Login to Give a bone
    0

    Default Re: Trouble getting started.

    There was not any more than I posted. Just a "Hello World" sent to the command line. I have attached a zip file of the Project and a text file with the error saved in the first directory. I changed the References setting for Copy Local back to True so that you could see the errors.

    If there is more that I did wrong, please let me know because I did not do much.
    Attached Files Attached Files

  7. #7
    Active Member
    Join Date
    2006-08
    Location
    Brisbane : GMT+10
    Posts
    87
    Login to Give a bone
    0

    Default Re: Trouble getting started.

    Thanks for that info Tony.

    I have the Option set, so I've never noticed the address in his Exception before
    ie
    Unhandled exception has occured in a component in your application......
    The Component
    'Autodesk.AutoCAD.ACInfoCenterConn.MyAutoCadBalloon' does not have a resource identified by the URI
    '/AcWindows;component/infocenteracconn/myautocadbaloon.xaml'
    Regards
    Kerry

  8. #8
    Member
    Join Date
    2006-12
    Posts
    7
    Login to Give a bone
    0

    Default Re: Trouble getting started.

    You solution worked! Thank you.

Similar Threads

  1. Getting Us Started
    By ECRUEY in forum Revit Structure - General
    Replies: 8
    Last Post: 2010-02-14, 05:41 PM
  2. help in getting started
    By udaysiram in forum Revit MEP - General
    Replies: 9
    Last Post: 2009-02-25, 02:55 PM
  3. Getting Started
    By wags5116 in forum Revit MEP - General
    Replies: 3
    Last Post: 2009-01-12, 08:22 AM
  4. Getting started with ADT
    By nic in forum ACA General
    Replies: 7
    Last Post: 2005-03-10, 05:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •