See the top rated post in this thread. Click here

Results 1 to 10 of 10

Thread: Frustrated

  1. #1
    100 Club
    Join Date
    2003-06
    Posts
    121
    Login to Give a bone
    0

    Default Frustrated

    I have downloaded VS2008 Express C# and am trying to make my way through the Revit 2011 Developer's Guide. Sadly I can't get past the HelloWorld Addin! It builds fine, I don't have a D drive so I have located my project in C:\Projects. I found my projects Guid from the project properties and replaced the <AddInID> that they give in their example with my Guid. 1st it says it can't load the addin because the project doesn't exist at that location... and 2nd my debug tab on my project properties looks nothing like what is shown in the guide.

    so 2 questions How do I turn on Active Debugging in VS2008 Express?
    What am I doing wrong with the addin file?

  2. #2
    100 Club
    Join Date
    2003-06
    Posts
    121
    Login to Give a bone
    0

    Default Re: Frustrated

    Found the answer to the AddIn... typo... Frustrating as heck but popped out at me when I printed it.

  3. #3
    100 Club
    Join Date
    2003-06
    Posts
    121
    Login to Give a bone
    0

    Default Re: Frustrated

    Still frustrated... got the HelloWorld button working but now I am on the 2nd walkthrough and the walkthrough definately could not be described as step by step. Are they alergic to showing all of the code?
    Has anyone gotten it to work? If so how?

  4. #4
    100 Club
    Join Date
    2003-06
    Posts
    121
    Login to Give a bone
    0

    Default Re: Frustrated

    yes, I know I keep replying to my own post and thus far it has been ranting about how the User's Guide make certain assumptions about the readers understanding that aren't exactly what I would call correct when the reader is me... but I would like to fill in the gaps I am discovering that they have left out.

    I will add them as I go, so anticipate more post... sorry

    You have to add additional using statements for walkthrough 2 to build. The directions do not mention any of the using statements... but use the ones from the earlier walkthrough and add

    using System.Windows.Media.Imaging;

    (please anyone who knows differently jump in and correct this I am trying to help people who are going through the same stress that I am and the last thing I want to do is make it worse)

    They do not tell you that you need to go to the Build tab > Output section and make sure that the Output Path reads bin\debug if you are going to attempt to follow their directions for the addin file.

    I am not sure about the AddInId, I did not use theirs, but got the Guid from the Assembly Information on the Application tab

    I have not gotten the second walkthrough to work yet... It builds with no errors, but when I open Revit it tells me "Failed to initialize the add-in "SampleApplication" because the class "AddPanel.CsAddPanel" cannot be found in the add-in assembly.
    The FullClassName provides the entry point for Revit to call the add-in application. For Revit to run the add-in, you must ensure this class implements the "Autodesk.Revit.UI.IExternalApplication" interphase.

  5. #5
    100 Club
    Join Date
    2003-06
    Posts
    121
    Login to Give a bone
    0

    Default Re: Frustrated

    last post for today! I got the walkthrough 2 to work! So aside from the stuff above... here is the other stuff you need to know.

    It is assumed that everything in your program to the point of the public class CsAddPanel will be the same as walkthrough 1 ( I realize that it is hinted at... but since the guide really doesn't explain the lines of code... you don't really know that you need them - you do)

    Finally there is a typo in their code. "HelloWorld.CsHelloWorld ")) as PushButton; should be "HelloWorld.Class1")) as PushButton; if you followed their instructions for walkthrough 1

    Good luck all! If anyone knows how to turn on Active Debug with VS2008 Express please let me know.

  6. #6
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,420
    Login to Give a bone
    0

    Default Re: Frustrated

    I don't have Revit, so I'm hoping its similar to AutoCAD. Express is missing some info on the project properties' Debug tab that is there in the full version. The field to set the program to run the dll in is missing. However, you can set the working dir. Not to worry, you can manually edit the prj file (*.csproj or *.vbproj). The debug section could also be in *.csproj.user as well. Edit it to add the lines in red. Setting <StartWorkingDirectory> here is the same as setting it in the Properties designer.
    Code:
      <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
        <StartAction>Program</StartAction>
        <StartProgram>C:\Program Files\AutoCAD Map 3D 2010\acad.exe</StartProgram>
        <StartArguments></StartArguments>
        <StartWorkingDirectory>C:\Program Files\AutoCAD Map 3D 2010</StartWorkingDirectory>
      </PropertyGroup>
    C:> ED WORKING....


    LinkedIn

  7. #7
    100 Club
    Join Date
    2003-06
    Posts
    121
    Login to Give a bone
    1

    Default Re: Frustrated

    Thank you! Just incase I haven't said that enough to you! You have helped me on every Augi forum I have ever posted a question on. I don't know how you do it, but I am really appreciative.
    Last edited by cparvez; 2010-09-16 at 05:14 PM.

  8. #8
    100 Club
    Join Date
    2003-06
    Posts
    121
    Login to Give a bone
    0

    Default Re: Frustrated

    For those of you who are new to C# and trying to go through the Developer's Guide... or those of you who write the developer's guide... Walkthrough: Retrieve Selected Elements should more accurately be titled Passby: Retrieve Selected Elements - remember to remove all sharp objects from your work area before attempting it. There should also be a side note that reminds you that distroying you computer will only make it angry and won't get you any closer to selecting anything!

  9. #9
    100 Club
    Join Date
    2003-06
    Posts
    121
    Login to Give a bone
    0

    Smile Re: Frustrated

    Managed to get it working. It really wasn't that bad. The error messages and warnings that VS2008 gives you are really helpful and the explanations for why your program isn't working inside of Revit are way more helpful than any error message that Revit normally produces. Three corrections though.

    [Autodesk.Revit.Attributes.Regeneration(RegenerationOption.Manual)] - or atleast that is what the error message told me to use when I tried to build the program

    and you will need to add using Autodesk.Revit.UI.Selection to the top or Selection will be weird

    lastly I had to change the foreach line to:
    foreach (Autodesk.Revit.DB.Element elem in collection)

    I am on to Walkthrough 4... Retrieve Filtered Elements. Where they drop you off a cliff. Do the Autodesk guys read this? It is a pdf! You are not wasting paper by spoon feeding us newbies a little.
    Last edited by cparvez; 2010-09-17 at 11:44 AM.

  10. #10
    Member
    Join Date
    2007-10
    Posts
    6
    Login to Give a bone
    0

    Default Re: Frustrated

    cparvez,

    Thanks for the info. I'm just now getting in to the programming and I'm finding the Developers Guide to be somewhat lacking. It's helpful but you had better know your stuff to use it effectively. This error was driving me nuts and your post is the only thing I could find where it addressed this. I can see by the date on your post this problem has been around for a LONG time. I really wish the guys over at Autodesk would devote a little time to fixing these kinds of issues.

Similar Threads

  1. New to Revit... and frustrated
    By cparvez in forum Revit MEP - General
    Replies: 1
    Last Post: 2010-05-28, 11:28 AM
  2. Frustrated
    By Michael.c in forum CAD Standards
    Replies: 46
    Last Post: 2009-07-31, 09:40 PM
  3. Frustrated w/performance
    By sjsl in forum Revit Architecture - General
    Replies: 27
    Last Post: 2005-11-16, 05:11 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
  •