.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

App that works in 06 dose not in 07

13 REPLIES 13
Reply
Message 1 of 14
Anonymous
343 Views, 13 Replies

App that works in 06 dose not in 07

Hi everybody –


I have AC2006 and 2007 installed on my PC. I can’t get any apps to run in 07 not even the samples from the ObjectARX 2007 SDK.


I wrote a test app that just loads a toolpalette
Works in 06 but not in 07

using System;
using System.Collections.Generic;
using System.Text;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.Colors;
using Autodesk.AutoCAD.Windows;
using Autodesk.AutoCAD.Windows.ToolPalette;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.EditorInput;



namespace Mynamespace
{
public class acCommancds
{
static Autodesk.AutoCAD.Windows.PaletteSet ps;
[CommandMethodAttribute("medload")]public void LOADMEDIA()
{
ps = new Autodesk.AutoCAD.Windows.PaletteSet("HKS - MEDIA");
ps.MinimumSize = new System.Drawing.Size(600, 200);
ps.TitleBarLocation = Autodesk.AutoCAD.Windows.PaletteSetTitleBarLocation.Left;
ps.Add( "p1",new uimain());
ps.Visible = true;
ps.Dock = Autodesk.AutoCAD.Windows.DockSides.None;
ps.Visible = false;
ps.Visible = true;
}
}
}



System

VS2005 donNET v2
13 REPLIES 13
Message 2 of 14
Anonymous
in reply to: Anonymous

You say they don't work in '07. What
exactly does/does not happen when
you try use them?

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5247840@discussion.autodesk.com...
Hi everybody –


I have AC2006 and 2007 installed on my PC. I can’t get any apps to run in 07 not even the samples from the ObjectARX 2007 SDK.


I wrote a test app that just loads a toolpalette
Works in 06 but not in 07

using System;
using System.Collections.Generic;
using System.Text;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.Colors;
using Autodesk.AutoCAD.Windows;
using Autodesk.AutoCAD.Windows.ToolPalette;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.EditorInput;



namespace Mynamespace
{
public class acCommancds
{
static Autodesk.AutoCAD.Windows.PaletteSet ps;
[CommandMethodAttribute("medload")]public void LOADMEDIA()
{
ps = new Autodesk.AutoCAD.Windows.PaletteSet("HKS - MEDIA");
ps.MinimumSize = new System.Drawing.Size(600, 200);
ps.TitleBarLocation = Autodesk.AutoCAD.Windows.PaletteSetTitleBarLocation.Left;
ps.Add( "p1",new uimain());
ps.Visible = true;
ps.Dock = Autodesk.AutoCAD.Windows.DockSides.None;
ps.Visible = false;
ps.Visible = true;
}
}
}



System

VS2005 donNET v2
Message 3 of 14
Anonymous
in reply to: Anonymous

the unknowncommand "command" thing
Message 4 of 14
Anonymous
in reply to: Anonymous

If you're trying to run the app in debug mode,
you need to set the CopyLocal property of
acmgd.dll to false. Not sure why, but I ran
into this problem and that solved it.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5247871@discussion.autodesk.com...
the unknowncommand "command" thing
Message 5 of 14
Anonymous
in reply to: Anonymous

Do you have a dll that compiles and loads fine
but when issuing a command via the 'CommandMethod'
you get an error ' Unknown command "COMMANDNAME" '. ?

wrote in message news:5247871@discussion.autodesk.com...
the unknowncommand "command" thing
Message 6 of 14
Anonymous
in reply to: Anonymous

Right, but only in AC2007, its runns fine in AC2006.
Message 7 of 14
Anonymous
in reply to: Anonymous

AutoCAD demand loads 'acmgd.dll' in 07, so it gets loaded twice.

You can also set the working 'Working Directory' to the Acad
install directory.
"Tony Tanzillo" wrote in message
news:5248020@discussion.autodesk.com...
If you're trying to run the app in debug mode,
you need to set the CopyLocal property of
acmgd.dll to false. Not sure why, but I ran
into this problem and that solved it.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5247871@discussion.autodesk.com...
the unknowncommand "command" thing
Message 8 of 14
Anonymous
in reply to: Anonymous

as Tony mentioned this only happens in 'debug mode' in 07.

wrote in message news:5248010@discussion.autodesk.com...
Right, but only in AC2007, its runns fine in AC2006.
Message 9 of 14
Anonymous
in reply to: Anonymous

get this, if I plase the dll in the AutoCAD 2007 root folder it works, so if I under stand The app needs to reforance the libraries in the application folder and not the local copy made by VS in dbug mode?
Message 10 of 14
Anonymous
in reply to: Anonymous

To make this clearer you can also set 'project->properties->debug->start
options->working directory'
to AutoCAD root.

"Paul Richardson" wrote in message
news:5248065@discussion.autodesk.com...
AutoCAD demand loads 'acmgd.dll' in 07, so it gets loaded twice.

You can also set the working 'Working Directory' to the Acad
install directory.
"Tony Tanzillo" wrote in message
news:5248020@discussion.autodesk.com...
If you're trying to run the app in debug mode,
you need to set the CopyLocal property of
acmgd.dll to false. Not sure why, but I ran
into this problem and that solved it.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5247871@discussion.autodesk.com...
the unknowncommand "command" thing
Message 11 of 14
NathTay
in reply to: Anonymous

If you follow Tony's advice and set Local Copy to false you should be able to place it anywhere.

Regards - Nathan
Message 12 of 14
bdennis
in reply to: Anonymous

The app config file for acad can be set to target a particular version of the .NET framework. By default it targets the highest version but you can explicitly set it for acad 2006 and 2007 individually. If acad2007 is set to target the 2.0 framework and your plug-in was compiled with 1.1 framework then it won't load. That is why you're getting the "Unknown Command" error. Modify the app config file in the program files folder where the executable lives to look for the same version of the framework that you're using. Each version of visual studio is designed to target a particular framework as well. VS2003 = 1.1fx, VS2005=2.0fx.
Message 13 of 14
cgay
in reply to: Anonymous

How would one compile a dll for AutoCAD 2007, referencing AcDbMgd.dll and AcmGD.dll from AutoCAD 2007, in v1.1 of the framework anyways? This should not compile. You would be referencing v2.0 components that require v2.0 of the framework?
Message 14 of 14
Anonymous
in reply to: Anonymous

After setting the property "Local Copy" to "false", You have to delete the file "acmgd.dll" from the "debug" folder.

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


Autodesk Design & Make Report

”Boost