Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Visual Studio Express 2013 Missing "Start External Program"

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
5373 Views, 3 Replies

Visual Studio Express 2013 Missing "Start External Program"

Hello,

This is my first post in this forum so if I miss some protocal please forgive me and point it out to me so I don't repeat it.

 

I'm starting to learn to program using the Revit 2015 API. I'm using Visual Studio Express 2013. The Revit 2015 SDK says to select the "Start external program:" radio button in the properties tab. For some reason my VS doesn't have that option. I selected the Class Library for the C# template when I started the project. I aslo attempted to do the same thing in VSE 2012 and it still does not appear.

 

I've attached an image to show you (in green) what is missing from my VS.

 

Any help would be much appreciated,

Bernie

3 REPLIES 3
Message 2 of 4
Scott_Wilson
in reply to: Anonymous

According to this: http://msdn.microsoft.com/en-us/library/605a12zt.aspx

 

"You cannot specify an external calling application in the Express versions. To debug a DLL in an Express version, add an executable project to the solution, set it as the start point for the solution, and call methods in your DLL from the executable project."

 

I've noticed many people are using the express editions though, how are they coping? There must be a trick to it.

 

I'm sure if you Googled around a bit you'd probably find a work-around. It is probably the case that the buttons are disabled but the functionality remains in-place. My guess would be that it can be enabled manually by text editing one of the project config files.

 

5min later...

 

Oh, I just checked and the setting appears in the user options config file for the project (full version of VS2013). Look for a file in your project folder called something like MyProjectName.csproj.user

 

If it's there, open it in a text editor see if it looks anything like below.

 

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
    <StartAction>Program</StartAction>
    <StartProgram>C:\Program Files\Autodesk\Revit 2015\Revit.exe</StartProgram>
    <StartArguments>""</StartArguments>
    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
    <StartAction>Program</StartAction>
    <StartProgram>C:\Program Files\Autodesk\Revit 2015\Revit.exe</StartProgram>
    <StartArguments>""</StartArguments>
  </PropertyGroup>
</Project>

 

 if it's not there, paste the above into a new text file, name it as I described earlier and save it to your project folder. See if that does anything?

 

You may need to tweak the values in the PropertyGroup tags to match the names of the build configurations in your project if they are different. Also if you want Revit to open with a specific document file, add it's path into the <StartArguments> tags

 

Now I haven't tested any of this and it may not even work, but its worth a shot!

 

 

 

 

Message 3 of 4
Anonymous
in reply to: Scott_Wilson

Thank you I was given a simlilar solution. However I've yet to try either.

 

Here is the other suggestion...

That feature is not available in Visual Studio Express. You can specify a post-build event and then use Attach To Process after Revit starts.
 
Message 4 of 4
jeremytammik
in reply to: Anonymous

Thank you both Scott and Bernie for suggesting solutions.

 

Looking forward to hearing how it goes for you, Bernie.

 

By the way, The Building Coder provides wizards to generate Revit add-ins complete with Revit.exe set up for debugging, the add-in manifest ready generated, and copied to the appropriate folder for Revit to load it from by the post-build event:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.20

 

The wizards may require some tweaking for express, though. They are easy to modify, and that is documented in various places included in the links above.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

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


Rail Community