.NET

Reply
Distinguished Contributor
cadcamm99
Posts: 160
Registered: ‎04-12-2005
Message 1 of 7 (279 Views)
Accepted Solution

Wrong AutoCAD for Debugging

279 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.

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 -

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>

*Expert Elite*
Alfred.NESWADBA
Posts: 9,216
Registered: ‎06-29-2007
Message 2 of 7 (253 Views)

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
-------------------------------------------------------------------------
*Expert Elite*
_gile
Posts: 2,105
Registered: ‎04-29-2006
Message 3 of 7 (253 Views)

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
*Expert Elite*
Alfred.NESWADBA
Posts: 9,216
Registered: ‎06-29-2007
Message 4 of 7 (247 Views)

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
-------------------------------------------------------------------------
*Expert Elite*
_gile
Posts: 2,105
Registered: ‎04-29-2006
Message 5 of 7 (235 Views)

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
*Expert Elite*
Alfred.NESWADBA
Posts: 9,216
Registered: ‎06-29-2007
Message 6 of 7 (230 Views)

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
-------------------------------------------------------------------------
Distinguished Contributor
cadcamm99
Posts: 160
Registered: ‎04-12-2005
Message 7 of 7 (195 Views)

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. 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.