• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    Distinguished Contributor
    Posts: 115
    Registered: ‎04-12-2005
    Accepted Solution

    Wrong AutoCAD for Debugging

    152 Views, 6 Replies
    01-07-2013 03:05 PM

    I am using AutoCAD Mechanical 2012 and VB 2010 Express.  I am trying to debug my program but it opens up AutoCAD instead of AutoCAD Mechanical.  I am attaching my a copy of my myTable.vbproj.user file.  (I added the .txt to send the file)

     

    Does anyone know what else I need in the file?  I did not have this problem when I had AutoCAD Mechanical 2011 and VB 2008 Express.

     

    Thanks.

    Please use plain text.
    *Expert Elite*
    Posts: 6,463
    Registered: ‎06-29-2007

    Re: Wrong AutoCAD for Debugging

    01-08-2013 12:46 AM in reply to: cadcamm99

    Hi,

     

    >> but it opens up AutoCAD instead of AutoCAD Mechanical

    I guess it's not opening another product, it's opening the correct ACAD.EXE, but with the wrong profile/start parameters.

     

    Take your icon for Mechanical on your desktop, right-click ==> properties and look to the starting exe + options (all what is defined behind the ...\ACAD.EXE. All behind are start-parameters for AutoCAD to define e.g. the profile, a templatefile, ....

     

    Looking now to your .USER file you should modify it that way

        <StartArguments>

            xxxxx

        </StartArguments>


    where xxxxx has to be replaced with the parameters as they are defined in the Mechanical starticon properties

     

    HTH, - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    *Expert Elite*
    Posts: 1,640
    Registered: ‎04-29-2006

    Re : Wrong AutoCAD for Debugging

    01-08-2013 12:48 AM in reply to: cadcamm99

    Hi,

     

    I don't know much about Mechanical but I suppose it works like others vertical, AutoCAD (vanilla or vertical) opens according to a profile.

    You can specify the profile used to start AutoCAD by:

    - adding commandline arguments in the your project property debug tab:

    /nologo /p "<profileName>"

     

    - or, addin a line to the MSBuild file (vbproj) after the <StartProgram> one:

    <StartArguments>/nologo /p "<profileName>"</StartArguments>

    Gilles Chanteau
    Please use plain text.
    *Expert Elite*
    Posts: 6,463
    Registered: ‎06-29-2007

    Re : Wrong AutoCAD for Debugging

    01-08-2013 12:58 AM in reply to: _gile

    Hi Gilles

     

    >> - adding commandline arguments in the your project property debug tab

    I think one of the differences between VS2010 (pro) and VB2010Express (which the OP has) is that the Express version does not have a debug-page.

     

    >> or, addin a line to the MSBuild file (vbproj) after the <StartProgram> one

    I think Gilles meant the VBPROJ.USER file.

     

    - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    *Expert Elite*
    Posts: 1,640
    Registered: ‎04-29-2006

    Re : Wrong AutoCAD for Debugging

    01-08-2013 02:03 AM in reply to: alfred.neswadba

    Hi Alfred,

     

    >> I think one of the differences between VS2010 (pro) and VB2010Express (which the OP has) is that the Express version does not have a debug-page

    From my remember VS Express versions (2008 and 2010) had a Debug tab with the commandline arguments box (VS 2012 Express for Desktop do have it). what they missed was the start program box (the reason why it's needed to edit the MSBuild file).

     

    >> I think Gilles meant the VBPROJ.USER file.

    You're right, but editing the vbproj (or csproj, fsproj) <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> node works too.

    Gilles Chanteau
    Please use plain text.
    *Expert Elite*
    Posts: 6,463
    Registered: ‎06-29-2007

    Re : Wrong AutoCAD for Debugging

    01-08-2013 02:36 AM in reply to: _gile

    Hi,

     

    >> VS 2012 Express for Desktop do have it

    Great to know now. I didn't use it, will not use it, but maybe there come a question here and it's good to answer it correctly.

     

    >> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> node works too.

    To be honest: I have no idea on how to define there the program to start for debug or the startup-parameters.

    But as I don't really need it please don't spent time now for describing this. For me it's enough to know "there should be a way). If I have to use it in the future, I will search for it (and if I don't find, I will ask here). :smileywink:

     

    thx, - alfred -

    -------------------------------------------------------------------------
    Alfred NESWADBA
    Ingenieur Studio HOLLAUS ... www.hollaus.at
    -------------------------------------------------------------------------
    Please use plain text.
    Distinguished Contributor
    Posts: 115
    Registered: ‎04-12-2005

    Re : Wrong AutoCAD for Debugging

    01-11-2013 02:01 PM in reply to: _gile

    This did the trick.  Weird that I had to put the command on one line.  When I did it like the one above, I kept getting a profile name error. 

    Please use plain text.