Results 1 to 7 of 7

Thread: New to API, debugging problem

  1. #1
    Member
    Join Date
    2012-05
    Posts
    29
    Login to Give a bone
    0

    Default New to API, debugging problem

    hi All,

    currently I am exploring revit api.

    i am using revit 2015, and VS 2013 express.

    from, http://usa.autodesk.com/adsk/servlet...12&id=16849339
    Lesson 1: basic plug in, I try to copy and paste the code that is stated inside the tutorial and build with no problem.
    also copy manifest file for my plug in registration but when I debug, shows that.


    need help.

    thanks,
    Mj
    Attached Images Attached Images

  2. #2
    I could stop if I wanted to hugh.69031's Avatar
    Join Date
    2016-01
    Location
    Melbourne, Australia
    Posts
    360
    Login to Give a bone
    0

    Default Re: New to API, debugging problem

    I'm guessing you're trying to run the .DLL directly.

    VS should instead be coaxed into loading Revit which in turn will load and run your code, normally in Debug mode.

    In your VS project properties' Debug tab, set the Start Action to "Start External Program", browse for your Revit.exe then set the Configuration to Debug before trying again.

    hth,

    Hugh Adamson
    www.hatchkit.com.au

  3. #3
    Member
    Join Date
    2012-05
    Posts
    29
    Login to Give a bone
    0

    Default Re: New to API, debugging problem

    Hi Hugh,

    thank you for the response,

    I tried to install VS 2013 ultimate a trial version and I saw what you refer about the debug thing. I wonder why in my express edition "start external Program" is not there.

    when I tried to copy the sample manifest, http://usa.autodesk.com/adsk/servlet...12&id=16849339
    I got issue on the manifest, see imageManifest Pic.JPG

    so I went to VS, tools-> create GUI Manifest Pic new GUI.jpg
    so when I run again the debug, I can no longer see the problem, but the add in is not shown in revit.

    am i doing wrong?

    thank you,
    Mj
    Last edited by markclarenzze; 2015-06-06 at 04:44 AM.

  4. #4
    I could stop if I wanted to hugh.69031's Avatar
    Join Date
    2016-01
    Location
    Melbourne, Australia
    Posts
    360
    Login to Give a bone
    0

    Default Re: New to API, debugging problem

    This looks like configuration glitches and the sad fact is that until everything is correct, nothing works. ...

    Seems express editions lack the "start external Program" option.
    http://stackoverflow.com/questions/9...ternal-program
    and this is addressed here:
    http://usa.autodesk.com/adsk/servlet...12&id=20132893


    Try the VS community edition instead?
    https://www.visualstudio.com/en-us/n...munity-vs.aspx

    (I use VS2012 Pro and am not familiar with CE or EE versions.)


    Anyhow, one way to get started is to take an example from the SDK and get it going and see how all the bits are hooked together. Then try the tutorial again.

  5. #5
    Member
    Join Date
    2012-05
    Posts
    29
    Login to Give a bone
    0

    Default Re: New to API, debugging problem

    hi Hugh,

    thank you for the feedback.
    now i can debug my things and at least can move forward.

    while reading a lot of tutorial,

    I found this to be confusing, what is the difference between the 2?
    1.class CsAddpanel : Autodesk.Revit.UI.IExternalApplication
    {
    public Autodesk.Revit.UI.Result OnStartup(UIControlledApplication application)
    2. public class Class1 : IExternalCommand
    {
    {
    public Autodesk.Revit.UI.Result Execute(ExternalCommandData revit,
    ref string message, ElementSet elements)

    most of the tutorials are using item 2, while both item 1 & 2 are used in revit api guide.

    thanks a lot,
    mark

  6. #6
    I could stop if I wanted to
    Join Date
    2007-07
    Location
    London, UK
    Posts
    361
    Login to Give a bone
    0

    Default Re: New to API, debugging problem

    For debugging, I just attach VS to the revit process, before executing the external command/App.

  7. #7
    I could stop if I wanted to hugh.69031's Avatar
    Join Date
    2016-01
    Location
    Melbourne, Australia
    Posts
    360
    Login to Give a bone
    0

    Default Re: New to API, debugging problem

    Quote Originally Posted by markclarenzze View Post
    I found this to be confusing, what is the difference between the 2?
    Sorry I just noticed this.

    Way to find out is to drop a breakpoint within each, run the Add-in and see what happens.

    IIRC one is executed by the Add-In when just loaded, the other when the Add-In is invoked from a Ribbon button.

    Hugh Adamson
    www.hatchkit.com.au

Similar Threads

  1. Need help debugging.
    By Borgster in forum AutoLISP
    Replies: 2
    Last Post: 2012-12-27, 03:55 PM
  2. Debugging problem
    By Nirantar.Vidyarthee904215 in forum AutoLISP
    Replies: 0
    Last Post: 2012-12-25, 07:49 PM
  3. Debugging
    By michael.montagne in forum Revit - API
    Replies: 17
    Last Post: 2009-06-20, 08:55 PM
  4. API Debugging process - Am I doing this right?
    By scowsert in forum Revit - API
    Replies: 2
    Last Post: 2008-11-12, 06:21 AM
  5. Need help debugging a family
    By adegnan in forum Revit Architecture - Families
    Replies: 4
    Last Post: 2004-04-16, 12:01 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
  •